Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Fix tx history to show tx created with "MAX" amount #249

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix tx history to show tx created with "MAX" amount [#248]

## [0.22.1] - 2024-3-27

### Added
Expand Down Expand Up @@ -494,6 +498,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Implementation of `Store` trait from `wallet-core`
- Implementation of `State` and `Prover` traits from `wallet-core`

[#248]: https://github.com/dusk-network/wallet-cli/issues/248
[#244]: https://github.com/dusk-network/wallet-cli/issues/244
[#243]: https://github.com/dusk-network/wallet-cli/issues/243
[#238]: https://github.com/dusk-network/wallet-cli/issues/238
Expand Down
3 changes: 3 additions & 0 deletions src/bin/command/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ pub(crate) async fn transaction_from_notes(
// Looking for the transaction which created the note
let note_creator = txs.iter().find(|(t, _, _)| {
t.outputs().iter().any(|&n| n.hash().eq(&note_hash))
|| t.nullifiers
.iter()
.any(|tx_null| nullifiers.iter().any(|(n, _)| n == tx_null))
});

if let Some((t, tx_id, gas_spent)) = note_creator {
Expand Down