Show the transaction id on an expanded wallet activity - #3509
Conversation
Adds the Hive transaction id to the expanded row, with a copy button that puts the hivexplorer.com link on the clipboard. The id was being dropped in grooming, so it is carried through for both the chain and the Hive Engine histories. Neither always has one: a virtual operation is emitted by the chain rather than broadcast and carries 40 zeroes, and a Hive Engine row a contract generated carries a block reference instead of a transaction. Those rows show no id and no copy button rather than a dead link.
Code Review by Qodo
1.
|
PR Summary by QodoDisplay and copy Hive transaction IDs in expanded wallet activity rows
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan includes up to 2 reviews per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change carries valid Hive transaction IDs through wallet activity data, derives Hive Explorer links, and adds conditional transaction-ID display with copy-to-clipboard feedback in expanded wallet activity details. ChangesWallet transaction explorer links
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change adds transaction IDs and copyable explorer links to expanded wallet activity rows while preserving behavior for rows without transactions; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant TransactionView
participant WalletLineItem
participant ClipboardUtility
participant ToastDispatcher
TransactionView->>TransactionView: derive explorer URL from item.trxId
TransactionView->>WalletLineItem: provide copy callback
WalletLineItem->>TransactionView: invoke onCopyPress
TransactionView->>ClipboardUtility: writeToClipboard(explorer URL)
ClipboardUtility-->>TransactionView: return copy result
TransactionView->>ToastDispatcher: dispatch localized success or failure notification
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Code Review by Qodo
1.
|
| it('offers no link where there is no transaction', () => { | ||
| expect(getTransactionExplorerUrl('0000000000000000000000000000000000000000')).toBeUndefined(); |
There was a problem hiding this comment.
2. Lines exceed 100 characters 📘 Rule violation ⚙ Maintainability
New test lines exceed the 100 character limit, reducing readability and violating the line-length policy. Wrap these expectations across multiple lines to keep each non-comment line within 100 characters.
Agent Prompt
## Issue description
Some newly added non-comment lines exceed 100 characters.
## Issue Context
The project compliance rule requires keeping non-comment, non-whitespace lines at or under 100 characters unless an approved exception mechanism is used.
## Fix Focus Areas
- src/utils/transactionExplorer.test.ts[60-63]
- src/utils/wallet.test.ts[417-424]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Theme the copy icon instead of hardcoding the light-theme grey its siblings use, label it for screen readers and handle a clipboard rejection so an onPress handler cannot leave an unhandled promise rejection and a silent failure.
|
Three of four taken, in 64bf286. 1. Hardcoded 2. Lines exceed 100 characters — not reproducible. 3. Clipboard errors unhandled — fixed. 4. Copy button unlabeled — fixed. |
Closes #3506
Tapping a wallet activity expands it to show the counterparty and the memo. It now also shows the Hive transaction id, with a copy button that puts
https://hivexplorer.com/tx/{id}on the clipboard.The id never reached the component: the SDK maps
trx_idonto every history row, andgroomingTransactionDatabuilt a freshCoinActivitywithout it. Same for Hive Engine, whereconvertEngineHistoryalready carriedtransactionIdandgroomingEngineHistorykept only_id.Rows that have no transaction
resolveTrxIdreturns undefined and the row renders as it did before, with no id and no copy button:author_reward,curation_reward,fill_order,fill_vesting_withdraw, ...) is emitted by the chain rather than broadcast, soget_account_historygives it atrx_idof 40 zeroes. On the HIVE tab of the reporting account these were 5 of 33 rows.<hive-trx-id>-<op index>when it rode in on a custom_json, which is trimmed to the transaction, and<block>-<index>when a contract generated it with nothing to link to. Both shapes appear in one account's history: 184 of 500 rows sampled were not a bare transaction id.Points activities have no chain transaction and are untouched.
Verified
https://hivexplorer.com/tx/<40 hex>answers 200 for a real transaction id from the account's history. The id shapes in the tests are real values taken from livecondenser_api.get_account_historyandhistory.hive-engine.comresponses.Wants a device pass: expand a transfer and confirm the copied link opens that transaction, then expand an author reward and confirm there is no copy button.
Summary by CodeRabbit
New Features
Bug Fixes
Tests