Compare commits

..

No commits in common. "1df32badfba825f2979cae4508ea36bc98806b1a" and "f2c34335dbee27a94fc44a52fb38e385ae976ca7" have entirely different histories.

2 changed files with 1 additions and 10 deletions

View file

@ -12,12 +12,6 @@ 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. 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? ## What can it do?
- **Go Beyond the Main Chain**: Portal supports multiple Bitcoin layers in one interface. - **Go Beyond the Main Chain**: Portal supports multiple Bitcoin layers in one interface.

View file

@ -1,7 +1,6 @@
import { import {
CashuMint, CashuMint,
CashuWallet, CashuWallet,
getDecodedToken,
MintQuoteState, MintQuoteState,
type Proof, type Proof,
} from "@cashu/cashu-ts"; } from "@cashu/cashu-ts";
@ -226,9 +225,7 @@ function updateBalance() {
export async function redeemToken(token: string): Promise<void> { export async function redeemToken(token: string): Promise<void> {
if (!token.trim()) throw new Error("Token is empty"); if (!token.trim()) throw new Error("Token is empty");
const parsedToken = getDecodedToken(token); const wallet = await walletReady;
const mint = new CashuMint(parsedToken.mint);
const wallet = new CashuWallet(mint);
const received = await wallet.receive(token.trim()); const received = await wallet.receive(token.trim());
proofs.push(...received); proofs.push(...received);
const amountReceived = received.reduce((sum, p) => sum + p.amount, 0); const amountReceived = received.reduce((sum, p) => sum + p.amount, 0);