diff --git a/package.json b/package.json index c13f34b88f..99ecce5e38 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "abi-decoder": "^2.4.0", "axios": "0.21.4", "bignumber.js": "9.0.1", - "bnc-onboard": "~1.35.3", + "bnc-onboard": "^1.37.3", "classnames": "^2.2.6", "currency-flags": "3.2.1", "date-fns": "^2.20.2", diff --git a/src/logic/wallets/patchedWalletConnect.ts b/src/logic/wallets/patchedWalletConnect.ts new file mode 100644 index 0000000000..552d1da826 --- /dev/null +++ b/src/logic/wallets/patchedWalletConnect.ts @@ -0,0 +1,105 @@ +import WalletConnectProvider from '@walletconnect/web3-provider' +import { IRPCMap } from '@walletconnect/types' +import { WalletModule, Helpers } from 'bnc-onboard/dist/src/interfaces' + +import { getRpcServiceUrl } from 'src/config' +import { getChains } from 'src/config/cache/chains' +import { INFURA_TOKEN } from 'src/utils/constants' +import { ChainId } from 'src/config/chain' + +// TODO: When desktop pairing is merged, import these into there +export const WC_BRIDGE = 'https://safe-walletconnect.gnosis.io/' + +// Modified version of the built in WC module in Onboard v1.35.5, including: +// https://github.com/blocknative/onboard/blob/release/1.35.5/src/modules/select/wallets/wallet-connect.ts + +// - No `balance` subscription as `eth_getBalance` is otherwise constantly requested +// but we do not request the balance from anywhere and is therefore not needed +// - A high polling interval to prevent unnecessary `eth_getBlockByNumber` polling +// https://github.com/WalletConnect/walletconnect-monorepo/issues/357#issuecomment-789663540 + +const walletConnectIcon = ` + + + +` + +export const getRpcMap = (): IRPCMap => { + return getChains().reduce((map, { chainId, rpcUri }) => { + return { + ...map, + [parseInt(chainId, 10)]: getRpcServiceUrl(rpcUri), + } + }, {}) +} + +const patchedWalletConnect = (chainId: ChainId): WalletModule => { + return { + name: 'WalletConnect', + svg: walletConnectIcon, + wallet: async ({ resetWalletState }: Helpers) => { + const provider = new WalletConnectProvider({ + infuraId: INFURA_TOKEN, + rpc: getRpcMap(), + chainId: parseInt(chainId, 10), + bridge: WC_BRIDGE, + // Prevent `eth_getBlockByNumber` polling every 4 seconds + pollingInterval: 60_000 * 60, // 1 hour + }) + + provider.autoRefreshOnNetworkChange = false + + provider.wc.on('disconnect', () => { + resetWalletState({ disconnected: true, walletName: 'WalletConnect' }) + }) + + return { + provider, + interface: { + name: 'WalletConnect', + connect: () => + new Promise((resolve, reject) => { + provider + .enable() + .then(resolve) + .catch(() => + reject({ + message: 'This dapp needs access to your account information.', + }), + ) + }), + address: { + onChange: (func) => { + provider.send('eth_accounts').then((accounts: string[]) => accounts[0] && func(accounts[0])) + provider.on('accountsChanged', (accounts: string[]) => func(accounts[0])) + }, + }, + network: { + onChange: (func) => { + provider.send('eth_chainId').then(func) + provider.on('chainChanged', func) + }, + }, + // Prevent continuous `eth_getBalance` requests + balance: {}, + disconnect: () => { + provider.wc.killSession() + provider.stop() + }, + }, + } + }, + type: 'sdk', + desktop: true, + mobile: true, + preferred: true, + } +} + +export default patchedWalletConnect diff --git a/src/logic/wallets/utils/walletList.ts b/src/logic/wallets/utils/walletList.ts index adafc5d0de..31c74dcf8a 100644 --- a/src/logic/wallets/utils/walletList.ts +++ b/src/logic/wallets/utils/walletList.ts @@ -1,8 +1,9 @@ -import { WalletInitOptions } from 'bnc-onboard/dist/src/interfaces' +import { WalletInitOptions, WalletSelectModuleOptions } from 'bnc-onboard/dist/src/interfaces' import { getRpcServiceUrl, getDisabledWallets, getChainById } from 'src/config' import { ChainId, WALLETS } from 'src/config/chain.d' import { FORTMATIC_KEY, PORTIS_ID } from 'src/utils/constants' +import patchedWalletConnect from '../patchedWalletConnect' type Wallet = WalletInitOptions & { desktop: boolean @@ -16,14 +17,8 @@ const wallets = (chainId: ChainId): Wallet[] => { return [ { walletName: WALLETS.METAMASK, preferred: true, desktop: false }, - { - walletName: WALLETS.WALLET_CONNECT, - preferred: true, - // `infuraKey` is not mandatory if rpc is provided - rpc: { [chainId]: rpcUrl }, - desktop: true, - bridge: 'https://safe-walletconnect.gnosis.io/', - }, + // A patched version of WalletConnect is spliced in at this index + // { preferred: true, desktop: true } { walletName: WALLETS.TREZOR, appUrl: 'gnosis-safe.io', @@ -71,7 +66,7 @@ const wallets = (chainId: ChainId): Wallet[] => { ] } -export const getSupportedWallets = (chainId: ChainId): WalletInitOptions[] => { +const getPlatformSupportedWallets = (chainId: ChainId): WalletInitOptions[] => { if (window.isDesktop) { return wallets(chainId) .filter(({ desktop }) => desktop) @@ -82,3 +77,15 @@ export const getSupportedWallets = (chainId: ChainId): WalletInitOptions[] => { .map(({ desktop, ...rest }) => rest) .filter(({ walletName }) => !getDisabledWallets().includes(walletName)) } + +export const getSupportedWallets = (chainId: ChainId): WalletSelectModuleOptions['wallets'] => { + const wallets: WalletSelectModuleOptions['wallets'] = getPlatformSupportedWallets(chainId) + + if (!getDisabledWallets().includes(WALLETS.WALLET_CONNECT)) { + const wc = patchedWalletConnect(chainId) + // Inset patched WC module at index 1 + wallets.splice(1, 0, wc) + } + + return wallets +} diff --git a/yarn.lock b/yarn.lock index d36fee100b..6be21aa3b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1885,12 +1885,12 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw== -"@gnosis.pm/safe-apps-provider@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-provider/-/safe-apps-provider-0.5.0.tgz#e0121553ef22c1458eb95cf0afed14e8c2570ae3" - integrity sha512-c4OuKV+cIW2aDmv0DZfLOelmyNNZz5Dr3OG5TvnCfmYhZtHyOd1x6bd2xnROCuiZU+QAUGJsm65mBe6iy8NAVQ== +"@gnosis.pm/safe-apps-provider@^0.9.3": + version "0.9.3" + resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-provider/-/safe-apps-provider-0.9.3.tgz#d8913b0f8abc15fdca229571eefc5f9385c82ea7" + integrity sha512-WzsfEMrOTd7/epEKs7S0QBB+sgw25d1B4SeLCD7q9RYi0vYLaeWT3jTuVXVGqwAlT3tFyedmvXnryLV5SUwiug== dependencies: - "@gnosis.pm/safe-apps-sdk" "3.0.0" + "@gnosis.pm/safe-apps-sdk" "6.2.0" events "^3.3.0" "@gnosis.pm/safe-apps-sdk-v1@npm:@gnosis.pm/safe-apps-sdk@0.4.2": @@ -1898,11 +1898,6 @@ resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-0.4.2.tgz#ae87b2164931c006cb0efdede3d82ff210df1648" integrity sha512-BwA2dyCebPMdi4JhhTkp6EjkhEM6vAIviKdhqHiHnSmL+sDfxtP1jdOuE8ME2/4+5TiLSS8k8qscYjLSlf1LLw== -"@gnosis.pm/safe-apps-sdk@3.0.0", "@gnosis.pm/safe-apps-sdk@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-3.0.0.tgz#0f90185c3693f2683322d275e796e61ff99ce87d" - integrity sha512-dLCSlniYnxEqCglx4XdhByvi7KKuSYRWJKm1lVXAc4oJqwwVkoCwp0bFIejLZ/dnf7cQSBUUVsTGWhvSda511w== - "@gnosis.pm/safe-apps-sdk@6.2.0": version "6.2.0" resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-6.2.0.tgz#05751b4ae4c6cfa7e19839d3655e7d9b5fb72dfe" @@ -1911,6 +1906,14 @@ "@gnosis.pm/safe-react-gateway-sdk" "^2.5.6" ethers "^5.4.7" +"@gnosis.pm/safe-apps-sdk@^6.2.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-6.3.0.tgz#19f8bff136bdfdf9003745e4202e1cb85322e493" + integrity sha512-atUiUj1JEGnZwxDrKbuxfkwPsNQtoxnQqNjvB9cVODxSdR9OiLy5XdW2wz3Y/Gq+sjWc6lAUy3M5ovTY7qmbrg== + dependencies: + "@gnosis.pm/safe-react-gateway-sdk" "^2.8.5" + ethers "^5.4.7" + "@gnosis.pm/safe-core-sdk-types@^0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-core-sdk-types/-/safe-core-sdk-types-0.1.1.tgz#908c394cb4660493b4e9c8e01b5a7aa36efafd30" @@ -1958,6 +1961,13 @@ dependencies: isomorphic-unfetch "^3.1.0" +"@gnosis.pm/safe-react-gateway-sdk@^2.8.5": + version "2.8.5" + resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-react-gateway-sdk/-/safe-react-gateway-sdk-2.8.5.tgz#3b82b993ae64a5fde1a96a4b0c47a97514839055" + integrity sha512-lrZ3gXzbNzIjIzYDs21d7I3fwwHi01YFnD+2+5Kuy0+fJAiONYXih2Z9Q4h3RS/AgzTHfL+G7WB6XB0V8GMVCQ== + dependencies: + isomorphic-unfetch "^3.1.0" + "@hapi/address@2.x.x": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -4275,35 +4285,35 @@ optionalDependencies: dotenv "^8.2.0" -"@walletconnect/browser-utils@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/browser-utils/-/browser-utils-1.6.6.tgz#a985b48c99c65a986a051d66a4910010a10a0c56" - integrity sha512-E29xSHU7Akd4jaPehWVGx7ct+SsUzZbxcGc0fz+Pw6/j4Gh5tlfYZ9XuVixuYI4WPdQ2CmOraj8RrVOu5vba4w== +"@walletconnect/browser-utils@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/browser-utils/-/browser-utils-1.7.1.tgz#2a28846cd4d73166debbbf7d470e78ba25616f5e" + integrity sha512-y6KvxPhi52sWzS0/HtA3EhdgmtG8mXcxdc26YURDOVC/BJh3MxV8E16JFrT4InylOqYJs6dcSLWVfcnJaiPtZw== dependencies: "@walletconnect/safe-json" "1.0.0" - "@walletconnect/types" "^1.6.6" + "@walletconnect/types" "^1.7.1" "@walletconnect/window-getters" "1.0.0" "@walletconnect/window-metadata" "1.0.0" detect-browser "5.2.0" -"@walletconnect/client@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/client/-/client-1.6.6.tgz#ec64575b245bfce25cc0d9150a3c2e919a8a2632" - integrity sha512-DDOrxagSmXCciIEr16hTf4gWZ7PG7GXribYTfOOsjtODLtPEODEEYj/AsmEALjh3ZBG4bN35Vj0F/ZA1D+90GQ== +"@walletconnect/client@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/client/-/client-1.7.1.tgz#aaa74199bdc0605db9ac2ecdf8a463b271586d3b" + integrity sha512-xD8B8s1hL7Z5vJwb3L0u1bCVAk6cRQfIY9ycymf7KkmIhkAONQJNf2Y0C0xIpbPp2fdn9VwnSfLm5Ed/Ht/1IA== dependencies: - "@walletconnect/core" "^1.6.6" - "@walletconnect/iso-crypto" "^1.6.6" - "@walletconnect/types" "^1.6.6" - "@walletconnect/utils" "^1.6.6" + "@walletconnect/core" "^1.7.1" + "@walletconnect/iso-crypto" "^1.7.1" + "@walletconnect/types" "^1.7.1" + "@walletconnect/utils" "^1.7.1" -"@walletconnect/core@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-1.6.6.tgz#0a35a9b0f91da8958bec27be801a510818f4e142" - integrity sha512-pSftIVPY6mYz2koZPBEYmeFeAjVf2MSnRHOM6+vx+iAsUEcfMZHkgeXX6GtM6Fjza+zSZu1qnmdgURVXpmKwtQ== +"@walletconnect/core@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-1.7.1.tgz#321c14d63af81241658b028022e0e5fa6dc7f374" + integrity sha512-qO+4wykyRNiq3HEuaAA2pW2PDnMM4y7pyPAgiCwfHiqF4PpWvtcdB301hI0K5am9ghuqKZMy1HlE9LWNOEBvcw== dependencies: - "@walletconnect/socket-transport" "^1.6.6" - "@walletconnect/types" "^1.6.6" - "@walletconnect/utils" "^1.6.6" + "@walletconnect/socket-transport" "^1.7.1" + "@walletconnect/types" "^1.7.1" + "@walletconnect/utils" "^1.7.1" "@walletconnect/crypto@^1.0.1": version "1.0.1" @@ -4329,24 +4339,24 @@ resolved "https://registry.yarnpkg.com/@walletconnect/environment/-/environment-1.0.0.tgz#c4545869fa9c389ec88c364e1a5f8178e8ab5034" integrity sha512-4BwqyWy6KpSvkocSaV7WR3BlZfrxLbJSLkg+j7Gl6pTDE+U55lLhJvQaMuDVazXYxcjBsG09k7UlH7cGiUI5vQ== -"@walletconnect/http-connection@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/http-connection/-/http-connection-1.6.6.tgz#d5030bf175f24e57901e5da3acff493a3e7df556" - integrity sha512-V0UEnvMQPYBpD+8LAbuxN+i0dWVVfZ8XtmJymsBh2KyHLgKyHSsT5RwSCst132JGDV4/JP4HrHCs5t8KqSfEPw== +"@walletconnect/http-connection@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/http-connection/-/http-connection-1.7.1.tgz#fddddccd70a5c659c6e6ac25ba5305290c158705" + integrity sha512-cz3pw2MsTyBT5hy8qhs67NFHTIFOzltdMx9Hy1ftkjXQYtenxIBzAQpZzF6l/lXC3GmMziueYnknZILo1+wgfg== dependencies: - "@walletconnect/types" "^1.6.6" - "@walletconnect/utils" "^1.6.6" + "@walletconnect/types" "^1.7.1" + "@walletconnect/utils" "^1.7.1" eventemitter3 "4.0.7" xhr2-cookies "1.1.0" -"@walletconnect/iso-crypto@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/iso-crypto/-/iso-crypto-1.6.6.tgz#19848bdcd54e9945961bab8a996cbca8a00d7cf1" - integrity sha512-wRYgKvd8K3A9FVLn2c0cDh4+9OUHkqibKtwQJTJsz+ibPGgd+n5j1/FjnzDDRGb9T1+TtlwYF3ZswKyys3diVQ== +"@walletconnect/iso-crypto@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/iso-crypto/-/iso-crypto-1.7.1.tgz#c463bb5874686c2f21344e2c7f3cf4d71c34ca70" + integrity sha512-qMiW0kLN6KCjnLMD50ijIj1lQqjNjGszGUwrSVUiS2/Dp4Ecx+4QEtHbmVwGEkfx4kelYPFpDJV3ZJpQ4Kqg/g== dependencies: "@walletconnect/crypto" "^1.0.1" - "@walletconnect/types" "^1.6.6" - "@walletconnect/utils" "^1.6.6" + "@walletconnect/types" "^1.7.1" + "@walletconnect/utils" "^1.7.1" "@walletconnect/jsonrpc-types@^1.0.0": version "1.0.0" @@ -4368,14 +4378,14 @@ resolved "https://registry.yarnpkg.com/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz#502cf8ab87330841d794819081e748ebdef7aee5" integrity sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw== -"@walletconnect/qrcode-modal@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/qrcode-modal/-/qrcode-modal-1.6.6.tgz#d95d790a4f0eaee4e8bb024b92ed111a0ee716bd" - integrity sha512-wZorjpOIm6OhXKNvyH1YtpxfCUVcnuJxS8YbUeKWckGjS3tDPqUTbXWPlzFdMpNBrpY3j0B2XjLgVVQ2aUDX0w== +"@walletconnect/qrcode-modal@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/qrcode-modal/-/qrcode-modal-1.7.1.tgz#89b19c2eb6466ec237ccd597388d7a1b1b946067" + integrity sha512-m/4lSx3pgj8V2eHVJcGnxBKUSCNFtyVIcg5tqbSJHi9HjKIBxvRq4D5M4X4yEpgXYtRmTucihxNCrj2zQrmlSQ== dependencies: - "@walletconnect/browser-utils" "^1.6.6" + "@walletconnect/browser-utils" "^1.7.1" "@walletconnect/mobile-registry" "^1.4.0" - "@walletconnect/types" "^1.6.6" + "@walletconnect/types" "^1.7.1" copy-to-clipboard "^3.3.1" preact "10.4.1" qrcode "1.4.4" @@ -4394,43 +4404,43 @@ resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.0.tgz#12eeb11d43795199c045fafde97e3c91646683b2" integrity sha512-QJzp/S/86sUAgWY6eh5MKYmSfZaRpIlmCJdi5uG4DJlKkZrHEF7ye7gA+VtbVzvTtpM/gRwO2plQuiooIeXjfg== -"@walletconnect/socket-transport@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/socket-transport/-/socket-transport-1.6.6.tgz#b80974fe3e2a2f93ba1f6b40df5a0ea492b94086" - integrity sha512-mugCEoeKTx75ogb5ROg/+LA3yGTsuRNcrYgrApceo7WNU9Z4dG8l6ycMPqrrFcODcrasq3NmXVWUYDv/CvrzSw== +"@walletconnect/socket-transport@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/socket-transport/-/socket-transport-1.7.1.tgz#cc4c8dcf21c40b805812ecb066b2abb156fdb146" + integrity sha512-Gu1RPro0eLe+HHtLhq/1T5TNFfO/HW2z3BnWuUYuJ/F8w1U9iK7+4LMHe+LTgwgWy9Ybcb2k0tiO5e3LgjHBHQ== dependencies: - "@walletconnect/types" "^1.6.6" - "@walletconnect/utils" "^1.6.6" + "@walletconnect/types" "^1.7.1" + "@walletconnect/utils" "^1.7.1" ws "7.5.3" -"@walletconnect/types@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.6.6.tgz#8d644e2a390e494e40424c60272e91b4820bf0d4" - integrity sha512-op77cxexOmQQN36XB1sYouNTlBRV0Rup/2NYK8A1ffdwXa3a6HLHHdhBM7I/I9BVmRXoZ4+XoOnPKGGrYtlS3g== +"@walletconnect/types@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.7.1.tgz#86cc3832e02415dc9f518f3dcb5366722afbfc03" + integrity sha512-X0NunEUgq46ExDcKo7BnnFpFhuZ89bZ04/1FtohNziBWcP2Mblp2yf+FN7iwmZiuZ3bRTb8J1O4oJH2JGP9I7A== -"@walletconnect/utils@^1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-1.6.6.tgz#e8e49a5f2c35e4a5f9153b09ad076655f38d8c96" - integrity sha512-s2X/cVXiMDSEoWV6i7HPMbP1obXlzP7KLMrBo9OMabiJKnQEh6HSZ39WLswB2PHnl8Hp1Sr4BdRvhM5kCcYWRw== +"@walletconnect/utils@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-1.7.1.tgz#f858d5f22425a4c2da2a28ae493bde7f2eecf815" + integrity sha512-7Lig9rruqTMaFuwEhBrArq1QgzIf2NuzO6J3sCUYCZh60EQ7uIZjekaDonQjiQJAbfYcgWUBm8qa0PG1TzYN3Q== dependencies: - "@walletconnect/browser-utils" "^1.6.6" + "@walletconnect/browser-utils" "^1.7.1" "@walletconnect/encoding" "^1.0.0" "@walletconnect/jsonrpc-utils" "^1.0.0" - "@walletconnect/types" "^1.6.6" + "@walletconnect/types" "^1.7.1" bn.js "4.11.8" js-sha3 "0.8.0" query-string "6.13.5" -"@walletconnect/web3-provider@^1.6.2": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@walletconnect/web3-provider/-/web3-provider-1.6.6.tgz#7be7b6d6230d6925f8728cdddc226ef24119e602" - integrity sha512-8z4r9JCE0lKuZmVCPSdYnX114ckQ+oMfr9D8osRBtdyhvN9elwITMloUJfACDRelcuet94yEbXuDobQeBDDkkw== - dependencies: - "@walletconnect/client" "^1.6.6" - "@walletconnect/http-connection" "^1.6.6" - "@walletconnect/qrcode-modal" "^1.6.6" - "@walletconnect/types" "^1.6.6" - "@walletconnect/utils" "^1.6.6" +"@walletconnect/web3-provider@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@walletconnect/web3-provider/-/web3-provider-1.7.1.tgz#3b7bf41bfd0198b18f5cc5626e1ec28e931667c7" + integrity sha512-dhoYwQaBVbaKIiELNeCF4kW7Dslbf73wDIsxOF9gmjVch1Qi18kNlqbR03u56iBcAsXU0tAwfd9Z7cGHfUX1Fg== + dependencies: + "@walletconnect/client" "^1.7.1" + "@walletconnect/http-connection" "^1.7.1" + "@walletconnect/qrcode-modal" "^1.7.1" + "@walletconnect/types" "^1.7.1" + "@walletconnect/utils" "^1.7.1" web3-provider-engine "16.0.1" "@walletconnect/window-getters@1.0.0", "@walletconnect/window-getters@^1.0.0": @@ -5995,17 +6005,17 @@ bnb-javascript-sdk-nobroadcast@^2.16.14: uuid "^3.3.2" websocket-stream "^5.5.0" -bnc-onboard@~1.35.3: - version "1.35.3" - resolved "https://registry.yarnpkg.com/bnc-onboard/-/bnc-onboard-1.35.3.tgz#f6e92e4dec1b35bbc808e57032d76c677d7f1ff8" - integrity sha512-9g3Lgfo5Q4VwKdoIDw4Zf+nVMCa16lReb0f+iSmH6CrdiDrN5rRTGMy8qEOxQ/vSNuyHMeL9lVARpLA4s7X5xQ== +bnc-onboard@^1.37.3: + version "1.37.3" + resolved "https://registry.yarnpkg.com/bnc-onboard/-/bnc-onboard-1.37.3.tgz#e4c3ae94ab44b3053a6dea07057447feb9b9da14" + integrity sha512-G5pHatWvJf/r7gB7A38p7BlQfbzNJhND2nr0tPKqGtpXucTZJ0cl0bPvrh2nRNMs22ajd2wG29N88bWrWU5Vcw== dependencies: "@cvbb/eth-keyring" "^1.1.0" "@ensdomains/ensjs" "^2.0.1" "@ethereumjs/common" "^2.0.0" "@ethereumjs/tx" "^3.0.0" - "@gnosis.pm/safe-apps-provider" "^0.5.0" - "@gnosis.pm/safe-apps-sdk" "^3.0.0" + "@gnosis.pm/safe-apps-provider" "^0.9.3" + "@gnosis.pm/safe-apps-sdk" "^6.2.0" "@keystonehq/eth-keyring" "0.9.0" "@ledgerhq/hw-app-eth" "6.8.1" "@ledgerhq/hw-transport-u2f" "^5.21.0" @@ -6015,7 +6025,7 @@ bnc-onboard@~1.35.3: "@shapeshiftoss/hdwallet-keepkey" "^1.15.2" "@shapeshiftoss/hdwallet-keepkey-webusb" "^1.15.2" "@toruslabs/torus-embed" "^1.10.11" - "@walletconnect/web3-provider" "^1.6.2" + "@walletconnect/web3-provider" "^1.7.1" authereum "^0.1.12" bignumber.js "^9.0.0" bnc-sdk "^3.4.1" @@ -6029,7 +6039,7 @@ bnc-onboard@~1.35.3: hdkey "^2.0.1" regenerator-runtime "^0.13.7" trezor-connect "^8.1.9" - walletlink "^2.1.11" + walletlink "^2.4.6" web3-provider-engine "^15.0.4" bnc-sdk@^3.4.1: @@ -6321,7 +6331,7 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@6.0.3, buffer@^6.0.3: +buffer@6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -19602,7 +19612,7 @@ util@^0.11.0: dependencies: inherits "2.0.3" -util@^0.12.0, util@^0.12.4: +util@^0.12.0: version "0.12.4" resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== @@ -19763,15 +19773,14 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.12" -walletlink@^2.1.11: - version "2.2.6" - resolved "https://registry.yarnpkg.com/walletlink/-/walletlink-2.2.6.tgz#cfea3ba94e5ea33e87b0a2f31151a77ee1a59d72" - integrity sha512-4TF1kkpo9aq1QlfKv6jTCEsV8Rc+1RIuXn2EtsTJt9/H02fG3oy7k49sqB4gXZ9CWN48yoXnmSwq1GdkvfYGjw== +walletlink@^2.4.6: + version "2.4.7" + resolved "https://registry.yarnpkg.com/walletlink/-/walletlink-2.4.7.tgz#3dd034f7cd6e9d9f4cc1d677bb951869dc743e20" + integrity sha512-jhLVOMly9oWiSE8mZ4/+uMyVsAKHw71kGbgC1xYp50SQpuLT2pfa6Hiw2VQ0omP/WHsDAPFuBo8hJGxggr768w== dependencies: "@metamask/safe-event-emitter" "2.0.0" bind-decorator "^1.0.11" bn.js "^5.1.1" - buffer "^6.0.3" clsx "^1.1.0" eth-block-tracker "4.4.3" eth-json-rpc-filters "4.2.2" @@ -19782,7 +19791,6 @@ walletlink@^2.1.11: preact "^10.5.9" rxjs "^6.6.3" stream-browserify "^3.0.0" - util "^0.12.4" warning@^4.0.2, warning@^4.0.3: version "4.0.3"