File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ import { getStacksTestnetNetwork, testnetKeys } from '../api/routes/debug';
70
70
import {
71
71
getSignature ,
72
72
getStacksNetwork ,
73
+ makePresignHash ,
73
74
} from '../rosetta-helpers' ;
74
75
import { makeSigHashPreSign , MessageSignature } from '@stacks/transactions' ;
75
76
import { decodeBtcAddress } from '@stacks/stacking' ;
@@ -2356,6 +2357,17 @@ describe('Rosetta API', () => {
2356
2357
const expectedResponse = RosettaErrors [ RosettaErrorsTypes . signatureNotVerified ] ;
2357
2358
2358
2359
expect ( JSON . parse ( result . text ) ) . toEqual ( expectedResponse ) ;
2360
+
2361
+ // testing undefined signature
2362
+ const incorrectTransaction = unsignedTransaction ;
2363
+ delete incorrectTransaction . auth . spendingCondition ;
2364
+ const undefinedSignature = getSignature ( incorrectTransaction ) ;
2365
+ expect ( undefinedSignature ) . toBe ( undefined ) ;
2366
+
2367
+ // testing undefined pre sign hash
2368
+ delete incorrectTransaction . auth . authType ;
2369
+ const undefinedPreSignHash = makePresignHash ( incorrectTransaction ) ;
2370
+ expect ( undefinedPreSignHash ) . toBe ( undefined ) ;
2359
2371
} ) ;
2360
2372
2361
2373
test ( 'combine invalid public key' , async ( ) => {
You can’t perform that action at this time.
0 commit comments