mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 22:11:48 +01:00
Merge pull request #4034 from dennisreimann/lnurl-controller-refactoring
This commit is contained in:
commit
b0eb0b1de7
3 changed files with 17 additions and 20 deletions
|
@ -23,7 +23,7 @@
|
|||
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.14" />
|
||||
<PackageReference Include="Selenium.Support" Version="4.1.1" />
|
||||
<PackageReference Include="Selenium.WebDriver" Version="4.1.1" />
|
||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="103.0.5060.5300" />
|
||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="104.0.5112.7900" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
|
|
@ -524,8 +524,21 @@ namespace BTCPayServer
|
|||
Url = _linkGenerator.GetUriByAction(HttpContext, "InvoiceReceipt", "UIInvoice", new { invoiceId})
|
||||
};
|
||||
}
|
||||
if (amount.HasValue && string.IsNullOrEmpty(paymentMethodDetails.BOLT11) ||
|
||||
paymentMethodDetails.GeneratedBoltAmount != amount)
|
||||
|
||||
if (amount is null)
|
||||
{
|
||||
return Ok(new LNURLPayRequest
|
||||
{
|
||||
Tag = "payRequest",
|
||||
MinSendable = min,
|
||||
MaxSendable = max,
|
||||
CommentAllowed = lnurlSupportedPaymentMethod.LUD12Enabled ? 2000 : 0,
|
||||
Metadata = metadata,
|
||||
Callback = new Uri(Request.GetCurrentUrl())
|
||||
});
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(paymentMethodDetails.BOLT11) || paymentMethodDetails.GeneratedBoltAmount != amount)
|
||||
{
|
||||
var client =
|
||||
_lightningLikePaymentHandler.CreateLightningClient(
|
||||
|
@ -589,7 +602,7 @@ namespace BTCPayServer
|
|||
});
|
||||
}
|
||||
|
||||
if (amount.HasValue && paymentMethodDetails.GeneratedBoltAmount == amount)
|
||||
if (paymentMethodDetails.GeneratedBoltAmount == amount)
|
||||
{
|
||||
if (lnurlSupportedPaymentMethod.LUD12Enabled && paymentMethodDetails.ProvidedComment != comment)
|
||||
{
|
||||
|
@ -604,19 +617,6 @@ namespace BTCPayServer
|
|||
SuccessAction = successAction
|
||||
});
|
||||
}
|
||||
|
||||
if (amount is null)
|
||||
{
|
||||
return Ok(new LNURLPayRequest
|
||||
{
|
||||
Tag = "payRequest",
|
||||
MinSendable = min,
|
||||
MaxSendable = max,
|
||||
CommentAllowed = lnurlSupportedPaymentMethod.LUD12Enabled ? 2000 : 0,
|
||||
Metadata = metadata,
|
||||
Callback = new Uri(Request.GetCurrentUrl())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(new LNUrlStatusResponse
|
||||
|
|
|
@ -221,9 +221,6 @@
|
|||
<div class="form-check">
|
||||
<input asp-for="AlwaysIncludeNonWitnessUTXO" class="form-check-input"/>
|
||||
<label asp-for="AlwaysIncludeNonWitnessUTXO" class="form-check-label"></label>
|
||||
<a href="https://medium.com/@@jmacato/wasabi-wallets-advisory-for-trezor-users-7d942c727f92" target="_blank" rel="noreferrer noopener">
|
||||
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.SupportRBF)
|
||||
|
|
Loading…
Add table
Reference in a new issue