Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
totraev committed Nov 21, 2024
1 parent 865ffdf commit dfd0704
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/WalletConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export class WalletConnector<N extends string, P extends IProvider> implements I
async connect(walletId: string) {
const wallet = this.wallets.find((wallet) => wallet.id === walletId);

this._connectedWallet = (await wallet?.connect()) ?? null;
if (!wallet) {
throw new Error("Wallet not found");
}

this._connectedWallet = await wallet.connect();

return this.connectedWallet;
}
Expand Down

0 comments on commit dfd0704

Please sign in to comment.