This commit is contained in:
Andrew Camilleri (Kukks)
2025-07-05 19:34:17 +02:00
5 changed files with 9 additions and 8 deletions

View File

@@ -179,9 +179,8 @@ query InvoiceByPaymentHash($paymentHash: PaymentHash!, $walletId: WalletId!) {
}
};
var response = await _client.SendQueryAsync<dynamic>(reques, cancellation);
return response.Data is null ? null : ToInvoice(response.Data.me.defaultAccount.walletById.invoiceByPaymentHash);
var result = response.Data?.SelectToken("me.defaultAccount.walletById.invoiceByPaymentHash") as JObject;
return result is null ? null : ToInvoice(result);
}
public LightningInvoice? ToInvoice(JObject invoice)
@@ -452,10 +451,10 @@ mutation lnInvoiceCreate($input: LnInvoiceCreateOnBehalfOfRecipientInput!) {
descriptionHash = createInvoiceRequest.DescriptionHash?.ToString(),
amount = (long)createInvoiceRequest.Amount.ToUnit(LightMoneyUnit.Satoshi),
expiresIn = (int)createInvoiceRequest.Expiry.TotalMinutes
}
}
};
var response = await _client.SendQueryAsync<dynamic>(reques, cancellation);
var inv = (isUSD
? response.Data.lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient.invoice

View File

@@ -9,7 +9,7 @@
<PropertyGroup>
<Product>TicketTailor</Product>
<Description>Allows you to integrate with TicketTailor.com to sell tickets for Bitcoin</Description>
<Version>2.0.5</Version>
<Version>2.0.6</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<!-- Plugin development properties -->

View File

@@ -12,7 +12,7 @@ namespace BTCPayServer.Plugins.TicketTailor
{
public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } =
{
new() {Identifier = nameof(BTCPayServer), Condition = ">=2.0.0"}
new() {Identifier = nameof(BTCPayServer), Condition = ">=2.1.6"}
};
public override void Execute(IServiceCollection applicationBuilder)

View File

@@ -339,6 +339,8 @@ public class TicketTailorService : EventHostedServiceBase, IWebhookProvider
public const string TicketTailorTicketIssued = "TicketTailorTicketIssued";
public bool SupportsCustomerEmail { get; } = true;
public Dictionary<string, string> GetSupportedWebhookTypes()
{
return new Dictionary<string, string>