mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
[MMI] Fix signed messages from non custodial accounts (#20506)
* Alter behaviour in MMI controller to use the original code path for signed messages that are from non custodial accounts * Improved readability * Removed unused import --------- Co-authored-by: Shane Terence Odlum <shane.odlum@consensys.net>
This commit is contained in:
parent
486ade85f3
commit
5e617ce808
@ -578,7 +578,12 @@ export default class MMIController extends EventEmitter {
|
||||
}
|
||||
|
||||
async newUnsignedMessage(msgParams, req, version) {
|
||||
const updatedMsgParams = { ...msgParams, deferSetAsSigned: true };
|
||||
// The code path triggered by deferSetAsSigned: true is for custodial accounts
|
||||
const accountDetails = this.custodyController.getAccountDetails(
|
||||
msgParams.from,
|
||||
);
|
||||
const isCustodial = Boolean(accountDetails);
|
||||
const updatedMsgParams = { ...msgParams, deferSetAsSigned: isCustodial };
|
||||
|
||||
if (req.method.includes('eth_signTypedData')) {
|
||||
return await this.signatureController.newUnsignedTypedMessage(
|
||||
|
Loading…
Reference in New Issue
Block a user