Fix tx processing
MODIFY
WalletWasabi/Blockchain/TransactionOutputs/CoinsRegistry.cs
WalletWasabi/Blockchain/TransactionOutputs/CoinsRegistry.cs
@@ -152,6 +152,7 @@ public class CoinsRegistry : ICoinsView
public void Spend(SmartCoin spentCoin, SmartTransaction tx)
{
+ tx.TryAddWalletInput(spentCoin);
spentCoin.SpenderTransaction = tx;
lock (Lock)
{

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
@@ -77,13 +77,7 @@ public class SmartCoin : NotifyPropertyChangedBase, IEquatable<SmartCoin>, IDest
public SmartTransaction? SpenderTransaction
{
get => _spenderTransaction;
- set
- {
- if (value?.TryAddWalletInput(this) is true)
- {
- RaiseAndSetIfChanged(ref _spenderTransaction, value);
- }
- }
+ set => RaiseAndSetIfChanged(ref _spenderTransaction, value);
}
public bool RegisterToHdPubKey()

MODIFY
WalletWasabi/Blockchain/Transactions/SmartTransaction.cs
WalletWasabi/Blockchain/Transactions/SmartTransaction.cs
@@ -227,29 +227,6 @@ public class SmartTransaction : IEquatable<SmartTransaction>
return false;
}
- public bool TryRemoveWalletInput(SmartCoin input)
- {
- if (WalletInputsInternal.Remove(input))
- {
- ForeignInputsCache = null;
- WalletVirtualInputsCache = null;
- return true;
- }
- return false;
- }
-
- public bool TryRemoveWalletOutput(SmartCoin output)
- {
- if (WalletOutputsInternal.Remove(output))
- {
- ForeignOutputsCache = null;
- WalletVirtualOutputsCache = null;
- ForeignVirtualOutputsCache = null;
- return true;
- }
- return false;
- }
-
/// <summary>Update the transaction with the data acquired from another transaction. (For example merge their labels.)</summary>
public bool TryUpdate(SmartTransaction tx)
{

Fix tx processing