mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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) {
|
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')) {
|
if (req.method.includes('eth_signTypedData')) {
|
||||||
return await this.signatureController.newUnsignedTypedMessage(
|
return await this.signatureController.newUnsignedTypedMessage(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user