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
This commit is contained in:
Daniel Sanchez 2021-06-01 10:28:44 +02:00 committed by GitHub
parent c1dd274ede
commit f1851d47a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 33 deletions

View File

@ -1,31 +1,4 @@
<svg width="40" height="40" viewBox="0 0 383 383" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)"> <path d="M20 40C31.0457 40 40 31.0457 40 20C40 8.9543 31.0457 0 20 0C8.9543 0 0 8.9543 0 20C0 31.0457 8.9543 40 20 40Z" fill="#1652F0"/>
<g filter="url(#filter0_dd)"> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.45508 20.0006C5.45508 28.0338 11.9673 34.546 20.0006 34.546C28.0338 34.546 34.546 28.0338 34.546 20.0006C34.546 11.9673 28.0338 5.45508 20.0006 5.45508C11.9673 5.45508 5.45508 11.9673 5.45508 20.0006ZM17.3137 15.3145C16.2091 15.3145 15.3137 16.2099 15.3137 17.3145V22.6882C15.3137 23.7928 16.2091 24.6882 17.3137 24.6882H22.6874C23.792 24.6882 24.6874 23.7928 24.6874 22.6882V17.3145C24.6874 16.2099 23.792 15.3145 22.6874 15.3145H17.3137Z" fill="white"/>
<path d="M0.998047 0.572266L382.78 0.572266V382.354H0.998047L0.998047 0.572266Z" fill="url(#paint0_linear)"/> </svg>
<path fill-rule="evenodd" clip-rule="evenodd" d="M59.1074 191.572C59.1074 264.966 118.605 324.463 191.998 324.463C265.392 324.463 324.889 264.966 324.889 191.572C324.889 118.179 265.392 58.6816 191.998 58.6816C118.605 58.6816 59.1074 118.179 59.1074 191.572ZM158.037 148.752C153.144 148.752 149.178 152.718 149.178 157.611V225.533C149.178 230.426 153.144 234.393 158.037 234.393H225.959C230.852 234.393 234.818 230.426 234.818 225.533V157.611C234.818 152.718 230.852 148.752 225.959 148.752H158.037Z" fill="white"/>
</g>
</g>
<defs>
<filter id="filter0_dd" x="-23.002" y="-7.42773" width="429.782" height="429.782" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="16"/>
<feGaussianBlur stdDeviation="12"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset/>
<feGaussianBlur stdDeviation="4"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
<feBlend mode="normal" in2="effect1_dropShadow" result="effect2_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow" result="shape"/>
</filter>
<linearGradient id="paint0_linear" x1="191.889" y1="0.572266" x2="191.889" y2="382.354" gradientUnits="userSpaceOnUse">
<stop stop-color="#2E66F8"/>
<stop offset="1" stop-color="#124ADB"/>
</linearGradient>
<clipPath id="clip0">
<rect width="381.782" height="381.782" fill="white" transform="translate(0.998047 0.572266)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 749 B

View File

@ -65,7 +65,7 @@ const WALLET_ICONS: WalletObjectsProps<IconValue> = {
src: operaIcon, src: operaIcon,
height: 25, height: 25,
}, },
[WALLET_PROVIDER.WALLETLINK]: { [WALLET_PROVIDER.COINBASE_WALLET]: {
src: coinbaseIcon, src: coinbaseIcon,
height: 25, height: 25,
}, },

View File

@ -9,6 +9,7 @@ import { getRpcServiceUrl } from 'src/config'
import { isValidCryptoDomainName } from 'src/logic/wallets/ethAddresses' import { isValidCryptoDomainName } from 'src/logic/wallets/ethAddresses'
import { getAddressFromUnstoppableDomain } from './utils/unstoppableDomains' import { getAddressFromUnstoppableDomain } from './utils/unstoppableDomains'
// This providers have direct relation with name assigned in bnc-onboard configuration
export const WALLET_PROVIDER = { export const WALLET_PROVIDER = {
SAFE: 'SAFE', SAFE: 'SAFE',
METAMASK: 'METAMASK', METAMASK: 'METAMASK',
@ -19,7 +20,8 @@ export const WALLET_PROVIDER = {
SQUARELINK: 'SQUARELINK', SQUARELINK: 'SQUARELINK',
WALLETCONNECT: 'WALLETCONNECT', WALLETCONNECT: 'WALLETCONNECT',
OPERA: 'OPERA', OPERA: 'OPERA',
WALLETLINK: 'WALLETLINK', // This is the provider for WALLET_LINK configuration on bnc-onboard
COINBASE_WALLET: 'COINBASE WALLET',
AUTHEREUM: 'AUTHEREUM', AUTHEREUM: 'AUTHEREUM',
LEDGER: 'LEDGER', LEDGER: 'LEDGER',
TREZOR: 'TREZOR', TREZOR: 'TREZOR',