diff --git a/.changeset/light-parents-drum.md b/.changeset/light-parents-drum.md new file mode 100644 index 0000000..5936a9a --- /dev/null +++ b/.changeset/light-parents-drum.md @@ -0,0 +1,5 @@ +--- +"@babylonlabs-io/bbn-wallet-connect": minor +--- + +add external connectors diff --git a/src/core/wallets/bbn/keplr/provider.ts b/src/core/wallets/bbn/keplr/provider.ts index 29b84df..05a90a4 100644 --- a/src/core/wallets/bbn/keplr/provider.ts +++ b/src/core/wallets/bbn/keplr/provider.ts @@ -31,7 +31,7 @@ export class KeplrProvider extends BBNProvider { this.rpc = config.rpc; } - async connectWallet(): Promise { + async connectWallet(): Promise { if (!this.chainId) throw new Error("Chain ID is not initialized"); if (!this.rpc) throw new Error("RPC URL is not initialized"); @@ -49,7 +49,6 @@ export class KeplrProvider extends BBNProvider { publicKeyHex: Buffer.from(key.pubKey).toString("hex"), address: bech32Address, }; - return this; } else { throw new Error("Could not connect to Keplr"); } diff --git a/src/core/wallets/btc/okx/provider.ts b/src/core/wallets/btc/okx/provider.ts index 050b34f..2cbc418 100644 --- a/src/core/wallets/btc/okx/provider.ts +++ b/src/core/wallets/btc/okx/provider.ts @@ -33,7 +33,7 @@ export class OKXProvider extends BTCProvider { this.provider = wallet[providerName]; } - connectWallet = async (): Promise => { + connectWallet = async (): Promise => { try { await this.wallet.enable(); // Connect to OKX Wallet extension } catch (error) { @@ -60,7 +60,6 @@ export class OKXProvider extends BTCProvider { publicKeyHex: compressedPublicKey, address, }; - return this; } else { throw new Error("Could not connect to OKX Wallet"); }