feat(wallet): add reusable program account selector - #242
Draft
3esmit wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 output — existing destination or new TokenHolding:
Liquidity token A input:
Liquidity token B input:
LP TokenHolding output — Create new selected when no matching holding exists:
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.