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