Skip to content

Commit

Permalink
Fix tx history to show tx crated with "MAX" amount
Browse files Browse the repository at this point in the history
Resolves #248
  • Loading branch information
herr-seppia committed Apr 4, 2024
1 parent 9c42613 commit e5ce6b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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 crated 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

0 comments on commit e5ce6b0

Please sign in to comment.