Skip to content

feat: Token Vault: denomination inspector, offline QR sharing, proof consolidation & alerts#3919

Draft
kaloudis wants to merge 1 commit intoZeusLN:masterfrom
kaloudis:token-vault
Draft

feat: Token Vault: denomination inspector, offline QR sharing, proof consolidation & alerts#3919
kaloudis wants to merge 1 commit intoZeusLN:masterfrom
kaloudis:token-vault

Conversation

@kaloudis
Copy link
Copy Markdown
Contributor

@kaloudis kaloudis commented Mar 30, 2026

Description

  • Add Token Vault screen accessible from Cashu Tools for inspecting proof denominations per mint, with expandable denomination groups and individual proof details
  • Enable offline token passing via QR — single-proof QR icon on each proof row, plus multi-select mode to bundle multiple proofs into one shareable token QR with confirmation before proof removal
  • Add proof consolidation tool that swaps all proofs at a mint back to self for optimal power-of-2 denominations, with fee estimate via prepareSend before confirmation
  • Add consolidation alert system triggered by proof count thresholds (50/100/200) showing estimated fee impact, with dismissable "don't remind me" persistence and deep link to Token Vault

Test plan

  • Navigate to Settings > Tools > Cashu > Token Vault
  • Verify per-mint sections show correct proof counts and balances
  • Expand a mint, verify denomination grouping (amount x count = total) is correct
  • Expand a denomination, tap QR icon on a single proof — verify QR displays, cancel without removing
  • Tap "Confirm token was shared" — verify proof is removed and balance updates
  • Toggle "Select proofs", select multiple proofs, tap "Share selected as token" — verify combined QR
  • Tap "Consolidate Proofs" — verify fee estimate displays, cancel returns proofs
  • Confirm consolidation — verify proofs are re-issued with fewer optimal denominations
  • Navigate away during consolidation fee confirmation — verify proofs are not stuck (unmount cancels prepared send)
  • With 50+ proofs at a mint, trigger a balance sync — verify consolidation alert modal appears
  • Dismiss alert — verify it does not reappear until next threshold
  • Switch wallets — verify alerts reset properly

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • Embedded LND
  • LDK Node

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a 'Token Vault' feature for managing Cashu proofs, allowing users to view, select, and share proofs via QR codes. It also adds a consolidation mechanism that prompts users to swap proofs for optimal denominations when certain thresholds are met, helping to reduce future transaction fees. The feedback focuses on improving the robustness of proof selection by using unique identifiers instead of array indices and enhancing internationalization by using proper localization substitution parameters instead of manual string replacement.

@kaloudis kaloudis added this to the v0.13.1 milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant