mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-19 00:24:25 +01:00
direct call to pay type instance
This commit is contained in:
@@ -154,7 +154,7 @@ public class Zapper : IHostedService
|
||||
{
|
||||
if (arg.EventCode != InvoiceEventCode.Completed && arg.EventCode != InvoiceEventCode.MarkedCompleted)
|
||||
return;
|
||||
var pm = arg.Invoice.GetPaymentMethod(new PaymentMethodId("BTC", PaymentTypes.LNURLPay));
|
||||
var pm = arg.Invoice.GetPaymentMethod(new PaymentMethodId("BTC", LNURLPayPaymentType.Instance));
|
||||
if (pm is null)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace BTCPayServer.Plugins.Prism
|
||||
var store = await _storeRepository.FindStore(payout.StoreDataId);
|
||||
|
||||
var network = _btcPayNetworkProvider.GetNetwork<BTCPayNetwork>("BTC");
|
||||
var id = new PaymentMethodId("BTC", PaymentTypes.LightningLike);
|
||||
var id = new PaymentMethodId("BTC", LightningPaymentType.Instance);
|
||||
var existing = store.GetSupportedPaymentMethods(_btcPayNetworkProvider)
|
||||
.OfType<LightningSupportedPaymentMethod>()
|
||||
.FirstOrDefault(d => d.PaymentId == id);
|
||||
@@ -286,7 +286,7 @@ namespace BTCPayServer.Plugins.Prism
|
||||
new[] {InvoiceEventCode.Completed, InvoiceEventCode.MarkedCompleted}.Contains(
|
||||
invoiceEvent.EventCode))
|
||||
{
|
||||
var pm = invoiceEvent.Invoice.GetPaymentMethod(new PaymentMethodId("BTC", PaymentTypes.LNURLPay));
|
||||
var pm = invoiceEvent.Invoice.GetPaymentMethod(new PaymentMethodId("BTC", LNURLPayPaymentType.Instance));
|
||||
var pmd = pm?.GetPaymentMethodDetails() as LNURLPayPaymentMethodDetails;
|
||||
if (string.IsNullOrEmpty(pmd?.ConsumedLightningAddress))
|
||||
{
|
||||
@@ -363,7 +363,7 @@ namespace BTCPayServer.Plugins.Prism
|
||||
Destination = new LNURLPayClaimDestinaton(destination),
|
||||
PreApprove = true,
|
||||
StoreId = storeId,
|
||||
PaymentMethodId = new PaymentMethodId("BTC", PaymentTypes.LightningLike),
|
||||
PaymentMethodId = new PaymentMethodId("BTC", LightningPaymentType.Instance),
|
||||
Value = Money.Satoshis(payoutAmount).ToDecimal(MoneyUnit.BTC),
|
||||
});
|
||||
if (payout.Result == ClaimRequest.ClaimResult.Ok)
|
||||
|
||||
@@ -633,7 +633,7 @@ public async Task<IEnumerable<IDestination>> GetNextDestinationsAsync(int count,
|
||||
})).Select(async data =>
|
||||
{
|
||||
|
||||
var claim = await _bitcoinLikePayoutHandler.ParseClaimDestination(new PaymentMethodId("BTC", PaymentTypes.BTCLike),
|
||||
var claim = await _bitcoinLikePayoutHandler.ParseClaimDestination(new PaymentMethodId("BTC", BitcoinPaymentType.Instance),
|
||||
data.Destination, CancellationToken.None);
|
||||
|
||||
if (!string.IsNullOrEmpty(claim.error) || claim.destination is not IBitcoinLikeClaimDestination bitcoinLikeClaimDestination )
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var op = OutPoint.Parse(coin.Outpoint);
|
||||
<tr>
|
||||
<td>
|
||||
<a href="@PaymentTypes.BTCLike.GetTransactionLink(BtcPayNetworkProvider.BTC, op.Hash.ToString())" target="_blank" class="text-break">
|
||||
<a href="@BitcoinPaymentType.Instance.GetTransactionLink(BtcPayNetworkProvider.BTC, op.Hash.ToString())" target="_blank" class="text-break">
|
||||
@coin.Outpoint
|
||||
</a>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<span class="text-break">@cjData.CoordinatorName</span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="@PaymentTypes.BTCLike.GetTransactionLink(network, cjData.Transaction)" target="_blank" class="text-break">
|
||||
<a href="@BitcoinPaymentType.Instance.GetTransactionLink(network, cjData.Transaction)" target="_blank" class="text-break">
|
||||
@cjData.Transaction
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -105,7 +105,7 @@ public class WabisabiPlugin : BaseBTCPayServerPlugin
|
||||
//
|
||||
// public IEnumerable<PaymentMethodId> GetSupportedPaymentMethods()
|
||||
// {
|
||||
// return new[] {new PaymentMethodId("BTC", PaymentTypes.BTCLike)};
|
||||
// return new[] {new PaymentMethodId("BTC", BitcoinPaymentType.Instance)};
|
||||
// }
|
||||
//
|
||||
// public Task<IHostedService> ConstructProcessor(PayoutProcessorData settings)
|
||||
|
||||
Reference in New Issue
Block a user