Fix: Payments to Top-Up could be undetected due to race condition (#5568)

This commit is contained in:
Nicolas Dorier
2023-12-20 18:41:28 +09:00
committed by GitHub
parent 8da04fd7e2
commit 3fc687a2d4
9 changed files with 284 additions and 204 deletions

View File

@@ -50,6 +50,7 @@ namespace BTCPayServer.Data
public static StoreBlob GetStoreBlob(this StoreData storeData)
{
ArgumentNullException.ThrowIfNull(storeData);
var result = storeData.StoreBlob == null ? new StoreBlob() : new Serializer(null).ToObject<StoreBlob>(storeData.StoreBlob);
if (result.PreferredExchange == null)
result.PreferredExchange = result.GetRecommendedExchange();