This commit is contained in:
Kukks
2023-08-04 14:27:34 +02:00
parent 5400811c68
commit 646554d5d6
2 changed files with 13 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
<PropertyGroup>
<Product>Wabisabi Coinjoin</Product>
<Description>Allows you to integrate your btcpayserver store with coinjoins.</Description>
<Version>1.0.48</Version>
<Version>1.0.49</Version>
</PropertyGroup>
<!-- Plugin development properties -->

View File

@@ -85,15 +85,22 @@ public class Smartifier
potentialMatches.TryAdd(matchedInput, potentialMatchesForInput.ToArray());
foreach (IndexedTxIn potentialMatchForInput in potentialMatchesForInput)
{
var ti = await CachedTransactions.GetOrAdd(potentialMatchForInput.PrevOut.Hash,
_explorerClient.GetTransactionAsync(DerivationScheme,
potentialMatchForInput.PrevOut.Hash));
TransactionInformation ti = null;
try
{
ti = await CachedTransactions.GetOrAdd(potentialMatchForInput.PrevOut.Hash,
_explorerClient.GetTransactionAsync(DerivationScheme,
potentialMatchForInput.PrevOut.Hash));
}
catch (Exception e)
{
CachedTransactions.Remove(potentialMatchForInput.PrevOut.Hash, out _);
}
if (ti is not null)
{
MatchedOutput found = ti.Outputs.Find(output =>
matchedInput.Index == output.Index &&
matchedInput.Value == output.Value &&
matchedInput.Value.Equals(output.Value) &&
matchedInput.KeyPath == output.KeyPath &&
matchedInput.ScriptPubKey == output.ScriptPubKey
);