chore: remove dead exports and share copied view helpers (closes #168)
AddressDetail and AddressToken defined their own isoDate() and timeAgo(), hiding the shared pair in helpers.js, so a fix there would not have reached them. The copies were identical and are deleted; blockieHtml() and tokenLabel(), each defined twice, move to helpers.js. A new test shows the history rows and the transaction detail view write the time with the shared pair. Deleted as never called: explorerLink(), ETHEREUM_SEPOLIA_CHAIN_ID, getWalletValue() and getTotalValue() with their tests. Home's "Total:" is the active address's total, as README.md already says. addressColor() and etherscanAddressUrl() are no longer exported. Model: opus-5-5
This commit was merged in pull request #454.
This commit is contained in:
@@ -840,10 +840,12 @@ something when you click it.
|
||||
The same data must be formatted identically everywhere it appears. Token and ETH
|
||||
amounts are displayed with exactly 4 decimal places (e.g. "1.0500 ETH", "17.1900
|
||||
USDT") in balance lists, transaction lists, send confirmations, and approval
|
||||
screens. Timestamps include both an ISO datetime and a humanized relative age
|
||||
wherever shown. If a formatting rule applies in one place, it applies in every
|
||||
place. Users should never see the same value rendered differently on two
|
||||
screens.
|
||||
screens. A transaction's time includes both an ISO datetime and a humanized
|
||||
relative age, written by `isoDate()` and `timeAgo()` in
|
||||
`src/popup/views/helpers.js` on every screen that shows one; the ISO datetime is
|
||||
in UTC when the UTC Timestamps setting is on. If a formatting rule applies in
|
||||
one place, it applies in every place. Users should never see the same value
|
||||
rendered differently on two screens.
|
||||
|
||||
The native token's label is a network's `nativeCurrency` in
|
||||
`src/shared/networks.js`: `ETH` on mainnet, `SepoliaETH` on Sepolia. The
|
||||
|
||||
Reference in New Issue
Block a user