@@ -116,7 +116,7 @@ export async function signTypedData(signer: string, params: EIP712Params): Promi
116116 return new Promise ( ( resolve , reject ) => {
117117 ( web3 . eth . currentProvider as HttpProvider ) . send ( {
118118 jsonrpc : "2.0" ,
119- method : 'eth_signTypedData ' ,
119+ method : 'eth_signTypedData_v4 ' ,
120120 params : [ signer , params ] ,
121121 } , function ( err : any , result : any ) {
122122 if ( err ) {
@@ -189,7 +189,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
189189 { name : 'revocationList' , type : 'bytes32' } ,
190190 { name : 'revocationKey' , type : 'bytes32' } ,
191191 { name : 'signer' , type : 'address' } ,
192- { name : 'nonce' , type : 'uint ' } ,
192+ { name : 'nonce' , type : 'uint256 ' } ,
193193 ]
194194 break ;
195195 case SignedFunction . CHANGE_STATUS_DELEGATED :
@@ -200,7 +200,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
200200 { name : 'revocationList' , type : 'bytes32' } ,
201201 { name : 'revocationKey' , type : 'bytes32' } ,
202202 { name : 'signer' , type : 'address' } ,
203- { name : 'nonce' , type : 'uint ' } ,
203+ { name : 'nonce' , type : 'uint256 ' } ,
204204 ]
205205 break ;
206206 case SignedFunction . CHANGE_STATUSES_IN_LIST :
@@ -211,7 +211,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
211211 { name : 'revocationList' , type : 'bytes32' } ,
212212 { name : 'revocationKeys' , type : 'bytes32[]' } ,
213213 { name : 'signer' , type : 'address' } ,
214- { name : 'nonce' , type : 'uint ' } ,
214+ { name : 'nonce' , type : 'uint256 ' } ,
215215 ]
216216 break ;
217217 case SignedFunction . CHANGE_STATUSES_IN_LIST_DELEGATED :
@@ -222,7 +222,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
222222 { name : 'revocationList' , type : 'bytes32' } ,
223223 { name : 'revocationKeys' , type : 'bytes32[]' } ,
224224 { name : 'signer' , type : 'address' } ,
225- { name : 'nonce' , type : 'uint ' } ,
225+ { name : 'nonce' , type : 'uint256 ' } ,
226226 ]
227227 break ;
228228 case SignedFunction . CHANGE_LIST_OWNER :
@@ -232,7 +232,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
232232 { name : 'newOwner' , type : 'address' } ,
233233 { name : 'revocationList' , type : 'bytes32' } ,
234234 { name : 'signer' , type : 'address' } ,
235- { name : 'nonce' , type : 'uint ' } ,
235+ { name : 'nonce' , type : 'uint256 ' } ,
236236 ]
237237 break ;
238238 case SignedFunction . ADD_LIST_DELEGATE :
@@ -243,7 +243,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
243243 { name : 'revocationList' , type : 'bytes32' } ,
244244 { name : 'validity' , type : 'uint' } ,
245245 { name : 'signer' , type : 'address' } ,
246- { name : 'nonce' , type : 'uint ' } ,
246+ { name : 'nonce' , type : 'uint256 ' } ,
247247 ]
248248 break ;
249249 case SignedFunction . REMOVE_LIST_DELEGATE :
@@ -253,7 +253,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
253253 { name : 'delegate' , type : 'address' } ,
254254 { name : 'revocationList' , type : 'bytes32' } ,
255255 { name : 'signer' , type : 'address' } ,
256- { name : 'nonce' , type : 'uint ' } ,
256+ { name : 'nonce' , type : 'uint256 ' } ,
257257 ]
258258 break ;
259259 case SignedFunction . CHANGE_LIST_STATUS :
@@ -263,7 +263,7 @@ export function generateEIP712Params(signedFunction: SignedFunction, domainObjec
263263 { name : 'namespace' , type : 'address' } ,
264264 { name : 'revocationList' , type : 'bytes32' } ,
265265 { name : 'signer' , type : 'address' } ,
266- { name : 'nonce' , type : 'uint ' } ,
266+ { name : 'nonce' , type : 'uint256 ' } ,
267267 ]
268268 }
269269 return params ;
0 commit comments