fix: display swaps and contract calls correctly in tx history (closes #3)

- Preserve contract call metadata (direction, label, method) when token
  transfers merge with normal txs in fetchRecentTransactions
- Handle 'contract' direction in counterparty display for home and
  address detail list views
- Add decoded calldata display to transaction detail view, fetching
  raw input from Blockscout and using decodeCalldata from approval.js
- Show 'Unknown contract call' with raw hex for unrecognized calldata
- Export decodeCalldata from approval.js for reuse
This commit is contained in:
clawbot
2026-02-27 12:03:57 -08:00
committed by user
parent 0ed7b8e61d
commit 76059c3674
6 changed files with 100 additions and 4 deletions

View File

@@ -945,6 +945,15 @@
<div class="text-xs text-muted mb-1">To</div>
<div id="tx-detail-to" class="text-xs break-all"></div>
</div>
<div id="tx-detail-calldata-section" class="mb-4 hidden">
<div class="text-xs text-muted mb-1">
Contract interaction
</div>
<div
id="tx-detail-calldata"
class="text-xs break-all border border-border border-dashed p-2"
></div>
</div>
<div class="mb-4">
<div class="text-xs text-muted mb-1">Transaction hash</div>
<div id="tx-detail-hash" class="text-xs break-all"></div>