aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/parse.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-27 14:46:30 -0700
committerAdam Soltys <[email protected]>2026-09-27 14:46:30 -0700
commit64f510692cd53873cf9a95ac0a2bcd00a6a0e6be (patch)
tree97218bbe3d8d02699f6b83b1d0375559e9a80355 /src/lib/parse.ts
parent802eea628fb77fed305de555995cf323174b0394 (diff)
downloadcoinos-ui-64f510692cd53873cf9a95ac0a2bcd00a6a0e6be.tar.gz
coinos-ui-64f510692cd53873cf9a95ac0a2bcd00a6a0e6be.zip
ecash: carry pasted tokens in the URL instead of storing them server-side
The server no longer accepts anonymous token uploads. A pasted token now redirects straight to /ecash/<token>, and the page asks the server for the token's status statelessly. Ids from previously shared links still resolve. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/lib/parse.ts')
-rw-r--r--src/lib/parse.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/parse.ts b/src/lib/parse.ts
index 663b2e42..e8d8bafd 100644
--- a/src/lib/parse.ts
+++ b/src/lib/parse.ts
@@ -105,10 +105,8 @@ export default async (s, host, cookies) => {
.join("");
}
- if (t.startsWith("cashu")) {
- const { id } = await post("/cash", { token: t });
- redirect(307, `/ecash/${id}`);
- }
+ // The token rides in the URL; the ecash page asks the server for its status.
+ if (t.startsWith("cashu")) redirect(307, `/ecash/${encodeURIComponent(t)}`);
if (t.startsWith("creq")) redirect(307, `/send/ecash/${t}`);