@@ -2208,6 +2208,8 @@ describe('mempool tests', () => {
22082208 const balance0 = await supertest ( api . server ) . get ( url ) ;
22092209 expect ( balance0 . body . balance ) . toEqual ( '2000' ) ;
22102210 expect ( balance0 . body . estimated_balance ) . toEqual ( '2000' ) ;
2211+ expect ( balance0 . body . pending_balance_inbound ) . toEqual ( '0' ) ;
2212+ expect ( balance0 . body . pending_balance_outbound ) . toEqual ( '0' ) ;
22112213
22122214 // STX transfer in mempool
22132215 await db . updateMempoolTxs ( {
@@ -2223,6 +2225,8 @@ describe('mempool tests', () => {
22232225 const balance1 = await supertest ( api . server ) . get ( url ) ;
22242226 expect ( balance1 . body . balance ) . toEqual ( '2000' ) ;
22252227 expect ( balance1 . body . estimated_balance ) . toEqual ( '1850' ) ; // Minus amount and fee
2228+ expect ( balance1 . body . pending_balance_inbound ) . toEqual ( '0' ) ;
2229+ expect ( balance1 . body . pending_balance_outbound ) . toEqual ( '150' ) ;
22262230
22272231 // Contract call in mempool
22282232 await db . updateMempoolTxs ( {
@@ -2242,6 +2246,8 @@ describe('mempool tests', () => {
22422246 const balance1b = await supertest ( api . server ) . get ( url ) ;
22432247 expect ( balance1b . body . balance ) . toEqual ( '2000' ) ;
22442248 expect ( balance1b . body . estimated_balance ) . toEqual ( '1800' ) ; // Minus fee
2249+ expect ( balance1b . body . pending_balance_inbound ) . toEqual ( '0' ) ;
2250+ expect ( balance1b . body . pending_balance_outbound ) . toEqual ( '200' ) ;
22452251
22462252 // Sponsored tx in mempool
22472253 await db . updateMempoolTxs ( {
@@ -2258,6 +2264,8 @@ describe('mempool tests', () => {
22582264 const balance2 = await supertest ( api . server ) . get ( url ) ;
22592265 expect ( balance2 . body . balance ) . toEqual ( '2000' ) ;
22602266 expect ( balance2 . body . estimated_balance ) . toEqual ( '1750' ) ; // Minus fee
2267+ expect ( balance2 . body . pending_balance_inbound ) . toEqual ( '0' ) ;
2268+ expect ( balance2 . body . pending_balance_outbound ) . toEqual ( '250' ) ;
22612269
22622270 // STX received in mempool
22632271 await db . updateMempoolTxs ( {
@@ -2273,6 +2281,8 @@ describe('mempool tests', () => {
22732281 const balance3 = await supertest ( api . server ) . get ( url ) ;
22742282 expect ( balance3 . body . balance ) . toEqual ( '2000' ) ;
22752283 expect ( balance3 . body . estimated_balance ) . toEqual ( '1850' ) ; // Plus amount
2284+ expect ( balance3 . body . pending_balance_inbound ) . toEqual ( '100' ) ;
2285+ expect ( balance3 . body . pending_balance_outbound ) . toEqual ( '250' ) ;
22762286
22772287 // Confirm all txs
22782288 await db . update (
@@ -2317,5 +2327,7 @@ describe('mempool tests', () => {
23172327 const balance4 = await supertest ( api . server ) . get ( url ) ;
23182328 expect ( balance4 . body . balance ) . toEqual ( '1850' ) ;
23192329 expect ( balance4 . body . estimated_balance ) . toEqual ( '1850' ) ;
2330+ expect ( balance4 . body . pending_balance_inbound ) . toEqual ( '0' ) ;
2331+ expect ( balance4 . body . pending_balance_outbound ) . toEqual ( '0' ) ;
23202332 } ) ;
23212333} ) ;
0 commit comments