Skip to content

Commit

Permalink
fix: invalid macaroon
Browse files Browse the repository at this point in the history
  • Loading branch information
studioTeaTwo committed Dec 5, 2023
1 parent 0251ee1 commit 8cac172
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ function isWaitingToPayInvoice(record) {
// @challenge "L402 macaroon=X invoice=Y"
function getToken(challenge: string) {
const tokens = challenge.split(' ');
const macaroon = tokens[1].split('=')[1];
const invoice = tokens[2].split('=')[1];
const macaroon = tokens[1].replace('macaroon=', '');
const invoice = tokens[2].replace('invoice=','');
return {
macaroon,
invoice
Expand Down
2 changes: 1 addition & 1 deletion src/routes/articles/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
.paywall {
text-align: center;
margin: 2rem 0;
padding: 1.5rem;
padding: 1.5rem 0;
background-color: silver;
filter: drop-shadow(0 1rem 0.75rem black);
}
Expand Down

0 comments on commit 8cac172

Please sign in to comment.