From 439706bb8c004c5eb12efe13738072844e2f03ff Mon Sep 17 00:00:00 2001 From: shendel Date: Wed, 4 Dec 2024 12:43:55 +0300 Subject: [PATCH 1/6] infura apikey --- src/front/config/mainnet/api.js | 1 + src/front/config/mainnet/web3.js | 2 +- src/front/config/testnet/api.js | 1 + src/front/config/testnet/web3.js | 2 +- src/front/shared/redux/actions/erc20LikeAction.ts | 2 ++ src/front/shared/redux/actions/ethLikeAction.ts | 3 +++ 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/front/config/mainnet/api.js b/src/front/config/mainnet/api.js index 8293e9ef94..6fae236f6b 100644 --- a/src/front/config/mainnet/api.js +++ b/src/front/config/mainnet/api.js @@ -49,4 +49,5 @@ export default { fkwscan: 'https://explorer.fokawa.com/api', phpxscan: 'https://explorer.phpx.network/api', WalletConnectProjectId: 'a23677c4af3139b4eccb52981f76ad94', + InfuraApiKey: 'fdd4494101ed4a28b41bb66d7fe9c692', } diff --git a/src/front/config/mainnet/web3.js b/src/front/config/mainnet/web3.js index 48a947df92..d556ee9549 100644 --- a/src/front/config/mainnet/web3.js +++ b/src/front/config/mainnet/web3.js @@ -1,5 +1,5 @@ export default { - provider: 'https://mainnet.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c', + provider: 'https://mainnet.infura.io/v3/{INFURA_API_KEY}', binance_provider: 'https://bsc-dataseed.binance.org/', matic_provider: 'https://polygon.meowrpc.com', arbitrum_provider: 'https://arb1.arbitrum.io/rpc', diff --git a/src/front/config/testnet/api.js b/src/front/config/testnet/api.js index 5783886d90..e2b2224869 100644 --- a/src/front/config/testnet/api.js +++ b/src/front/config/testnet/api.js @@ -46,4 +46,5 @@ export default { txinfo: 'https://txinfo.onout.org', noxon: 'https://noxon.wpmix.net', WalletConnectProjectId: 'a23677c4af3139b4eccb52981f76ad94', + InfuraApiKey: 'fdd4494101ed4a28b41bb66d7fe9c692', } diff --git a/src/front/config/testnet/web3.js b/src/front/config/testnet/web3.js index 3d735d6fff..2198542ae1 100644 --- a/src/front/config/testnet/web3.js +++ b/src/front/config/testnet/web3.js @@ -1,5 +1,5 @@ export default { - provider: 'https://goerli.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c', + provider: 'https://goerli.infura.io/v3/{INFURA_API_KEY}', binance_provider: 'https://data-seed-prebsc-1-s1.binance.org:8545/', matic_provider: 'https://polygon-testnet.public.blastapi.io', arbitrum_provider: 'https://rinkeby.arbitrum.io/rpc', diff --git a/src/front/shared/redux/actions/erc20LikeAction.ts b/src/front/shared/redux/actions/erc20LikeAction.ts index 955f88ae1e..ff2278155c 100644 --- a/src/front/shared/redux/actions/erc20LikeAction.ts +++ b/src/front/shared/redux/actions/erc20LikeAction.ts @@ -667,6 +667,8 @@ class Erc20LikeAction { } const providers = externalConfig.web3 +const INFURA_API_KEY = (window && window.SO_INFURA_API_KEY) ? window.SO_INFURA_API_KEY : externalConfig.api.InfuraApiKey +providers.provider = providers.provider.replace(`{INFURA_API_KEY}`, INFURA_API_KEY) export default { erc20: new Erc20LikeAction({ diff --git a/src/front/shared/redux/actions/ethLikeAction.ts b/src/front/shared/redux/actions/ethLikeAction.ts index ce1f5b5efc..8432e1eabd 100644 --- a/src/front/shared/redux/actions/ethLikeAction.ts +++ b/src/front/shared/redux/actions/ethLikeAction.ts @@ -600,6 +600,9 @@ class EthLikeAction { const providers = externalConfig.web3 +const INFURA_API_KEY = (window && window.SO_INFURA_API_KEY) ? window.SO_INFURA_API_KEY : externalConfig.api.InfuraApiKey +providers.provider = providers.provider.replace(`{INFURA_API_KEY}`, INFURA_API_KEY) + export default { ETH: new EthLikeAction({ coinName: 'Ethereum', From 0bb9d42f868080afe188fbd50dbaf2eea574598a Mon Sep 17 00:00:00 2001 From: shendel Date: Wed, 4 Dec 2024 12:50:51 +0300 Subject: [PATCH 2/6] fix test build --- .github/workflows/nodejs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8f8014731e..e6fd037b14 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -36,14 +36,14 @@ jobs: mkdir ./tests/e2e/screenshots npm run test:e2e:actions - name: Upload failure screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: failure-screenshots path: ./tests/e2e/screenshots if-no-files-found: ignore - name: Upload screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: screenshots path: ./tests/e2e/screenshots From 9e6be97dec84e05c9ad4d665b88ef91b5fa8db91 Mon Sep 17 00:00:00 2001 From: shendel Date: Wed, 4 Dec 2024 13:48:17 +0300 Subject: [PATCH 3/6] update patch --- patches/{cipher-base+1.0.4.patch => cipher-base+1.0.6.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patches/{cipher-base+1.0.4.patch => cipher-base+1.0.6.patch} (100%) diff --git a/patches/cipher-base+1.0.4.patch b/patches/cipher-base+1.0.6.patch similarity index 100% rename from patches/cipher-base+1.0.4.patch rename to patches/cipher-base+1.0.6.patch From 1b3c49f7175e6b63eb825f3f92ab195edd421e69 Mon Sep 17 00:00:00 2001 From: shendel Date: Wed, 4 Dec 2024 14:10:00 +0300 Subject: [PATCH 4/6] fix --- package.json | 1 + patches/{cipher-base+1.0.6.patch => cipher-base+1.0.4.patch} | 0 2 files changed, 1 insertion(+) rename patches/{cipher-base+1.0.6.patch => cipher-base+1.0.4.patch} (100%) diff --git a/package.json b/package.json index 43c675540f..f20f28894c 100644 --- a/package.json +++ b/package.json @@ -228,6 +228,7 @@ "bitcoinjs-lib": "5.1.6", "bitcoinjs-message": "^2.1.0", "bitcore-lib": "^8.25.10", + "cipher-base": "^1.0.4", "classnames": "^2.2.5", "command-line-args": "^5.0.2", "command-line-usage": "^6.1.0", diff --git a/patches/cipher-base+1.0.6.patch b/patches/cipher-base+1.0.4.patch similarity index 100% rename from patches/cipher-base+1.0.6.patch rename to patches/cipher-base+1.0.4.patch From fd48422016dbe4e9c4c18159da069769cbed1dc7 Mon Sep 17 00:00:00 2001 From: shendel Date: Wed, 4 Dec 2024 14:32:49 +0300 Subject: [PATCH 5/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f20f28894c..7c4e1f6130 100644 --- a/package.json +++ b/package.json @@ -228,7 +228,7 @@ "bitcoinjs-lib": "5.1.6", "bitcoinjs-message": "^2.1.0", "bitcore-lib": "^8.25.10", - "cipher-base": "^1.0.4", + "cipher-base": "1.0.4", "classnames": "^2.2.5", "command-line-args": "^5.0.2", "command-line-usage": "^6.1.0", From 84fdd0f739b5bd6270d456c92fb4f0a957db1e1e Mon Sep 17 00:00:00 2001 From: shendel Date: Wed, 4 Dec 2024 15:03:02 +0300 Subject: [PATCH 6/6] remove polygon from test --- tests/e2e/wallet/tokenAddition.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/wallet/tokenAddition.test.ts b/tests/e2e/wallet/tokenAddition.test.ts index e4a048525e..f6a1dad34c 100644 --- a/tests/e2e/wallet/tokenAddition.test.ts +++ b/tests/e2e/wallet/tokenAddition.test.ts @@ -39,6 +39,7 @@ describe('Adding custom tokens', () => { walletTitle: 'WBNB BEP20', }, ], + /* [ 'Custom POLYGON ERC20', 'maticerc20matic', @@ -48,6 +49,7 @@ describe('Adding custom tokens', () => { walletTitle: 'WMATIC ERC20MATIC', }, ], + */ /* [ 'Custom xDai ERC20',