Skip to content

Commit

Permalink
Merge pull request #1627 from AmbireTech/fix/msg-wrong-signer
Browse files Browse the repository at this point in the history
Update expected message for wrong signer
  • Loading branch information
Ivshti authored Jul 3, 2024
2 parents a7e5e22 + 3688965 commit ace9841
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ const Actions = ({
.catch((e) => {
if (isMounted.current) setSigningStatus(null)
console.error(e)
if(!e || !e.message) {
if(!e || !e.message || typeof e.message !== 'string') {
addToast(`Signing error: Unknown error`, { error: true })
} else if (
e.message.includes('must provide an Ethereum address') ||
// used for ambire extension
e.message.includes('must use the current user address to sign')
e.message.includes('the dApp is trying to sign using an address different from the currently selected account')
){
addToast(
`Signing error: not connected with the correct address. Make sure you're connected with ${bundle.signer.address}.`,
Expand Down

0 comments on commit ace9841

Please sign in to comment.