@@ -2208,6 +2208,8 @@ describe('mempool tests', () => {
2208
2208
const balance0 = await supertest ( api . server ) . get ( url ) ;
2209
2209
expect ( balance0 . body . balance ) . toEqual ( '2000' ) ;
2210
2210
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' ) ;
2211
2213
2212
2214
// STX transfer in mempool
2213
2215
await db . updateMempoolTxs ( {
@@ -2223,6 +2225,8 @@ describe('mempool tests', () => {
2223
2225
const balance1 = await supertest ( api . server ) . get ( url ) ;
2224
2226
expect ( balance1 . body . balance ) . toEqual ( '2000' ) ;
2225
2227
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' ) ;
2226
2230
2227
2231
// Contract call in mempool
2228
2232
await db . updateMempoolTxs ( {
@@ -2242,6 +2246,8 @@ describe('mempool tests', () => {
2242
2246
const balance1b = await supertest ( api . server ) . get ( url ) ;
2243
2247
expect ( balance1b . body . balance ) . toEqual ( '2000' ) ;
2244
2248
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' ) ;
2245
2251
2246
2252
// Sponsored tx in mempool
2247
2253
await db . updateMempoolTxs ( {
@@ -2258,6 +2264,8 @@ describe('mempool tests', () => {
2258
2264
const balance2 = await supertest ( api . server ) . get ( url ) ;
2259
2265
expect ( balance2 . body . balance ) . toEqual ( '2000' ) ;
2260
2266
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' ) ;
2261
2269
2262
2270
// STX received in mempool
2263
2271
await db . updateMempoolTxs ( {
@@ -2273,6 +2281,8 @@ describe('mempool tests', () => {
2273
2281
const balance3 = await supertest ( api . server ) . get ( url ) ;
2274
2282
expect ( balance3 . body . balance ) . toEqual ( '2000' ) ;
2275
2283
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' ) ;
2276
2286
2277
2287
// Confirm all txs
2278
2288
await db . update (
@@ -2317,5 +2327,7 @@ describe('mempool tests', () => {
2317
2327
const balance4 = await supertest ( api . server ) . get ( url ) ;
2318
2328
expect ( balance4 . body . balance ) . toEqual ( '1850' ) ;
2319
2329
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' ) ;
2320
2332
} ) ;
2321
2333
} ) ;
0 commit comments