update blink

This commit is contained in:
Kukks
2024-02-28 13:03:11 +00:00
parent ef1475d401
commit abd5e3bcf9
2 changed files with 6 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
<PropertyGroup> <PropertyGroup>
<Product>Blink</Product> <Product>Blink</Product>
<Description>Blink Lightning support</Description> <Description>Blink Lightning support</Description>
<Version>1.0.6</Version> <Version>1.0.7</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>BTCPayServer.Plugins.Blink</RootNamespace> <RootNamespace>BTCPayServer.Plugins.Blink</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@@ -624,6 +624,11 @@ mutation LnInvoicePaymentSend($input: LnInvoicePaymentInput!) {
null => PayResult.Unknown, null => PayResult.Unknown,
_ => throw new ArgumentOutOfRangeException() _ => throw new ArgumentOutOfRangeException()
}; };
if (result.Result == PayResult.Error && response.TryGetValue("errors", out var error) && error.ToString().Contains("ResourceAttemptsRedlockServiceError", StringComparison.InvariantCultureIgnoreCase))
{
await Task.Delay(Random.Shared.Next(200, 600), cts.Token);
return await Pay(bolt11, payParams, cts.Token);
}
if (response["transaction"]?.Value<JObject>() is not null) if (response["transaction"]?.Value<JObject>() is not null)
{ {
result.Details = new PayDetails() result.Details = new PayDetails()