Compare commits
2 commits
f2c34335db
...
1df32badfb
Author | SHA1 | Date | |
---|---|---|---|
1df32badfb | |||
1c2677b547 |
2 changed files with 10 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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<void> {
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue