Skip to content

fix: make all transaction field rows copyable#440

Merged
im-adithya merged 1 commit into
masterfrom
fix/tx-row-copy
Jun 17, 2026
Merged

fix: make all transaction field rows copyable#440
im-adithya merged 1 commit into
masterfrom
fix/tx-row-copy

Conversation

@im-adithya

@im-adithya im-adithya commented Jun 17, 2026

Copy link
Copy Markdown
Member

Fixes #436

Remove copy prop and makes all fields copyable

Summary by CodeRabbit

  • New Features

    • Transaction details now display Payment Hash, Preimage (when settled), and Metadata information.
  • Improvements

    • Enhanced transaction detail copyability with tap-to-copy interaction and success feedback.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

TransactionDetailRow loses its optional copy boolean prop and instead always wraps its displayed content in a TouchableOpacity that copies props.content to the clipboard and shows a success toast on press. The "Payment Hash", "Preimage", and "Metadata" call sites in Transaction are updated to remove the now-redundant copy prop.

Changes

Always-copyable transaction detail rows

Layer / File(s) Summary
TransactionDetailRow always-copy refactor and call-site cleanup
pages/Transaction.tsx
TransactionDetailRow drops the copy prop and unconditionally wraps content in a TouchableOpacity with an onPress handler that calls Clipboard.setStringAsync(props.content) and shows a success toast. "Payment Hash", "Preimage", and "Metadata" call sites are updated to remove the now-redundant copy prop.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop, hop, a tap and it's done,
No copy prop needed — just press and run!
The hash, the preimage, the metadata too,
All leap to your clipboard without any ado.
One little touch, and the data takes flight,
Every field now copyable — feels just right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making all transaction field rows copyable, which directly aligns with the core objective of the pull request.
Linked Issues check ✅ Passed The pull request successfully implements the objective from issue #436 by refactoring TransactionDetailRow to remove the copy prop and make all fields uniformly copyable instead of selectively.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing copyability for transaction field rows, with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tx-row-copy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pages/Transaction.tsx`:
- Around line 309-322: The clipboard copy handler in TouchableOpacity shows a
success toast before the asynchronous copy finishes. Update the onPress callback
in Transaction.tsx to await Clipboard.setStringAsync(props.content) before
calling Toast.show, and add basic error handling so the success message only
appears after a successful copy. Reference the TouchableOpacity onPress block
and the Clipboard.setStringAsync call when making the change.
- Around line 309-318: The TouchableOpacity used for the copy action is missing
screen reader metadata, so add accessibility properties to the copy control in
Transaction so assistive tech can identify it as a button and understand that it
copies content to the clipboard. Update the TouchableOpacity in the Transaction
component to include a clear accessibility label and appropriate role/state,
keeping the existing onPress behavior and using the same copy-to-clipboard
action as the identifier for the element.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7cee17d3-cc72-449d-8779-fd0e4f243b0d

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce5cd6 and 2b9539b.

📒 Files selected for processing (1)
  • pages/Transaction.tsx

Comment thread pages/Transaction.tsx
Comment thread pages/Transaction.tsx
@im-adithya im-adithya merged commit 613dc04 into master Jun 17, 2026
3 checks passed
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.

All fields on transaction page should be copyable

1 participant