From e3a00c78530191f40200ecb1713bbe4314a779eb Mon Sep 17 00:00:00 2001 From: iamacook Date: Tue, 14 Dec 2021 09:58:05 +0100 Subject: [PATCH] test: Use 'mainnet' as networkName in onboard chore: Add remoteConfig for tests fix: Declaration Fix tests chore: Update comment --- src/logic/safe/utils/mocks/remoteConfig.json | 1 + src/logic/wallets/onboard.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/logic/safe/utils/mocks/remoteConfig.json b/src/logic/safe/utils/mocks/remoteConfig.json index 8226002560..f99107921b 100644 --- a/src/logic/safe/utils/mocks/remoteConfig.json +++ b/src/logic/safe/utils/mocks/remoteConfig.json @@ -114,6 +114,7 @@ "features": [ "CONTRACT_INTERACTION", "DOMAIN_LOOKUP", + "EIP1559", "ERC721", "SAFE_APPS", "SAFE_TX_GAS_OPTIONAL" diff --git a/src/logic/wallets/onboard.ts b/src/logic/wallets/onboard.ts index b69a6623f1..78c7e5920d 100644 --- a/src/logic/wallets/onboard.ts +++ b/src/logic/wallets/onboard.ts @@ -6,6 +6,11 @@ import { setWeb3 } from './getWeb3' import { fetchProvider, removeProvider } from './store/actions' import transactionDataCheck from './transactionDataCheck' import { getSupportedWallets } from './utils/walletList' +import { ChainId, CHAIN_ID } from 'src/config/chain.d' + +const NETWORK_NAMES: Record = { + [CHAIN_ID.ETHEREUM]: 'mainnet', +} const getOnboardConfiguration = () => { let lastUsedAddress = '' @@ -15,7 +20,8 @@ const getOnboardConfiguration = () => { return { networkId: parseInt(_getChainId(), 10), // Is it mandatory for Ledger to work to send network name in lowercase - networkName: getChainName().toLowerCase(), + // @FIXME: Move to CGW + networkName: NETWORK_NAMES[_getChainId()] || getChainName().toLowerCase(), subscriptions: { wallet: (wallet: Wallet) => { if (wallet.provider) {