Compare commits

..

1 Commits

Author SHA1 Message Date
user
6f04450c66 reorder transaction detail view: txid first, logical grouping with separators
Some checks failed
check / check (push) Failing after 6s
Reorganize the transaction detail view into logical blocks separated by
thin horizontal rules:

- Identity: transaction hash (first!), type, status
- Timing: time, block number
- Value: amount, native quantity, token contract, from, to
- Decoded details: action/protocol/steps (contract calls)
- Network details: nonce, gas price, gas used, fee
- Raw data: full calldata

Updates README screen map to reflect new field ordering and grouping.

closes #131
2026-03-01 07:24:41 -08:00
4 changed files with 111 additions and 135 deletions

View File

@@ -435,25 +435,35 @@ transitions.
#### TransactionDetail #### TransactionDetail
- **When**: User tapped a transaction row from AddressDetail or AddressToken. - **When**: User tapped a transaction row from AddressDetail or AddressToken.
- **Elements**: - **Elements** (grouped into logical blocks separated by thin rules):
- "Transaction" heading, "Back" button - "Transaction" heading, "Back" button
- Type: transaction classification — one of: Native ETH Transfer, ERC-20 - **Identity block**:
Token Transfer, Swap, Token Approval, Contract Call, Contract Creation
- Token contract: shown for ERC-20 transfers — color dot + full contract
address (tap to copy) + etherscan token link
- Status: "Success" or "Failed"
- Time: ISO datetime + relative age in parentheses
- Amount: value + symbol (bold)
- From: blockie + color dot + full address (tap to copy) + etherscan link
- ENS name if available
- To: blockie + color dot + full address (tap to copy) + etherscan link
- ENS name if available
- Transaction hash: full hash (tap to copy) + etherscan link - Transaction hash: full hash (tap to copy) + etherscan link
- Type: transaction classification — one of: Native ETH Transfer,
ERC-20 Token Transfer, Swap, Token Approval, Contract Call,
Contract Creation
- Status: "Success" or "Failed"
- **Timing block**:
- Time: ISO datetime + relative age in parentheses
- Block: block number (tap to copy) + etherscan block link - Block: block number (tap to copy) + etherscan block link
- **Value block**:
- Amount: value + symbol (bold)
- Native quantity: raw integer + unit (shown when available)
- Token contract: shown for ERC-20 transfers — color dot + full
contract address (tap to copy) + etherscan token link
- From: blockie + color dot + full address (tap to copy) + etherscan
link; ENS name if available
- To: blockie + color dot + full address (tap to copy) + etherscan
link; ENS name if available
- **Decoded details** (shown for contract calls):
- Action name, decoded parameters, token details, swap steps
- **Network details** (shown when on-chain data is available):
- Nonce: transaction nonce (tap to copy) - Nonce: transaction nonce (tap to copy)
- Transaction fee: ETH amount (tap to copy)
- Gas price: value in Gwei (tap to copy) - Gas price: value in Gwei (tap to copy)
- Gas used: integer (tap to copy) - Gas used: integer (tap to copy)
- Transaction fee: ETH amount (tap to copy)
- **Raw data** (shown when calldata is present):
- Full calldata in monospace dashed border
- **Transitions**: - **Transitions**:
- "Back" → **AddressToken** (if `selectedToken` set) or **AddressDetail** - "Back" → **AddressToken** (if `selectedToken` set) or **AddressDetail**

View File

@@ -1066,80 +1066,64 @@
</h2> </h2>
<!-- ── Identity ── --> <!-- ── Identity ── -->
<div class="tx-detail-group mb-1"> <div class="mb-2">
<div class="mb-3"> <div class="text-xs text-muted mb-1">Transaction hash</div>
<div class="text-xs text-muted mb-1"> <div id="tx-detail-hash" class="text-xs break-all"></div>
Transaction hash
</div> </div>
<div <div id="tx-detail-type-section" class="mb-2 hidden">
id="tx-detail-hash"
class="text-xs break-all"
></div>
</div>
<div id="tx-detail-type-section" class="mb-3 hidden">
<div class="text-xs text-muted mb-1">Type</div> <div class="text-xs text-muted mb-1">Type</div>
<div <div id="tx-detail-type" class="text-xs font-bold"></div>
id="tx-detail-type"
class="text-xs font-bold"
></div>
</div> </div>
<div class="mb-3"> <div class="mb-2">
<div class="text-xs text-muted mb-1">Status</div> <div class="text-xs text-muted mb-1">Status</div>
<div id="tx-detail-status" class="text-xs"></div> <div id="tx-detail-status" class="text-xs"></div>
</div> </div>
<div class="mb-1">
<hr class="border-border my-3" />
<!-- ── Timing ── -->
<div class="mb-2">
<div class="text-xs text-muted mb-1">Time</div> <div class="text-xs text-muted mb-1">Time</div>
<div id="tx-detail-time" class="text-xs"></div> <div id="tx-detail-time" class="text-xs"></div>
</div> </div>
<div id="tx-detail-block-section" class="mb-2 hidden">
<div class="text-xs text-muted mb-1">Block</div>
<div id="tx-detail-block" class="text-xs"></div>
</div> </div>
<hr class="border-border my-3" />
<!-- ── Value ── --> <!-- ── Value ── -->
<div class="tx-detail-group mb-1"> <div class="mb-2">
<div class="mb-3">
<div class="text-xs text-muted mb-1">Amount</div> <div class="text-xs text-muted mb-1">Amount</div>
<div id="tx-detail-value" class="text-xs"></div> <div id="tx-detail-value" class="text-xs"></div>
</div> </div>
<div class="mb-3 hidden"> <div class="mb-2 hidden">
<div class="text-xs text-muted mb-1"> <div class="text-xs text-muted mb-1">Native quantity</div>
Native quantity
</div>
<div id="tx-detail-native" class="text-xs"></div> <div id="tx-detail-native" class="text-xs"></div>
</div> </div>
<div <div id="tx-detail-token-contract-section" class="mb-2 hidden">
id="tx-detail-token-contract-section" <div class="text-xs text-muted mb-1">Token contract</div>
class="mb-1 hidden"
>
<div class="text-xs text-muted mb-1">
Token contract
</div>
<div <div
id="tx-detail-token-contract" id="tx-detail-token-contract"
class="text-xs break-all" class="text-xs break-all"
></div> ></div>
</div> </div>
</div> <div class="mb-2">
<!-- ── Parties ── -->
<div class="tx-detail-group mb-1">
<div class="mb-3">
<div class="text-xs text-muted mb-1">From</div> <div class="text-xs text-muted mb-1">From</div>
<div <div id="tx-detail-from" class="text-xs break-all"></div>
id="tx-detail-from"
class="text-xs break-all"
></div>
</div> </div>
<div class="mb-1"> <div class="mb-2">
<div class="text-xs text-muted mb-1">To</div> <div class="text-xs text-muted mb-1">To</div>
<div id="tx-detail-to" class="text-xs break-all"></div> <div id="tx-detail-to" class="text-xs break-all"></div>
</div> </div>
</div>
<!-- ── Protocol ── --> <!-- ── Decoded details ── -->
<div id="tx-detail-calldata-section" class="mb-1 hidden"> <div id="tx-detail-calldata-section" class="hidden">
<div class="tx-detail-group mb-1"> <hr class="border-border my-3" />
<div <div
id="tx-detail-calldata-well" id="tx-detail-calldata-well"
class="border border-border border-dashed p-2" class="mb-2 border border-border border-dashed p-2"
> >
<div class="text-xs text-muted mb-1">Action</div> <div class="text-xs text-muted mb-1">Action</div>
<div <div
@@ -1152,40 +1136,34 @@
></div> ></div>
</div> </div>
</div> </div>
</div>
<!-- ── On-chain details ── --> <!-- ── Network details ── -->
<div <div id="tx-detail-network-section" class="hidden">
id="tx-detail-onchain-group" <hr class="border-border my-3" />
class="tx-detail-group mb-1 hidden" <div id="tx-detail-nonce-section" class="mb-2 hidden">
>
<div id="tx-detail-block-section" class="mb-3 hidden">
<div class="text-xs text-muted mb-1">Block</div>
<div id="tx-detail-block" class="text-xs"></div>
</div>
<div id="tx-detail-nonce-section" class="mb-3 hidden">
<div class="text-xs text-muted mb-1">Nonce</div> <div class="text-xs text-muted mb-1">Nonce</div>
<div id="tx-detail-nonce" class="text-xs"></div> <div id="tx-detail-nonce" class="text-xs"></div>
</div> </div>
<div id="tx-detail-fee-section" class="mb-3 hidden"> <div id="tx-detail-gasprice-section" class="mb-2 hidden">
<div class="text-xs text-muted mb-1">Gas price</div>
<div id="tx-detail-gasprice" class="text-xs"></div>
</div>
<div id="tx-detail-gasused-section" class="mb-2 hidden">
<div class="text-xs text-muted mb-1">Gas used</div>
<div id="tx-detail-gasused" class="text-xs"></div>
</div>
<div id="tx-detail-fee-section" class="mb-2 hidden">
<div class="text-xs text-muted mb-1"> <div class="text-xs text-muted mb-1">
Transaction fee Transaction fee
</div> </div>
<div id="tx-detail-fee" class="text-xs"></div> <div id="tx-detail-fee" class="text-xs"></div>
</div> </div>
<div id="tx-detail-gasprice-section" class="mb-3 hidden">
<div class="text-xs text-muted mb-1">Gas price</div>
<div id="tx-detail-gasprice" class="text-xs"></div>
</div>
<div id="tx-detail-gasused-section" class="mb-1 hidden">
<div class="text-xs text-muted mb-1">Gas used</div>
<div id="tx-detail-gasused" class="text-xs"></div>
</div>
</div> </div>
<!-- ── Raw data ── --> <!-- ── Raw data ── -->
<div id="tx-detail-rawdata-section" class="mb-4 hidden"> <div id="tx-detail-rawdata-section" class="hidden">
<div class="tx-detail-group"> <hr class="border-border my-3" />
<div class="mb-2">
<div class="text-xs text-muted mb-1">Raw data</div> <div class="text-xs text-muted mb-1">Raw data</div>
<div <div
id="tx-detail-rawdata" id="tx-detail-rawdata"

View File

@@ -44,11 +44,3 @@ body {
background-color 225ms ease-out, background-color 225ms ease-out,
color 225ms ease-out; color 225ms ease-out;
} }
/* Transaction detail view — visual grouping of related fields */
.tx-detail-group {
border-bottom: 1px solid var(--color-border-light);
padding-bottom: 0.5rem;
margin-bottom: 0.5rem;
padding-top: 0.25rem;
}

View File

@@ -190,15 +190,14 @@ function render() {
const rawDataSection = $("tx-detail-rawdata-section"); const rawDataSection = $("tx-detail-rawdata-section");
if (rawDataSection) rawDataSection.classList.add("hidden"); if (rawDataSection) rawDataSection.classList.add("hidden");
// Hide on-chain detail sections (and their group wrapper) until populated // Hide on-chain detail sections until populated
const onchainGroup = $("tx-detail-onchain-group");
if (onchainGroup) onchainGroup.classList.add("hidden");
for (const id of [ for (const id of [
"tx-detail-block-section", "tx-detail-block-section",
"tx-detail-nonce-section", "tx-detail-nonce-section",
"tx-detail-fee-section", "tx-detail-fee-section",
"tx-detail-gasprice-section", "tx-detail-gasprice-section",
"tx-detail-gasused-section", "tx-detail-gasused-section",
"tx-detail-network-section",
]) { ]) {
const el = $(id); const el = $(id);
if (el) el.classList.add("hidden"); if (el) el.classList.add("hidden");
@@ -287,11 +286,10 @@ function populateOnChainDetails(txData) {
); );
} }
// Show the on-chain details group if any child section is visible // Show the network details wrapper if any child section is visible
const onchainGroup = $("tx-detail-onchain-group"); const networkWrapper = $("tx-detail-network-section");
if (onchainGroup) { if (networkWrapper) {
const hasVisible = [ const hasVisible = [
"tx-detail-block-section",
"tx-detail-nonce-section", "tx-detail-nonce-section",
"tx-detail-fee-section", "tx-detail-fee-section",
"tx-detail-gasprice-section", "tx-detail-gasprice-section",
@@ -300,9 +298,7 @@ function populateOnChainDetails(txData) {
const el = $(id); const el = $(id);
return el && !el.classList.contains("hidden"); return el && !el.classList.contains("hidden");
}); });
if (hasVisible) { if (hasVisible) networkWrapper.classList.remove("hidden");
onchainGroup.classList.remove("hidden");
}
} }
// Bind copy handlers for newly added elements // Bind copy handlers for newly added elements