mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 09:04:19 +01:00
static/index.html: adjust for LSAT -> L402
This commit is contained in:
@@ -53,10 +53,10 @@
|
|||||||
let lastInvoice = null;
|
let lastInvoice = null;
|
||||||
|
|
||||||
function parseInvoice(invoice) {
|
function parseInvoice(invoice) {
|
||||||
const rex = /LSAT macaroon="(.*?)", invoice="(.*?)"/i;
|
const rex = /(LSAT|L402) macaroon="(.*?)", invoice="(.*?)"/i;
|
||||||
parts = invoice.match(rex);
|
parts = invoice.match(rex);
|
||||||
lastMacaroon = parts[1];
|
lastMacaroon = parts[2];
|
||||||
lastInvoice = parts[2];
|
lastInvoice = parts[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadJSON(url, elem) {
|
function loadJSON(url, elem) {
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
.then((provider) => {
|
.then((provider) => {
|
||||||
provider.sendPayment(lastInvoice)
|
provider.sendPayment(lastInvoice)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
authorization = "LSAT " + lastMacaroon + ":" + response.preimage;
|
authorization = "L402 " + lastMacaroon + ":" + response.preimage;
|
||||||
$('#reload-bos').click();
|
$('#reload-bos').click();
|
||||||
$('#reload-lnd').click();
|
$('#reload-lnd').click();
|
||||||
});
|
});
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
function addPreimage() {
|
function addPreimage() {
|
||||||
let preimage = prompt("Enter hex encoded preimage");
|
let preimage = prompt("Enter hex encoded preimage");
|
||||||
authorization = "LSAT " + lastMacaroon + ":" + preimage;
|
authorization = "L402 " + lastMacaroon + ":" + preimage;
|
||||||
$('#reload-bos').click();
|
$('#reload-bos').click();
|
||||||
$('#reload-lnd').click();
|
$('#reload-lnd').click();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user