From 6cd9dd7d42b67076e3795431cdbb432e02d5ccdf Mon Sep 17 00:00:00 2001 From: Francois de la Rouviere Date: Tue, 6 Sep 2022 10:04:02 +0100 Subject: [PATCH] Add index to filter --- src/Stratis.Bitcoin.Features.Wallet/WalletRPCController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stratis.Bitcoin.Features.Wallet/WalletRPCController.cs b/src/Stratis.Bitcoin.Features.Wallet/WalletRPCController.cs index 8b4101cf6e..708ef3a9d5 100644 --- a/src/Stratis.Bitcoin.Features.Wallet/WalletRPCController.cs +++ b/src/Stratis.Bitcoin.Features.Wallet/WalletRPCController.cs @@ -785,7 +785,7 @@ public UnspentCoinModel[] ListUnspent(int minConfirmations = 1, int maxConfirmat // Check if the transaction is already in the list. // The node operator could be using the wallet for both "actual" and watch only accounts. - if (unspentCoins.Any(u => u.Id == spendableTx.Transaction.Id)) + if (unspentCoins.Any(u => u.Id == spendableTx.Transaction.Id && u.Index == spendableTx.Transaction.Index)) continue; unspentCoins.Add(new UnspentCoinModel()