@@ -32,6 +32,8 @@ import {
3232 SendManyOptions ,
3333 PopulatedIntent ,
3434 TxRequestVersion ,
35+ WalletSignMessageOptions ,
36+ WalletSignTypedDataOptions ,
3537} from '@bitgo/sdk-core' ;
3638
3739import { TestBitGo } from '@bitgo/sdk-test' ;
@@ -3334,8 +3336,8 @@ describe('V2 Wallet:', function () {
33343336 prv : 'secretKey' ,
33353337 } ) ;
33363338 signMessage . should . deepEqual ( expectedWithCoinField ) ;
3337- const actualArg = signMessageTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3338- actualArg . message . messageEncoded . should . equal (
3339+ const actualArg = signMessageTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignMessageOptions ;
3340+ actualArg . message ? .messageEncoded ? .should . equal (
33393341 `\u0019Ethereum Signed Message:\n${ messageRaw . length } ${ messageRaw } `
33403342 ) ;
33413343 } ) ;
@@ -3351,8 +3353,8 @@ describe('V2 Wallet:', function () {
33513353 prv : 'secretKey' ,
33523354 } ) ;
33533355 signMessage . should . deepEqual ( expectedWithCoinField ) ;
3354- const actualArg = signMessageTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3355- actualArg . message . messageEncoded . should . equal (
3356+ const actualArg = signMessageTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignMessageOptions ;
3357+ actualArg . message ? .messageEncoded ? .should . equal (
33563358 `\u0019Ethereum Signed Message:\n${ messageRaw . length } ${ messageRaw } `
33573359 ) ;
33583360 } ) ;
@@ -3367,8 +3369,8 @@ describe('V2 Wallet:', function () {
33673369 prv : 'secretKey' ,
33683370 } ) ;
33693371 signMessage . should . deepEqual ( expectedWithCoinField ) ;
3370- const actualArg = signMessageTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3371- actualArg . message . messageEncoded . should . equal (
3372+ const actualArg = signMessageTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignMessageOptions ;
3373+ actualArg . message ? .messageEncoded ? .should . equal (
33723374 `\u0019Ethereum Signed Message:\n${ messageRaw . length } ${ messageRaw } `
33733375 ) ;
33743376 } ) ;
@@ -3530,8 +3532,8 @@ describe('V2 Wallet:', function () {
35303532 prv : 'secretKey' ,
35313533 } ) ;
35323534 signedTypedData . should . deepEqual ( expected ) ;
3533- const actualArg = signTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3534- actualArg . typedData . typedDataEncoded . toString ( 'hex' ) . should . equal ( txHash ) ;
3535+ const actualArg = signTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignTypedDataOptions ;
3536+ actualArg . typedData ? .typedDataEncoded ? .toString ( 'hex' ) . should . equal ( txHash ) ;
35353537 } ) ;
35363538
35373539 it ( 'should sign typed data V3 when custodianMessageID is provided' , async function ( ) {
@@ -3552,8 +3554,8 @@ describe('V2 Wallet:', function () {
35523554 prv : 'secretKey' ,
35533555 } ) ;
35543556 signedTypedData . should . deepEqual ( expected ) ;
3555- const actualArg = signTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3556- actualArg . typedData . typedDataEncoded . toString ( 'hex' ) . should . equal ( txHash ) ;
3557+ const actualArg = signTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignTypedDataOptions ;
3558+ actualArg . typedData ? .typedDataEncoded ? .toString ( 'hex' ) . should . equal ( txHash ) ;
35573559 } ) ;
35583560
35593561 it ( 'should fail to sign typed data V3 with empty prv' , async function ( ) {
@@ -3577,8 +3579,8 @@ describe('V2 Wallet:', function () {
35773579 prv : 'secretKey' ,
35783580 } ) ;
35793581 signedTypedData . should . deepEqual ( expected ) ;
3580- const actualArg = signedTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3581- actualArg . typedData . typedDataEncoded . toString ( 'hex' ) . should . equal ( txHash ) ;
3582+ const actualArg = signedTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignTypedDataOptions ;
3583+ actualArg . typedData ? .typedDataEncoded ? .toString ( 'hex' ) . should . equal ( txHash ) ;
35823584 } ) ;
35833585 } ) ;
35843586
@@ -3643,8 +3645,8 @@ describe('V2 Wallet:', function () {
36433645 prv : 'secretKey' ,
36443646 } ) ;
36453647 signedTypedData . should . deepEqual ( expected ) ;
3646- const actualArg = signedTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] ;
3647- actualArg . typedData . typedDataEncoded . toString ( 'hex' ) . should . equal ( txHash ) ;
3648+ const actualArg = signedTypedDataTssSpy . getCalls ( ) [ 0 ] . args [ 0 ] as WalletSignTypedDataOptions ;
3649+ actualArg . typedData ? .typedDataEncoded ? .toString ( 'hex' ) . should . equal ( txHash ) ;
36483650 } ) ;
36493651 } ) ;
36503652 } ) ;
0 commit comments