File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -791,8 +791,10 @@ export default class MMIController extends EventEmitter {
791791 const updatedMsgParams = { ...msgParams , deferSetAsSigned : isCustodial } ;
792792
793793 if (
794- ! req . method . includes ( 'eth_signTypedData' ) &&
795- ! req . method . includes ( 'personal_sign' )
794+ req . method !== 'eth_signTypedData' &&
795+ req . method !== 'eth_signTypedData_v3' &&
796+ req . method !== 'eth_signTypedData_v4' &&
797+ req . method !== 'personal_sign'
796798 ) {
797799 throw new Error ( 'Unexpected method' ) ;
798800 }
@@ -804,7 +806,7 @@ export default class MMIController extends EventEmitter {
804806 version ,
805807 { parseJsonData : false } ,
806808 ) ;
807- } else if ( req . method . includes ( 'personal_sign' ) ) {
809+ } else if ( req . method === 'personal_sign' ) {
808810 return await this . signatureController . newUnsignedPersonalMessage (
809811 updatedMsgParams as PersonalMessageParams ,
810812 req as OriginalRequest ,
Original file line number Diff line number Diff line change @@ -1798,7 +1798,8 @@ export default class MetamaskController extends EventEmitter {
17981798 `${ this . loggingController . name } :add` ,
17991799 ] ,
18001800 } ) ,
1801- isEthSignEnabled : false ,
1801+ // TODO remove this option
1802+ isEthSignEnabled : ( ) => false ,
18021803 getAllState : this . getState . bind ( this ) ,
18031804 getCurrentChainId : ( ) =>
18041805 this . networkController . state . providerConfig . chainId ,
You can’t perform that action at this time.
0 commit comments