Skip to content

Improve wallet activity: SPL symbols, decimals, tap-to-detail#31

Merged
epicexcelsior merged 10 commits into
anonmesh:v3from
epicexcelsior:epic/wallet-activity-real-data
May 10, 2026
Merged

Improve wallet activity: SPL symbols, decimals, tap-to-detail#31
epicexcelsior merged 10 commits into
anonmesh:v3from
epicexcelsior:epic/wallet-activity-real-data

Conversation

@epicexcelsior
Copy link
Copy Markdown
Collaborator

What's new

  • Activity tile on the wallet bento now reads tx.symbol off 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.
  • Amounts format with the per-tx decimals from the parser, so a 1.50 USDC send displays as 1.5 USDC (six decimals available, four shown) instead of being squeezed through the four-decimal SOL formatter.
  • Each row is tappable. Press opens the existing 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.
  • Light haptic on row tap, matching the balance refresh and send buttons.

Why this PR

The wallet bento renders an inline <ActivityTile> defined in WalletScreen.tsx, not the <RecentActivity> component in components/home/. The inline tile shipped with tx.amountSol.toFixed(4) and a hardcoded SOL symbol, 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.tsdecimals field added to ActivityEntry; SOL path emits SOL_DECIMALS, SPL path emits the mint's reported decimals.
  • mobile_app/screens/WalletScreen.tsx — inline ActivityTile swapped to read tx.symbol, format via fmtAmount(tx.amountSol, tx.decimals), wrap rows in Pressable, and mount TxDetailModal.

Drive-by

Cherry-picked the existing fix(nodes): drop stale H_PAD reference commit so tsc --noEmit passes 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 --noEmit clean
  • npm run lint clean
  • npm run validate:tier0:services pass
  • node ./scripts/validate-tier0-config.mjs pass

Device smoke test on Solana Seeker still owed before merge.

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.
@epicexcelsior epicexcelsior changed the title Wallet activity becomes real: SPL symbols, decimals, tap-to-detail Improve wallet activity: SPL symbols, decimals, tap-to-detail May 8, 2026
@epicexcelsior epicexcelsior requested a review from Copilot May 8, 2026 01:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 decimals onto ActivityEntry and populate it for both SPL and SOL activity parsing.
  • Update WalletScreen’s inline activity list to display tx.symbol, format amounts using tx.decimals, and make rows tappable to open TxDetailModal with light haptics.
  • Remove stale H_PAD usage in PendingCosigns and 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.

Comment thread mobile_app/screens/WalletScreen.tsx Outdated
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.
@epicexcelsior
Copy link
Copy Markdown
Collaborator Author

Update — pushed 3b9a359 addressing the Copilot finding on hidden-balance leak via accessibilityLabel:

WalletScreen.tsx:217  →  conditional label
  hidden=true  →  "Sent transaction, amount hidden. Tap for details."
  hidden=false →  "Sent {amount} {symbol}. Tap for details."

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.
@epicexcelsior
Copy link
Copy Markdown
Collaborator Author

Update — pushed 8349632, two device-smoke fixes from a Seeker pass:

Close + Explorer buttons silently swallowed. Layout had a Pressable absoluteFill as a sibling to the SafeAreaView sheet — on Android that absoluteFill intercepted touches that should have reached the nested DepthButton Pressables inside the sheet. Refactored: backdrop is now itself a Pressable onPress={onClose}, sheet is a nested Pressable onPress={noop} that absorbs taps so they don't bubble up to the backdrop. Inner DepthButtons and copy rows receive presses normally.

Copy rows had no feedback. Tapping a signature/memo/mint row copied silently — no signal it worked. Added per-row copied state with 1400ms timeout, swapping the icon copycheck and tinting label/icon to colors.primary. Same pattern as the wallet-address copy button in ReceivePanel.tsx.

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).
@epicexcelsior
Copy link
Copy Markdown
Collaborator Author

Update — pushed 028e1d0, second pass at the close/explorer button issue.

The previous fix (8349632) wrapped the sheet in a noop Pressable to absorb backdrop dismiss. On Android the parent Pressable still claimed the gesture responder before nested DepthButton Pressables could activate, so the buttons remained dead.

Switched to the canonical bottom-sheet split-pattern:

  • root is a flex:1 column with justifyContent: 'flex-end' (pushes sheet to bottom).
  • dismissArea is a Pressable with flex: 1 — occupies only the empty space above the sheet, never overlaps it.
  • SafeAreaView sheet is plain — no Pressable wrapper. DepthButton's onPress receives presses without competing for the responder.

Backdrop dismiss preserved (taps above the sheet hit dismissArea); sheet content taps no longer bubble (zero overlap).

…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.
@epicexcelsior
Copy link
Copy Markdown
Collaborator Author

Update — pushed 0a9adaa. Layout split-pattern (028e1d0) didn't unstick the buttons on Seeker, so the responder issue is DepthButton-specific in this Modal+ScrollView context — plain Pressable in the same ScrollView (the detail copy rows) fires correctly. Likely the nested Animated.View + LinearGradient stack inside DepthButton swallows the touch.

Two changes:

  1. Close and Explorer are now plain styled Pressables — matched visual hierarchy (filled primary for Close, outlined secondary for Explorer), min-height 44, opacity feedback. No animation machinery in the touch path.
  2. Swapped WebBrowser.openBrowserAsync for Linking.openURL to match SuccessCard's existing explorer handler — one less native module in the chain, and Linking is the RN-native path that's already known to work elsewhere in the wallet flow.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread mobile_app/components/wallet/TxDetailModal.tsx
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread mobile_app/components/wallet/TxDetailModal.tsx
Comment thread mobile_app/components/wallet/TxDetailModal.tsx Outdated
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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread mobile_app/components/wallet/TxDetailModal.tsx
@epicexcelsior epicexcelsior merged commit a4b745c into anonmesh:v3 May 10, 2026
4 checks passed
@epicexcelsior epicexcelsior deleted the epic/wallet-activity-real-data branch May 15, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants