From 1c2677b5476b1cba9e0ddb35d632324fb462c0fe Mon Sep 17 00:00:00 2001 From: Danny Morabito Date: Mon, 7 Jul 2025 12:16:00 +0200 Subject: [PATCH 1/2] chore: add warnings in readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4ff1707..5965c5a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ It's built for simplicity, speed, and interoperability, giving you the tools to It's a Progressive Web App (PWA), which means you can "install" it on your phone or desktop for a native-like experience without going through an app store. +## ⚠️ Important Warnings + +**This wallet is in BETA.** There may be bugs, including breaking bugs that could affect your funds or wallet functionality. Use with caution and only with amounts you can afford to lose. + +**Web Wallet Security Notice:** PortalBTC is a web-based wallet running in your browser. While we implement security best practices, any browser extension or malicious website you visit could potentially access your private keys. For maximum security, periodically send large amounts to a hardware wallet or air-gapped device. + ## What can it do? - **Go Beyond the Main Chain**: Portal supports multiple Bitcoin layers in one interface. From 1df32badfba825f2979cae4508ea36bc98806b1a Mon Sep 17 00:00:00 2001 From: Danny Morabito Date: Mon, 7 Jul 2025 17:32:45 +0200 Subject: [PATCH 2/2] bug: allow redeeming cashui when cashu wallet is stuck TODO: separate wallets from UI --- src/lib/cashu.svelte.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/cashu.svelte.ts b/src/lib/cashu.svelte.ts index 4dca9b4..dd4408e 100644 --- a/src/lib/cashu.svelte.ts +++ b/src/lib/cashu.svelte.ts @@ -1,6 +1,7 @@ import { CashuMint, CashuWallet, + getDecodedToken, MintQuoteState, type Proof, } from "@cashu/cashu-ts"; @@ -225,7 +226,9 @@ function updateBalance() { export async function redeemToken(token: string): Promise { if (!token.trim()) throw new Error("Token is empty"); - const wallet = await walletReady; + const parsedToken = getDecodedToken(token); + const mint = new CashuMint(parsedToken.mint); + const wallet = new CashuWallet(mint); const received = await wallet.receive(token.trim()); proofs.push(...received); const amountReceived = received.reduce((sum, p) => sum + p.amount, 0);