Merge pull request #4910 from ethereum/fix-sign-message

Catch error for sign message
pull/4912/head
David Disu 5 months ago committed by GitHub
commit e785e6c2c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      libs/remix-ui/run-tab/src/lib/actions/account.ts

@ -89,7 +89,8 @@ export const createNewBlockchainAccount = async (plugin: RunTab, dispatch: React
export const signMessageWithAddress = (plugin: RunTab, dispatch: React.Dispatch<any>, account: string, message: string, modalContent: (hash: string, data: string) => JSX.Element, passphrase?: string) => {
plugin.blockchain.signMessage(message, account, passphrase, (err, msgHash, signedData) => {
if (err) {
return plugin.call('notification', 'toast', err)
console.error(err)
return plugin.call('notification', 'toast', typeof err === 'string' ? err : err.message)
}
dispatch(displayNotification('Signed Message', modalContent(msgHash, signedData), 'OK', null, () => {}, null))
})

Loading…
Cancel
Save