Skip to content

Commit

Permalink
static/index.html: adjust for LSAT -> L402
Browse files Browse the repository at this point in the history
  • Loading branch information
starius committed Apr 17, 2024
1 parent 54a4d01 commit 69d2d71
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ <h1>Bos Scores</h1>
let lastInvoice = null;

function parseInvoice(invoice) {
const rex = /LSAT macaroon="(.*?)", invoice="(.*?)"/i;
const rex = /(LSAT|L402) macaroon="(.*?)", invoice="(.*?)"/i;
parts = invoice.match(rex);
lastMacaroon = parts[1];
lastInvoice = parts[2];
lastMacaroon = parts[2];
lastInvoice = parts[3];
}

function loadJSON(url, elem) {
Expand Down Expand Up @@ -90,7 +90,7 @@ <h1>Bos Scores</h1>
.then((provider) => {
provider.sendPayment(lastInvoice)
.then((response) => {
authorization = "LSAT " + lastMacaroon + ":" + response.preimage;
authorization = "L402 " + lastMacaroon + ":" + response.preimage;
$('#reload-bos').click();
$('#reload-lnd').click();
});
Expand All @@ -105,7 +105,7 @@ <h1>Bos Scores</h1>

function addPreimage() {
let preimage = prompt("Enter hex encoded preimage");
authorization = "LSAT " + lastMacaroon + ":" + preimage;
authorization = "L402 " + lastMacaroon + ":" + preimage;
$('#reload-bos').click();
$('#reload-lnd').click();
}
Expand Down

0 comments on commit 69d2d71

Please sign in to comment.