mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 07:34:24 +01:00
allow stablesat
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<PropertyGroup>
|
||||
<Product>Blink</Product>
|
||||
<Description>Brink Lightning support</Description>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.0.3</Version>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<RootNamespace>BTCPayServer.Plugins.Blink</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -301,10 +301,8 @@ query Transactions($walletId: WalletId!) {
|
||||
public async Task<LightningInvoice> CreateInvoice(CreateInvoiceParams createInvoiceRequest,
|
||||
CancellationToken cancellation = new())
|
||||
{
|
||||
var reques = new GraphQLRequest
|
||||
{
|
||||
Query = @"
|
||||
mutation lnInvoiceCreateOnBehalfOfRecipient($input: LnInvoiceCreateOnBehalfOfRecipientInput!) {
|
||||
var query = @"
|
||||
mutation lnInvoiceCreate($input: LnInvoiceCreateOnBehalfOfRecipientInput!) {
|
||||
lnInvoiceCreateOnBehalfOfRecipient(input: $input) {
|
||||
invoice {
|
||||
createdAt
|
||||
@@ -315,8 +313,29 @@ mutation lnInvoiceCreateOnBehalfOfRecipient($input: LnInvoiceCreateOnBehalfOfRec
|
||||
satoshis
|
||||
}
|
||||
}
|
||||
}",
|
||||
OperationName = "LnInvoiceCreate",
|
||||
}";
|
||||
|
||||
if (WalletCurrency?.Equals("btc", StringComparison.InvariantCultureIgnoreCase) is not true)
|
||||
{
|
||||
query = @"
|
||||
mutation lnInvoiceCreate($input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput!) {
|
||||
lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient(input: $input) {
|
||||
invoice {
|
||||
createdAt
|
||||
paymentHash
|
||||
paymentRequest
|
||||
paymentSecret
|
||||
paymentStatus
|
||||
satoshis
|
||||
}
|
||||
}
|
||||
}";
|
||||
}
|
||||
|
||||
var reques = new GraphQLRequest
|
||||
{
|
||||
Query = query,
|
||||
OperationName = "lnInvoiceCreate",
|
||||
Variables = new
|
||||
{
|
||||
input = new
|
||||
|
||||
@@ -109,12 +109,6 @@ public class BlinkLightningConnectionStringHandler : ILightningConnectionStringH
|
||||
try
|
||||
{
|
||||
bclient.GetBalance().GetAwaiter().GetResult();
|
||||
if (!bclient.WalletCurrency.Equals("btc", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
error = "Cannot use a non BTC denominated wallet";
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user