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 diff --git a/package.json b/package.json index 43c675540f..7c4e1f6130 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/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', 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',