Add GetByOutPoint method
MODIFY
WalletWasabi/Models/CoinsRegistry.cs
WalletWasabi/Models/CoinsRegistry.cs
@@ -41,7 +41,7 @@ namespace WalletWasabi.Models
public SmartCoin GetByOutPoint(OutPoint outpoint)
{
- return AsCoinsView().FirstOrDefault(x => x.GetOutPoint() == outpoint);
+ return AsCoinsView().GetByOutPoint(outpoint);
}
public bool TryAdd(SmartCoin coin)

MODIFY
WalletWasabi/Models/CoinsView.cs
WalletWasabi/Models/CoinsView.cs
@@ -84,6 +84,10 @@ namespace WalletWasabi.Models
{
return new CoinsView(Coins.Where(x => outPoints.Any(y => y == x.GetOutPoint())));
}
+ public SmartCoin GetByOutPoint(OutPoint outpoint)
+ {
+ return Coins.FirstOrDefault(x => x.GetOutPoint() == outpoint);
+ }
public Money TotalAmount()
{

MODIFY
WalletWasabi/Models/ICoinsView.cs
WalletWasabi/Models/ICoinsView.cs
@@ -19,5 +19,6 @@ namespace WalletWasabi.Models
Money TotalAmount();
ICoinsView Unconfirmed();
ICoinsView UnSpent();
+ SmartCoin GetByOutPoint(OutPoint outpoint);
}
}

Add GetByOutPoint method