Skip to content

Commit

Permalink
Ignore spent outputs when looking for utxos
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Dec 6, 2023
1 parent 4b514cb commit db8f6ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Angor/Shared/WalletOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ public List<UtxoDataWithPath> FindOutputsForTransaction(long sendAmountat, Accou
.OrderBy(o => o.utxo.blockIndex)
.ThenByDescending(o => o.utxo.value))
{
if (accountInfo.PendingRemove.Any(p => p.outpoint.ToString() == utxoData.utxo.outpoint.ToString()))
{
continue;
}

utxosToSpend.Add(new UtxoDataWithPath { HdPath = utxoData.path, UtxoData = utxoData.utxo });

total += utxoData.utxo.value;
Expand Down

0 comments on commit db8f6ab

Please sign in to comment.