Skip to content

[Bug] Fee amount is not listed correctly in wallet #15406

Open
@neurosis69

Description

@neurosis69

What happened?

For chia rpc wallet get_farmed_amount the fees are calculated on the fly and listed correctly.

But for other commands like

  • chia rpc wallet get_transactions '{"wallet_id": 1}' or
  • chia wallet get_transactions
    the fee_amount is always zero, but shown as part of the actual amount.

This is already the case in the wallet db table transaction_record:

sqlite> select chia_amount_int(amount) as amount, chia_amount_int(fee_amount) fee_amount from transaction_record where wallet_id=1 and type=3;
amount|fee_amount
250000000000|0
250000000000|0
250000300020|0
250000000000|0
250000000000|0

I've found the following code lines where the fee_amount is hard coded to 0 when preparing the transaction record for the insert:

https://github.com/Chia-Network/chia-blockchain/blob/d36703337a9164ad36ab15772e85ae2cf7ebfc34/chia/wallet/wallet_state_manager.py#LL1158-L1158
https://github.com/Chia-Network/chia-blockchain/blob/d36703337a9164ad36ab15772e85ae2cf7ebfc34/chia/wallet/wallet_state_manager.py#LL1175-L1175
https://github.com/Chia-Network/chia-blockchain/blob/d36703337a9164ad36ab15772e85ae2cf7ebfc34/chia/wallet/wallet_state_manager.py#LL1219-L1219
https://github.com/Chia-Network/chia-blockchain/blob/d36703337a9164ad36ab15772e85ae2cf7ebfc34/chia/wallet/wallet_state_manager.py#LL1501-L1501

Version

1.8.1

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions