Skip to content

Commit

Permalink
Add pending coin removal count (Chia-Network#4509)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender authored May 11, 2021
1 parent cbc9141 commit 4fc32cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chia/rpc/wallet_rpc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ async def get_wallet_balance(self, request: Dict) -> Dict:
pending_change = await wallet.get_pending_change_balance()
max_send_amount = await wallet.get_max_send_amount(unspent_records)

unconfirmed_removals: Dict[bytes32, Coin] = await wallet.wallet_state_manager.unconfirmed_removals_for_wallet(
wallet_id
)

wallet_balance = {
"wallet_id": wallet_id,
"confirmed_wallet_balance": balance,
Expand All @@ -457,6 +461,7 @@ async def get_wallet_balance(self, request: Dict) -> Dict:
"pending_change": pending_change,
"max_send_amount": max_send_amount,
"unspent_coin_count": len(unspent_records),
"pending_coin_removal_count": len(unconfirmed_removals),
}

return {"wallet_balance": wallet_balance}
Expand Down

0 comments on commit 4fc32cb

Please sign in to comment.