Skip to content

Commit

Permalink
v16.2.15: fix metamask WC2 connection (identifying supported blockcha…
Browse files Browse the repository at this point in the history
…ins)
  • Loading branch information
10xSebastian committed Sep 23, 2023
1 parent f8f796c commit fdd239e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ class WalletConnectV2 {
async setSessionBlockchains() {
if(!this.session || !_optionalChain$1([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155])) { return }
if(_optionalChain$1([CONFIGURATIONS, 'access', _30 => _30[this.walletName], 'optionalAccess', _31 => _31.methods, 'optionalAccess', _32 => _32.includes, 'call', _33 => _33('wallet_switchEthereumChain')])) {
this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$1([Blockchains, 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$1([Blockchains, 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
} else if(this.session.namespaces.eip155.chains) {
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$1([Blockchains, 'access', _37 => _37.findByNetworkId, 'call', _38 => _38(chainIdentifier.split(':')[1]), 'optionalAccess', _39 => _39.name])).filter(Boolean);
} else if(this.session.namespaces.eip155.accounts) {
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@
async setSessionBlockchains() {
if(!this.session || !_optionalChain$1([this, 'access', _27 => _27.session, 'optionalAccess', _28 => _28.namespaces, 'optionalAccess', _29 => _29.eip155])) { return }
if(_optionalChain$1([CONFIGURATIONS, 'access', _30 => _30[this.walletName], 'optionalAccess', _31 => _31.methods, 'optionalAccess', _32 => _32.includes, 'call', _33 => _33('wallet_switchEthereumChain')])) {
this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$1([Blockchains__default['default'], 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$1([Blockchains__default['default'], 'access', _34 => _34.findByNetworkId, 'call', _35 => _35(chainIdentifier.split(':')[1]), 'optionalAccess', _36 => _36.name])).filter(Boolean);
} else if(this.session.namespaces.eip155.chains) {
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$1([Blockchains__default['default'], 'access', _37 => _37.findByNetworkId, 'call', _38 => _38(chainIdentifier.split(':')[1]), 'optionalAccess', _39 => _39.name])).filter(Boolean);
} else if(this.session.namespaces.eip155.accounts) {
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-evm",
"moduleName": "Web3Wallets",
"version": "16.2.14",
"version": "16.2.15",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets",
"moduleName": "Web3Wallets",
"version": "16.2.14",
"version": "16.2.15",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-solana",
"moduleName": "Web3Wallets",
"version": "16.2.14",
"version": "16.2.15",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand Down
2 changes: 1 addition & 1 deletion src/wallets/WalletConnectV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class WalletConnectV2 {
async setSessionBlockchains() {
if(!this.session || !this.session?.namespaces?.eip155) { return }
if(CONFIGURATIONS[this.walletName]?.methods?.includes('wallet_switchEthereumChain')) {
this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>Blockchains.findByNetworkId(chainIdentifier.split(':')[1])?.name).filter(Boolean)
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>Blockchains.findByNetworkId(chainIdentifier.split(':')[1])?.name).filter(Boolean)
} else if(this.session.namespaces.eip155.chains) {
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>Blockchains.findByNetworkId(chainIdentifier.split(':')[1])?.name).filter(Boolean)
} else if(this.session.namespaces.eip155.accounts) {
Expand Down

0 comments on commit fdd239e

Please sign in to comment.