feat(housewallet): port the cu-04b house wallet screen#37
Merged
Conversation
The middle-ellipsis string shortener lived in feature/rounddetail but is also needed by the house wallet address, so promote it to `util/` and route the provably-fair seeds through it. Its test moves alongside. No behavior change.
Adds a top-anchored, slide-in toast with success / error / info / warn styling that mirrors mockup/js/toast.js (colored border + tint, glyph, title + optional body, auto-dismiss). The ToastHostState is hoisted once in StackApp and reachable from any screen through LocalToastController, replacing the generic system Toast for in-app feedback.
The operator-only wallet management view reached from Profile, with all five mockup states: Generate / Import setup, the active wallet (balance, public address, Android-Keystore private key), the key-revealed view with an auto-hide countdown, the biometric prompt overlay, and the no-biometric error (preview-only). The public address is middle-truncated to a single line via truncateMiddle, and the refresh / copy / Polygonscan chips give feedback through the in-app toast. Replaces the house wallet placeholder in StackNavHost. Tests: HouseWalletFormatTest (the countdown formatter) and HouseWalletScreenTest (the unset / active / revealed states and the back callback).
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.
Summary
Ports the cu-04b operator house wallet screen (mockup/js/screens/house-wallet.js) and wires it into the nav graph in place of the placeholder. All five mockup states are covered: Generate / Import setup, the active wallet (balance, public address, Android-Keystore-backed private key), the key-revealed view with an auto-hide countdown, the biometric prompt overlay, and the no-biometric error (preview-only).
This branch also lands two pieces the screen depends on, each in its own commit:
refactor(util):truncateMiddle(the middle-ellipsis shortener) moves fromfeature/rounddetailtoutil/so the provably-fair seeds and the house wallet address share it.feat(ui): an in-app toast host styled like mockup/js/toast.js (success / error / info / warn), hoisted inStackAppand reachable from any screen viaLocalToastController.Rationale
Verification
./gradlew ktlintCheck detekt testDebugUnitTest-> BUILD SUCCESSFUL./gradlew assembleDebug-> BUILD SUCCESSFUL./gradlew compileDebugAndroidTestKotlin-> BUILD SUCCESSFULTest plan
HouseWalletFormatTestandTruncateMiddleTestgreenHouseWalletScreenTestcompiles (instrumented; not run in the CI matrix)Checklist
feat/).[Unreleased].