Skip to content

Commit 62dc6ae

Browse files
authored
Merge pull request #5738 from EdgeApp/matthew/rates-server-list
Use two rates server lists
2 parents b49207a + 69b5c15 commit 62dc6ae

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ export default [
550550
'src/util/maestro.ts',
551551
'src/util/memoUtils.ts',
552552
'src/util/middleware/perfLogger.ts',
553-
'src/util/network.ts',
553+
554554
'src/util/otpReminder.tsx',
555555
'src/util/scaling.ts',
556556
'src/util/show-confetti.ts',

src/util/network.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ import { runOnce } from './runOnce'
1313
import { asyncWaterfall, getOsVersion, shuffleArray } from './utils'
1414
import { checkAppVersion } from './versionCheck'
1515
const INFO_SERVERS = ['https://info1.edge.app', 'https://info2.edge.app']
16-
// const RATES_SERVERS = ['https://rates3.edge.app', 'https://rates4.edge.app']
17-
const RATES_SERVERS = [
18-
'https://rates-wusa1.edge.app',
19-
'https://rates-eusa1.edge.app'
20-
]
16+
const RATES_SERVERS = ['https://rates3.edge.app', 'https://rates4.edge.app']
17+
const RATES_SERVER_V2 = ['https://rates1.edge.app', 'https://rates2.edge.app']
2118

2219
const INFO_FETCH_INTERVAL = 5 * 60 * 1000 // 5 minutes
2320

@@ -95,7 +92,8 @@ export const fetchRates = async (
9592
timeout?: number,
9693
doFetch?: EdgeFetchFunction
9794
): Promise<EdgeFetchResponse> => {
98-
return await multiFetch(RATES_SERVERS, path, options, timeout, doFetch)
95+
const servers = path.startsWith('v2') ? RATES_SERVER_V2 : RATES_SERVERS
96+
return await multiFetch(servers, path, options, timeout, doFetch)
9997
}
10098
export const fetchReferral = async (
10199
path: string,

0 commit comments

Comments
 (0)