Improve wallet activity: SPL symbols, decimals, tap-to-detail#31
Conversation
PR anonmesh#29 removed the H_PAD constant when moving PendingCosigns into WalletScreen's grid (parent now owns horizontal padding) but left one reference at line 57. Result: upstream/v3 fails tsc on a fresh clone. Drop the stale paddingHorizontal entry from the wrap View style array and consolidate the two duplicate @expo/vector-icons imports while in the file.
Renderers need decimals to format SPL amounts with the right precision ceiling. Native SOL keeps the canonical SOL_DECIMALS value; SPL deltas carry the mint's reported decimals through from the parsed token balance entry. No render change in this commit — wires the data through so the activity tile and tx detail can stop assuming SOL precision.
The wallet bento's inline activity tile hardcoded the literal 'SOL' under every row and rounded amounts to four decimals regardless of the token. SPL transfers landed on screen labelled as SOL with the wrong precision — every USDC/USDT/BONK/JUP send showed as 'X.XXXX SOL'. Read tx.symbol off the activity entry so the label reflects the actual token, and format the amount via the existing fmtAmount helper using the per-tx decimals from the parser. Native SOL formatting is unchanged since SOL_DECIMALS round-trips through the same path.
Wraps each activity tile row in a Pressable that opens the existing TxDetailModal with the full signature, counterparty, slot, fee, memo, and mint when applicable. Light haptic feedback on tap matches the balance refresh and send buttons. Picks up the work that landed TxDetailModal in the wallet bento on the home composition (RecentActivity already tapped through there) and extends the same affordance to the inline tile that the wallet screen actually renders. Reviewer can copy the full tx signature out of the drawer or jump straight to Explorer.
There was a problem hiding this comment.
Pull request overview
Updates the wallet “Recent Activity” tile rendering so SPL token transfers display correct symbols/decimals and each activity row can open the existing transaction detail modal, while also applying a small layout fix for PendingCosigns.
Changes:
- Add
decimalsontoActivityEntryand populate it for both SPL and SOL activity parsing. - Update
WalletScreen’s inline activity list to displaytx.symbol, format amounts usingtx.decimals, and make rows tappable to openTxDetailModalwith light haptics. - Remove stale
H_PADusage inPendingCosignsand consolidate icon imports.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mobile_app/src/services/walletData.ts | Adds decimals to ActivityEntry and sets it in SPL + SOL activity conversion paths. |
| mobile_app/screens/WalletScreen.tsx | Uses per-tx symbol/decimals for formatting and adds press-to-open TxDetailModal on activity rows. |
| mobile_app/components/nodes/PendingCosigns.tsx | Drops stale horizontal padding dependency and tidies vector icon imports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When balance hide is on, the row text shows ••• but the accessibilityLabel still spelled out the real amount and symbol, leaking the hidden balance to screen readers and a11y tooling. Conditionally render a redacted label when hidden.
|
Update — pushed Visible row text was already redacted to '•••'; the screen-reader path is now consistent. |
…w check feedback Two issues caught on Seeker smoke: 1. Close and Explorer DepthButtons silently swallowed taps. Layout had a Pressable absoluteFill sibling to the SafeAreaView sheet — on Android that absoluteFill intercepted touches that should have hit the nested DepthButton Pressables inside the sheet. Refactored: the backdrop is now itself a Pressable (onPress=onClose), the sheet is a nested Pressable that absorbs taps with onPress=noop so they don't bubble up and trigger dismiss. Inner DepthButtons receive presses normally. 2. Copy buttons on detail rows had no feedback — tapping a sig/memo/mint row copied silently and the user had no signal it worked. Added per- row copied state with 1400ms timeout, swapping the icon copy→check and tinting label/icon colors.primary, matching the pattern used in ReceivePanel.tsx for the wallet address copy.
|
Update — pushed Close + Explorer buttons silently swallowed. Layout had a Copy rows had no feedback. Tapping a signature/memo/mint row copied silently — no signal it worked. Added per-row |
Previous fix (8349632) wrapped the sheet in a noop Pressable to absorb taps. On Android the parent Pressable still claimed the responder before nested DepthButton Pressables could activate, so close/explorer remained dead. Switched to the canonical bottom-sheet pattern: dismissArea is a flex:1 Pressable that occupies only the space above the sheet (column flex with justifyContent:flex-end pushes the sheet to bottom; the dismiss area takes the remaining space). The sheet itself is a plain SafeAreaView with no Pressable wrapper, so DepthButton's onPress receives presses directly without any parent responder competition. Tap-on-backdrop still dismisses (dismissArea fills everything above the sheet); tap-on-sheet does not bubble (no overlap).
|
Update — pushed The previous fix ( Switched to the canonical bottom-sheet split-pattern:
Backdrop dismiss preserved (taps above the sheet hit |
…tions Despite split-pattern layout (028e1d0) DepthButton's onPress still did not fire on Seeker for Close/Explorer. Plain Pressable on detail rows in the same ScrollView fires correctly, so the responder issue is DepthButton-specific in this Modal+ScrollView context — likely the nested Animated.View + LinearGradient stack swallowing the touch. Replaced with two plain Pressables styled to match the visual hierarchy (secondary outline for Explorer, filled primary for Close). Min-height 44, hit-target safe. Pressable feedback via opacity, no animation machinery to interfere with the responder. Also swapped expo-web-browser openBrowserAsync for Linking.openURL, matching SuccessCard's existing handleExplorer pattern. Linking is the RN-native path; one less native module in the touch handler chain.
|
Update — pushed Two changes:
Visual is now slightly flatter than the rest of the app's DepthButton chrome — happy to revisit if team lead wants the depth treatment back, but the trade was "work first, polish later." |
…le comment After the DepthButton swap (0a9adaa), the actionBtnPrimary StyleSheet entry was left as {}, and the layout comment still referenced DepthButton. Drop the empty style + its consumer site, rewrite the comment to describe the actual current pattern.
Track the COPY_FEEDBACK_MS reset timer in a ref so:
- rapid re-taps clear the stale timer before scheduling a new one (prevents
the earlier timer flipping copied back to false mid-window)
- the cleanup effect clears it on unmount (prevents the late setCopied call
on an unmounted component when the modal closes within 1.4s of a copy)
Mark the dismiss-area Pressable as accessible={false}. The visible Close
button at the bottom of the sheet is the screen-reader path; an unlabeled
backdrop just adds a phantom focusable region.
What's new
tx.symboloff the parsed entry instead of hardcoding the literal "SOL" under every row. SPL transfers (USDC, USDT, BONK, JUP, unknown mints) finally render with the right token label.1.5 USDC(six decimals available, four shown) instead of being squeezed through the four-decimal SOL formatter.TxDetailModal(shipped in Wallet tightening: adapter consumption, real SPL, T22 filter, partial-write durability #28) with the full signature, counterparty, slot, fee, memo, and mint address — copy buttons throughout, ready for an Open-in-Explorer step.Why this PR
The wallet bento renders an inline
<ActivityTile>defined inWalletScreen.tsx, not the<RecentActivity>component incomponents/home/. The inline tile shipped withtx.amountSol.toFixed(4)and a hardcodedSOLsymbol, so every real SPL signature on devnet was being mislabelled. The fix keeps the bento layout untouched — only the per-row render path changes.Start here
mobile_app/src/services/walletData.ts—decimalsfield added toActivityEntry; SOL path emitsSOL_DECIMALS, SPL path emits the mint's reported decimals.mobile_app/screens/WalletScreen.tsx— inlineActivityTileswapped to readtx.symbol, format viafmtAmount(tx.amountSol, tx.decimals), wrap rows inPressable, and mountTxDetailModal.Drive-by
Cherry-picked the existing
fix(nodes): drop stale H_PAD referencecommit sotsc --noEmitpasses on this branch — current upstream/v3 errors out without it. Identical content to the fix on the recovery-export PR; should no-op on whichever PR merges first.Validation
npx tsc --noEmitcleannpm run lintcleannpm run validate:tier0:servicespassnode ./scripts/validate-tier0-config.mjspassDevice smoke test on Solana Seeker still owed before merge.