@@ -360,6 +360,7 @@ describe('simple-keyring', function () {
360
360
it ( 'returns the expected value if invalid version is given' , async function ( ) {
361
361
await keyring . deserialize ( [ privKeyHex ] ) ;
362
362
const signature = await keyring . signTypedData ( address , typedData , {
363
+ // @ts -expect-error: intentionally passing invalid version
363
364
version : 'FOO' ,
364
365
} ) ;
365
366
expect ( signature ) . toBe ( expectedSignature ) ;
@@ -390,7 +391,7 @@ describe('simple-keyring', function () {
390
391
it ( 'works via `V1` string' , async function ( ) {
391
392
await keyring . deserialize ( [ privKeyHex ] ) ;
392
393
const signature = await keyring . signTypedData ( address , typedData , {
393
- version : 'V1' ,
394
+ version : SignTypedDataVersion . V1 ,
394
395
} ) ;
395
396
expect ( signature ) . toBe ( expectedSignature ) ;
396
397
const restored = recoverTypedSignature ( {
@@ -446,7 +447,7 @@ describe('simple-keyring', function () {
446
447
447
448
await keyring . deserialize ( [ privKeyHex ] ) ;
448
449
const signature = await keyring . signTypedData ( address , typedData , {
449
- version : 'V3' ,
450
+ version : SignTypedDataVersion . V3 ,
450
451
} ) ;
451
452
const restored = recoverTypedSignature ( {
452
453
data : typedData ,
@@ -506,7 +507,7 @@ describe('simple-keyring', function () {
506
507
const address = ( await keyring . getAccounts ( ) ) [ 0 ] ;
507
508
assert ( address , 'address is undefined' ) ;
508
509
const signature = await keyring . signTypedData ( address , typedData , {
509
- version : 'V3' ,
510
+ version : SignTypedDataVersion . V3 ,
510
511
} ) ;
511
512
expect ( signature ) . toBe ( expectedSignature ) ;
512
513
const restored = recoverTypedSignature ( {
@@ -535,7 +536,7 @@ describe('simple-keyring', function () {
535
536
536
537
await keyring . deserialize ( [ privKeyHex ] ) ;
537
538
const signature = await keyring . signTypedData ( address , typedData , {
538
- version : 'V4' ,
539
+ version : SignTypedDataVersion . V4 ,
539
540
} ) ;
540
541
const restored = recoverTypedSignature ( {
541
542
data : typedData ,
@@ -734,7 +735,7 @@ describe('simple-keyring', function () {
734
735
const address = ( await keyring . getAccounts ( ) ) [ 0 ] ;
735
736
assert ( address , 'address is undefined' ) ;
736
737
const signature = await keyring . signTypedData ( address , typedData , {
737
- version : 'V4' ,
738
+ version : SignTypedDataVersion . V4 ,
738
739
} ) ;
739
740
expect ( signature ) . toBe ( expectedSignature ) ;
740
741
const restored = recoverTypedSignature ( {
0 commit comments