Skip to content

Commit

Permalink
improve 'wallet not connected' error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ps1dr3x committed Nov 30, 2023
1 parent 47136dc commit 67983c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wallet/index.ts
Expand Up @@ -299,6 +299,10 @@ export const isWeb3WalletInstalled = () => {
* @returns Account address
*/
export const getCurrentWalletAddress = async () => {
await connect();
try {
await connect();
} catch (e) {
throw new Error("Wallet not connected. Please connect your wallet.");
}
return walletAddress;
};

0 comments on commit 67983c9

Please sign in to comment.