@@ -18,6 +18,7 @@ describe('Sign an arbitrary payload with trading account key', function () {
1818 } ,
1919 } ,
2020 } ;
21+ const stringifiedPayload = JSON . stringify ( payload ) ;
2122 const signature = 'signedPayload123' ;
2223 const walletId = 'myWalletId' ;
2324
@@ -41,9 +42,9 @@ describe('Sign an arbitrary payload with trading account key', function () {
4142 process . env [ 'WALLET_myWalletId_PASSPHRASE' ] = 'mypass' ;
4243 } ) ;
4344
44- it ( 'should return a signed payload' , async function ( ) {
45+ it ( 'should return a signed payload with type as object ' , async function ( ) {
4546 // TODO(GO-1015): unskip test
46- return ;
47+ // return;
4748
4849 // eslint-disable-next-line no-unreachable
4950 const expectedResponse = {
@@ -60,6 +61,25 @@ describe('Sign an arbitrary payload with trading account key', function () {
6061 } as unknown as Request ;
6162 await handleV2OFCSignPayload ( req ) . should . be . resolvedWith ( expectedResponse ) ;
6263 } ) ;
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+ } ) ;
6383} ) ;
6484
6585describe ( 'With the handler to sign an arbitrary payload in external signing mode' , ( ) => {
0 commit comments