Skip to content

Commit

Permalink
fix: WalletConnect multiple instances + increase z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jun 28, 2023
1 parent a42597b commit e69a3a1
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 2,043 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"standard-version": "^9.5.0",
"typescript": "^5.1.3"
"typescript": "^5.1.5"
}
}
4 changes: 2 additions & 2 deletions packages/wallet-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
"@ethersproject/providers": "^5.7.2",
"@lifi/sdk": "^2.1.0",
"@walletconnect/ethereum-provider": "^2.8.4",
"@walletconnect/modal": "^2.5.4",
"@walletconnect/modal": "^2.5.5",
"events": "^3.3.0",
"react": "^18.2.0"
},
"devDependencies": {
"cpy-cli": "^4.2.0",
"typescript": "^5.1.3"
"typescript": "^5.1.5"
},
"eslintConfig": {
"extends": "../../.eslintrc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ export class WalletConnectConnector extends EventEmitter implements Wallet {
}
this.isActivationInProgress = true;

// Reset provider for every connection attempt
const walletConnectProvider = await WalletConnectProvider.init(
this.walletConnectProvider ||= await WalletConnectProvider.init(
this.options,
);
this.provider =
walletConnectProvider as unknown as MockWalletConnectProvider;
this.walletConnectProvider = walletConnectProvider;
this.provider = this
.walletConnectProvider as unknown as MockWalletConnectProvider;

try {
// Open modal
Expand Down
5 changes: 5 additions & 0 deletions packages/wallet-management/src/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const walletConnect: Wallet = new WalletConnectConnector({
.filter((chain) => chain.chainType === ChainType.EVM)
.map((chain) => chain.id),
showQrModal: true,
qrModalOptions: {
themeVariables: {
'--wcm-z-index': '3000',
},
},
},
});

Expand Down
7 changes: 3 additions & 4 deletions packages/widget-embedded/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@
"@mui/lab": "^5.0.0-alpha.134",
"@mui/material": "^5.13.6",
"@opensea/seaport-js": "2.0.4",
"@tanstack/react-query": "^4.29.18",
"@tanstack/react-query": "^4.29.19",
"bignumber.js": "^9.1.1",
"ethers": "^5.7.2",
"events": "^3.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.0",
"web3": "^1.10.0"
"react-router-dom": "^6.14.0"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
Expand All @@ -47,7 +46,7 @@
"esbuild": "^0.18.10",
"rollup": "^3.25.3",
"rollup-plugin-polyfill-node": "^0.12.0",
"typescript": "^5.1.3",
"typescript": "^5.1.5",
"vite": "^4.3.9",
"web-vitals": "^3.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@vitejs/plugin-react": "^4.0.1",
"rollup-plugin-polyfill-node": "^0.12.0",
"typescript": "^5.1.3",
"typescript": "^5.1.5",
"vite": "^4.3.9",
"web-vitals": "^3.3.2"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.134",
"@mui/material": "^5.13.6",
"@tanstack/react-query": "^4.29.18",
"@tanstack/react-query": "^4.29.19",
"@tanstack/react-virtual": "^3.0.0-beta.54",
"big.js": "^6.2.1",
"i18next": "^23.2.3",
Expand All @@ -67,17 +67,17 @@
"mitt": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.0",
"react-hook-form": "^7.45.1",
"react-i18next": "^13.0.1",
"react-intersection-observer": "^9.5.1",
"react-intersection-observer": "^9.5.2",
"react-router-dom": "^6.14.0",
"react-timer-hook": "^3.0.6",
"uuid": "^9.0.0",
"zustand": "^4.3.8"
},
"devDependencies": {
"cpy-cli": "^4.2.0",
"typescript": "^5.1.3"
"typescript": "^5.1.5"
},
"peerDependencies": {
"@types/react": "^18.0.0",
Expand Down
Loading

0 comments on commit e69a3a1

Please sign in to comment.