Catch error for sign message

pull/4910/head
ioedeveloper 5 months ago
parent 6a0f39b384
commit 3a14c763c7
  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