mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 23:54:26 +01:00
update ff and ss
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<PropertyGroup>
|
||||
<Product>FixedFloat</Product>
|
||||
<Description>Allows you to embed a FixedFloat conversion screen to allow customers to pay with altcoins.</Description>
|
||||
<Version>1.1.3</Version>
|
||||
<Version>1.1.4</Version>
|
||||
</PropertyGroup>
|
||||
<!-- Plugin development properties -->
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
const result = this.$parent.paymentMethodId === "FixedFloat";
|
||||
|
||||
if(this.preferredToCurrency && this.model.paymentMethodId !== this.preferredToCurrency){
|
||||
|
||||
if (this.model.onChainWithLnInvoiceFallback && this.model.paymentMethodId === "BTC"){
|
||||
return result;
|
||||
}
|
||||
this.$parent.paymentMethodId = this.preferredToCurrency;
|
||||
this.$parent.fetchData().then(()=> {
|
||||
this.$parent.paymentMethodId = "FixedFloat";
|
||||
@@ -46,11 +48,23 @@
|
||||
}
|
||||
return result;
|
||||
},
|
||||
lightning () {
|
||||
if (!this.model.onChainWithLnInvoiceFallback || this.model.paymentMethodId !== "BTC"){
|
||||
return null;
|
||||
}
|
||||
const index = this.model.invoiceBitcoinUrl.indexOf("lightning=");
|
||||
if (index === -1){
|
||||
return null;
|
||||
}
|
||||
return this.model.invoiceBitcoinUrl.slice(index + "lightning=".length);
|
||||
},
|
||||
url () {
|
||||
|
||||
const address= this.lightning || this.model.btcAddress;
|
||||
return "https://widget.fixedfloat.com/?" +
|
||||
`to=${this.settleMethodId}` +
|
||||
"&lockReceive=true&ref=fkbyt39c" +
|
||||
`&address=${this.model.btcAddress}` +
|
||||
`&address=${address}` +
|
||||
this.amountQuery +
|
||||
this.explicitQuery;
|
||||
},
|
||||
@@ -58,7 +72,7 @@
|
||||
return this.model.paymentMethodId;
|
||||
},
|
||||
settleMethodId () {
|
||||
return this.currency.endsWith('LightningLike') || this.currency.endsWith('LNURLPay')
|
||||
return this.currency.endsWith('LightningLike') || this.currency.endsWith('LNURLPay') || this.lightning
|
||||
? 'BTCLN'
|
||||
: this.currency.replace('_BTCLike', '').replace('_MoneroLike', '').replace('_ZcashLike', '').toUpperCase();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user