Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
terryli0095 committed Sep 20, 2024
1 parent 4e1c385 commit 1806c54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wondrous-bot-admin/src/services/web3/useWeb3Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ const useWeb3Auth = ({ setErrorMessage }) => {
setIsActivating(false);
disconnect();
}
if (result === 'Wallet already connected'){
setErrorMessage('Wallet is already connected to another account');
onFail();
setIsActivating(false);
disconnect();
}
} else if (!signedMessageIsString(signedMessage)) {
setIsActivating(false);
setErrorMessage("Signature rejected. Try again.");
Expand Down

0 comments on commit 1806c54

Please sign in to comment.