feat: implement wallet journey states and refactor MainWalletPage to MainWalletView#1228
Open
alibaba0010 wants to merge 2 commits into
Open
feat: implement wallet journey states and refactor MainWalletPage to MainWalletView#1228alibaba0010 wants to merge 2 commits into
alibaba0010 wants to merge 2 commits into
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.
What does this PR do?
This PR implements the "Wallet Journey States" logic as part of the competency test requirements. It introduces a
data-journey-stateattribute to the main wallet view to reflect the current status of the wallet and its active services.Key Changes:
MainWalletPagetoMainWalletViewto better align with the project's component naming conventions and updated all corresponding routes inApp.tsx.MainWalletViewto derive adata-journey-stateattribute. Supported states:idle: Default state for a funded wallet.empty: Wallet has zero balance.syncing: Wallet is currently rescanning the blockchain.fee-config-missing: Required policy fee configurations are missing fromjoinmarket.cfg.coinjoining: A collaborative send (CoinJoin) is in process.making: The Yield Generator (Maker) service is running.MainWalletView.test.tsxwith mocks forzustandandjoinmarket-api-tsto assert correct attribute values under all scenarios.docs/developing.mdwith a new "Simulating Wallet Journey States" section to help other contributors manually verify these flows in regtest.Visual Demo
This change adds an internal metadata attribute to the DOM to facilitate state-dependent UI logic and automated testing.
Verification (DOM Inspection):
You can verify the active state by inspecting the main container in the browser developer tools:
Automated Tests:
All tests in the new suite pass successfully: