Skip to content

feat(wallet): add reusable program account selector - #242

Draft
3esmit wants to merge 2 commits into
mainfrom
feat/shared-wallet-token-holding-selector
Draft

feat(wallet): add reusable program account selector#242
3esmit wants to merge 2 commits into
mainfrom
feat/shared-wallet-token-holding-selector

Conversation

@3esmit

@3esmit 3esmit commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Depends on #240. The humanized-wallet PR should land first.

Closes #241.

Adds a generic shared-wallet program account selector. It can filter any program account type by a decoded state field, so it can be reused for more than TokenHoldings.

The first use covers every AMM TokenHolding choice:

  • swap input and output
  • liquidity token A and token B inputs
  • LP TokenHolding output

The highest-balance matching holding is selected automatically. Users can choose another holding. Outputs also offer Create new TokenHolding, which is selected automatically when no matching output exists.

Screenshots

Swap input — highest balance selected from two matching holdings:

Swap input TokenHolding selector

Swap output — existing destination or new TokenHolding:

Swap output TokenHolding selector

Liquidity token A input:

Liquidity token A TokenHolding selector

Liquidity token B input:

Liquidity token B TokenHolding selector

LP TokenHolding output — Create new selected when no matching holding exists:

LP TokenHolding output selector

Checks: formatting, Clippy, workspace unit tests, full integration tests, QML tests, IDL drift, AMM UI build, and live AMM UI walkthrough against a synced testnet wallet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow wallet users to choose TokenHolding inputs and outputs

1 participant