Skip to content

Commit

Permalink
Fix walletconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
samuveth committed Aug 4, 2022
1 parent 2e6c481 commit a9cc7ec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions connectors/walletconnect.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const get = () => import(/* webpackChunkName: "walletconnect" */ '@walletconnect/web3-provider');
import LockConnector from '../src/connector';

export default class Connector extends LockConnector {
async connect() {
let provider;
let provider;
try {
let WalletConnectProvider = (await get()).default;
if (WalletConnectProvider.default)
WalletConnectProvider = WalletConnectProvider.default;
provider = new WalletConnectProvider(this.options);
const WalletConnectProvider = await import(
"@walletconnect/web3-provider/dist/umd/index.min.js"!
);
provider = new WalletConnectProvider.default(this.options);
await provider.enable();
} catch (e) {
console.error(e);
return;
}
provider.connectorName = 'walletconnect';
provider.connectorName = "walletconnect";
return provider;
}


logout() {
if (localStorage) {
localStorage.removeItem('walletconnect');
Expand Down

0 comments on commit a9cc7ec

Please sign in to comment.