feat(accounts): inner hash for encrypted accounts, bigger back button hitbox - #627
Conversation
… hitbox Encrypted account rows get the same menu control as regular accounts. Their menu keeps the name read-only and replaces Address Details with an Inner Hash page showing the receive key pair's rewards preimage (the value miners pass as --rewards-inner-hash), with copy and share. Extract CopyableDataItem from AddressDetailsCard, add SplitCard.single and a nullable MenuRow.onTap so nothing is duplicated. AppBackButton now has a 48pt tap target around the unchanged 28pt visual, and V2AppBar uses equal 48pt side slots so the title stays centred at the same bar height.
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT Sol
Verdict (advisory): Approve
No blocking findings.
The encrypted-account path derives the displayed inner hash from the same current receive key pair used by Receive, and the resulting rewardsPreimageHex matches the miner/node --rewards-inner-hash contract. The menu correctly keeps encrypted account names static, the shared copy component preserves independent feedback state, and the app-bar change uses symmetric 48 pt slots while preserving the existing 76 pt bar height.
Validation:
git diff --checkpassed for the PR diff and GitHub's synthetic merge commit.- Workspace formatting covered 710 Dart files with 0 changes.
- The focused
V2AppBartest passed, along with 463 non-native SDK tests, 424 mobile tests, and 270 cold-wallet tests. - The 10-second local analyzer cap completed cold-wallet, miner, and SDK with no issues before reaching mobile; GitHub's full
Analyzecheck passed. - Localization generation during bootstrap left the checked-in generated files unchanged.
Non-blocking: dedicated widget coverage for the new encrypted-menu/inner-hash states and the 48 pt hitbox geometry would strengthen regression protection.
|
|
||
| void _share() { | ||
| final innerHash = _innerHash; | ||
| if (innerHash == null) return; |
There was a problem hiding this comment.
Why bother saving to temporary variable if we can check directly?
There was a problem hiding this comment.
Dart won't promote a mutable field, so without the local this would need _innerHash!. Kept it to avoid the bang.
| @override | ||
| Widget build(BuildContext context) { | ||
| final l10n = ref.watch(l10nProvider); | ||
| final innerHash = _innerHash; |
There was a problem hiding this comment.
Fair, nothing here needs promotion. Removed in 11b12fc.
Encrypted account inner hash
InnerHashScreen: same layout as address details with a single card holding the inner hash, a copy button and Share. The value isWormholeKeyPair.rewardsPreimageHexof the current receive key pair, i.e. the first Poseidon2 hash of the secret that miners pass as--rewards-inner-hash(see quantus-cliexamples/wormhole_sdk_usage.rs). Using the receive index keeps it consistent with the Receive screen.app_en.arbandapp_id.arb, generated files updated.DRY refactor
CopyableDataItemextracted fromAddressDetailsCard(label, value, copy button with 2s check mark) and reused by both cards. Copy indicators on the address card are now independent per item instead of mutually exclusive.SplitCard.singlefor a one-section card;MenuRow.onTapnullable, hiding the chevron when static.Bigger back button hitbox (quantus_sdk)
AppBackButtonlays out as a 48×48pt opaque tap target with the unchanged 28pt circle at its left edge, so the extra area extends right, above and below (Flutter hit testing can't spill outside the widget's bounds into the screen-edge margin).V2AppBaruses equal 48pt side slots, so the title is exactly centred whatever sits in them, and default vertical padding is 6/22 so the bar keeps its 76pt height.Verification
melos run formatandmelos run analyzeclean across all packages.V2AppBarcallers: the cold wallet home bar icons stay at the edges, the QR scanner bar keeps its height.