@@ -18,6 +18,7 @@ describe('Sign an arbitrary payload with trading account key', function () {
18
18
} ,
19
19
} ,
20
20
} ;
21
+ const stringifiedPayload = JSON . stringify ( payload ) ;
21
22
const signature = 'signedPayload123' ;
22
23
const walletId = 'myWalletId' ;
23
24
@@ -41,7 +42,7 @@ describe('Sign an arbitrary payload with trading account key', function () {
41
42
process . env [ 'WALLET_myWalletId_PASSPHRASE' ] = 'mypass' ;
42
43
} ) ;
43
44
44
- it ( 'should return a signed payload' , async function ( ) {
45
+ it ( 'should return a signed payload with type as object ' , async function ( ) {
45
46
// TODO(GO-1015): unskip test
46
47
return ;
47
48
@@ -60,6 +61,25 @@ describe('Sign an arbitrary payload with trading account key', function () {
60
61
} as unknown as Request ;
61
62
await handleV2OFCSignPayload ( req ) . should . be . resolvedWith ( expectedResponse ) ;
62
63
} ) ;
64
+ it ( 'should return a signed payload with type as json string' , async function ( ) {
65
+ // TODO(GO-1015): unskip test
66
+ return ;
67
+
68
+ // eslint-disable-next-line no-unreachable
69
+ const expectedResponse = {
70
+ payload : stringifiedPayload ,
71
+ signature,
72
+ } ;
73
+ const req = {
74
+ bitgo : bitGoStub ,
75
+ body : {
76
+ payload : stringifiedPayload ,
77
+ walletId,
78
+ } ,
79
+ query : { } ,
80
+ } as unknown as Request ;
81
+ await handleV2OFCSignPayload ( req ) . should . be . resolvedWith ( expectedResponse ) ;
82
+ } ) ;
63
83
} ) ;
64
84
65
85
describe ( 'With the handler to sign an arbitrary payload in external signing mode' , ( ) => {
0 commit comments