From 55adf669863cca0e509fe24ff98be2048d097500 Mon Sep 17 00:00:00 2001 From: bferenc <117105626+bferenc@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:52:13 +0200 Subject: [PATCH 1/3] ci: fix e2e runner name (#19) --- .github/workflows/e2e_testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e_testing.yaml b/.github/workflows/e2e_testing.yaml index 8f0b89845..9b156fcc5 100644 --- a/.github/workflows/e2e_testing.yaml +++ b/.github/workflows/e2e_testing.yaml @@ -71,9 +71,9 @@ jobs: name: extension path: extension.zip e2e: + runs-on: ubuntu-latest-16-cores-core-extension needs: build name: Run E2E Smoke Tests - runs-on: ubuntu-latest-16-cores environment: e2e env: RUNNER: CI From 00c212b847f2f0087aadbb85f876a245138b3f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Tue, 6 Aug 2024 18:33:46 +0200 Subject: [PATCH 2/3] fix: intermittent e2e failures (#15) Co-authored-by: Ibrahim <109112750+blockqa@users.noreply.github.com> Co-authored-by: bferenc <117105626+bferenc@users.noreply.github.com> --- src/background/services/network/NetworkService.ts | 13 +++++++++++-- tsconfig.json | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/background/services/network/NetworkService.ts b/src/background/services/network/NetworkService.ts index fcd9ec1be..654135595 100644 --- a/src/background/services/network/NetworkService.ts +++ b/src/background/services/network/NetworkService.ts @@ -326,7 +326,8 @@ export class NetworkService implements OnLock, OnStorageReady { // At this point the chainlist from Glacier should already be available, // as it is fetched when service worker starts (so before extension is unlocked). // If it isn't available yet, we'll use the list cached in the storage. - const chainlist = await Promise.race([ + + const chainlist = await Promise.any([ this._chainListFetched.promisify(), this._getCachedChainList(), ]); @@ -358,7 +359,15 @@ export class NetworkService implements OnLock, OnStorageReady { } private async _getCachedChainList(): Promise { - return this.storageService.load(NETWORK_LIST_STORAGE_KEY); + const networkList = await this.storageService.load( + NETWORK_LIST_STORAGE_KEY + ); + + if (!networkList) { + throw new Error('No networks cached'); + } + + return networkList; } private _getPchainNetwork(isTestnet: boolean): Network { diff --git a/tsconfig.json b/tsconfig.json index 45a4873e1..d1476f194 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "sourceMap": true, "jsx": "react-jsx", "esModuleInterop": true, - "lib": ["es2015", "dom"], + "lib": ["es2015", "es2021", "dom"], "experimentalDecorators": true, "emitDecoratorMetadata": true, "allowSyntheticDefaultImports": true, From 0cf23b27b53076f4b0632080d7c1c7a2050e0a42 Mon Sep 17 00:00:00 2001 From: ryanml Date: Tue, 6 Aug 2024 11:32:43 -0700 Subject: [PATCH 3/3] chore: update ipfs hostname (#21) Signed-off-by: ryanml --- src/background/services/balances/models.ts | 2 +- src/utils/ipsfResolverWithFallback.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/background/services/balances/models.ts b/src/background/services/balances/models.ts index 17545b0cd..c1e0f6f63 100644 --- a/src/background/services/balances/models.ts +++ b/src/background/services/balances/models.ts @@ -167,7 +167,7 @@ export interface Balances { }; } -export const CLOUDFLARE_IPFS_URL = 'https://cloudflare-ipfs.com'; +export const IPFS_URL = 'https://ipfs.io'; export interface CachedBalancesInfo { totalBalance?: TotalBalance; diff --git a/src/utils/ipsfResolverWithFallback.ts b/src/utils/ipsfResolverWithFallback.ts index a471f3d7c..1a126e996 100644 --- a/src/utils/ipsfResolverWithFallback.ts +++ b/src/utils/ipsfResolverWithFallback.ts @@ -1,8 +1,8 @@ import { ipfsResolver } from '@avalabs/core-utils-sdk'; -import { CLOUDFLARE_IPFS_URL } from '@src/background/services/balances/models'; +import { IPFS_URL } from '@src/background/services/balances/models'; export function ipfsResolverWithFallback( sourceUrl: string | undefined, - desiredGatewayPrefix: string = CLOUDFLARE_IPFS_URL + desiredGatewayPrefix: string = IPFS_URL ) { if (!sourceUrl) { return '';