@@ -62,8 +62,12 @@ describe('Accelerate: EXTERNAL signing', () => {
6262 services . keyProvider . calls . filter ( ( c ) => c . path === '/sign' ) . should . have . length ( 1 ) ;
6363 services . keyProvider . calls . filter ( ( c ) => c . path === '/key' ) . should . have . length ( 0 ) ;
6464
65- /** BitGo must receive tx/build, block/latest, and tx/send */
66- services . bitgo . calls . filter ( ( c ) => c . path . endsWith ( '/tx/build' ) ) . should . have . length ( 1 ) ;
65+ /** BitGo must receive tx/build with the correct cpfpTxIds, block/latest, and tx/send */
66+ const buildCalls = services . bitgo . calls . filter ( ( c ) => c . path . endsWith ( '/tx/build' ) ) ;
67+ buildCalls . should . have . length ( 1 ) ;
68+ const buildBody = buildCalls [ 0 ] . body as { cpfpTxIds ?: string [ ] } ;
69+ buildBody . should . have . property ( 'cpfpTxIds' ) . which . deepEqual ( [ CPFP_TX_ID ] ) ;
70+
6771 services . bitgo . calls
6872 . filter ( ( c ) => c . path . endsWith ( '/public/block/latest' ) )
6973 . should . have . length ( 1 ) ;
@@ -127,7 +131,12 @@ describe('Accelerate: LOCAL signing', () => {
127131 services . keyProvider . calls . filter ( ( c ) => c . path === '/sign' ) . should . have . length ( 0 ) ;
128132 services . keyProvider . calls . filter ( ( c ) => c . path . startsWith ( '/key/' ) ) . length . should . be . above ( 0 ) ;
129133
130- services . bitgo . calls . filter ( ( c ) => c . path . endsWith ( '/tx/build' ) ) . should . have . length ( 1 ) ;
134+ /** BitGo must receive tx/build with the correct cpfpTxIds, block/latest, and tx/send */
135+ const buildCalls = services . bitgo . calls . filter ( ( c ) => c . path . endsWith ( '/tx/build' ) ) ;
136+ buildCalls . should . have . length ( 1 ) ;
137+ const buildBody = buildCalls [ 0 ] . body as { cpfpTxIds ?: string [ ] } ;
138+ buildBody . should . have . property ( 'cpfpTxIds' ) . which . deepEqual ( [ CPFP_TX_ID ] ) ;
139+
131140 services . bitgo . calls
132141 . filter ( ( c ) => c . path . endsWith ( '/public/block/latest' ) )
133142 . should . have . length ( 1 ) ;
0 commit comments