From d1f9108ad980b244ec4cad099025f6af83ecb2bc Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Thu, 4 Apr 2024 11:37:21 +0200 Subject: [PATCH] Fix tx history to show tx created with "MAX" amount Resolves #248 --- CHANGELOG.md | 5 +++++ src/bin/command/history.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fb835b..78ab343 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/src/bin/command/history.rs b/src/bin/command/history.rs index 7304577..2e8e573 100644 --- a/src/bin/command/history.rs +++ b/src/bin/command/history.rs @@ -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(¬e_hash)) + || t.nullifiers + .iter() + .any(|tx_null| nullifiers.iter().any(|(n, _)| n == tx_null)) }); if let Some((t, tx_id, gas_spent)) = note_creator {