chia-blockchain icon indicating copy to clipboard operation
chia-blockchain copied to clipboard

[Bug] Fee amount is not listed correctly in wallet

Open neurosis69 opened this issue 1 year ago • 6 comments

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

neurosis69 avatar May 31 '23 06:05 neurosis69

This issue has not been updated in 14 days and is now flagged as stale. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it from auto closing in 7 days.

github-actions[bot] avatar Jun 14 '23 11:06 github-actions[bot]

Please keep this issue open.

neurosis69 avatar Jun 14 '23 11:06 neurosis69

Post to keep this issue open

neurosis69 avatar Jun 27 '23 05:06 neurosis69

This issue has not been updated in 14 days and is now flagged as stale. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it from auto closing in 7 days.

github-actions[bot] avatar Jul 11 '23 11:07 github-actions[bot]

Keep issue open.

neurosis69 avatar Jul 11 '23 11:07 neurosis69

Post to keep this issue open

neurosis69 avatar Jul 25 '23 11:07 neurosis69