From f1851d47a4d6e4147b6b6f9b8b93ba2f372fa723 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Tue, 1 Jun 2021 10:28:44 +0200 Subject: [PATCH] Fix crash with Coinbase Wallet after upgrade to latest version (#2363) * Fix name changing in bnc-onboard Coinbase Wallet * Add comment in wallet provider list to explain the use --- .../WalletIcon/icons/icon-coinbase.svg | 35 +++---------------- .../components/WalletIcon/icons/index.ts | 2 +- src/logic/wallets/getWeb3.ts | 4 ++- 3 files changed, 8 insertions(+), 33 deletions(-) diff --git a/src/components/AppLayout/Header/components/WalletIcon/icons/icon-coinbase.svg b/src/components/AppLayout/Header/components/WalletIcon/icons/icon-coinbase.svg index 7c6cb2e2..04739158 100644 --- a/src/components/AppLayout/Header/components/WalletIcon/icons/icon-coinbase.svg +++ b/src/components/AppLayout/Header/components/WalletIcon/icons/icon-coinbase.svg @@ -1,31 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/src/components/AppLayout/Header/components/WalletIcon/icons/index.ts b/src/components/AppLayout/Header/components/WalletIcon/icons/index.ts index 71642f95..dfef4337 100644 --- a/src/components/AppLayout/Header/components/WalletIcon/icons/index.ts +++ b/src/components/AppLayout/Header/components/WalletIcon/icons/index.ts @@ -65,7 +65,7 @@ const WALLET_ICONS: WalletObjectsProps = { src: operaIcon, height: 25, }, - [WALLET_PROVIDER.WALLETLINK]: { + [WALLET_PROVIDER.COINBASE_WALLET]: { src: coinbaseIcon, height: 25, }, diff --git a/src/logic/wallets/getWeb3.ts b/src/logic/wallets/getWeb3.ts index ffd5f007..ab1e8a5b 100644 --- a/src/logic/wallets/getWeb3.ts +++ b/src/logic/wallets/getWeb3.ts @@ -9,6 +9,7 @@ import { getRpcServiceUrl } from 'src/config' import { isValidCryptoDomainName } from 'src/logic/wallets/ethAddresses' import { getAddressFromUnstoppableDomain } from './utils/unstoppableDomains' +// This providers have direct relation with name assigned in bnc-onboard configuration export const WALLET_PROVIDER = { SAFE: 'SAFE', METAMASK: 'METAMASK', @@ -19,7 +20,8 @@ export const WALLET_PROVIDER = { SQUARELINK: 'SQUARELINK', WALLETCONNECT: 'WALLETCONNECT', OPERA: 'OPERA', - WALLETLINK: 'WALLETLINK', + // This is the provider for WALLET_LINK configuration on bnc-onboard + COINBASE_WALLET: 'COINBASE WALLET', AUTHEREUM: 'AUTHEREUM', LEDGER: 'LEDGER', TREZOR: 'TREZOR',