mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix TypeError when signTypedData
throws (#9596)
If the `signTypedData` background function threw an exception, it would return `undefined` to the UI, which would throw another exception in the UI. It now re-throws the error if an error is thrown, which allows the UI to handle the error. I'm not sure why this might fail, and I'm not sure we're handling this failure well, but this is an improvement at least.
This commit is contained in:
parent
7a1d93002d
commit
320e8c0af9
@ -1414,7 +1414,7 @@ export default class MetamaskController extends EventEmitter {
|
||||
} catch (error) {
|
||||
log.info('MetaMaskController - eth_signTypedData failed.', error)
|
||||
this.typedMessageManager.errorMessage(msgId, error)
|
||||
return undefined
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user