Skip to content

Commit

Permalink
fix: walletconnect import on CDN builds (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnoW authored Jan 20, 2022
1 parent f2b2470 commit 08629c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Web3Connector/WalletConnectWeb3Connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class WalletConnectWeb3Connector extends AbstractWeb3Connector {
// Do nothing. User might not need walletconnect
}

if (!WalletConnectProvider) {
WalletConnectProvider = window.WalletConnectProvider.default;
}

if (!WalletConnectProvider) {
throw new Error(
'Cannot enable WalletConnect: dependency "@walletconnect/web3-provider" is missing'
Expand Down

0 comments on commit 08629c9

Please sign in to comment.