fix: use grey well for contract address in address-token view (closes #9) #15
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#15
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/address-token-grey-well"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses feedback on #9: contract address now displays in a visually distinct grey well (bg-hover + dashed border) below the token balance, separate from the wallet address.
Changes:
border-b border-border-light→bg-hover border border-border border-dashed p-3 mb-3Don't need a border on the well. Round the corners slightly to make it informational and give the well a bit more horizontal margin. Put each key/value of the token attributes on its own line, we have lots of vertical room but limited horizontal room. Move the well below the send/receive buttons. Add a link to the project/token URL if you have it in the tokenlist, in the list of key/val attributes along with holders/decimals/symbol.
On it — will:
Spawning a sub-agent now.
Updated per feedback:
rounded-md), horizontal margin (mx-1)make checkpasses (prettier clean, 14 tests). Re-assigned to sneak.Review
LGTM — rework looks good.
✅ Well moved below send/receive buttons
✅ Border removed,
bg-hover rounded-md+ horizontal margin✅ Each attribute on its own line (name, symbol, decimals, holders, website)
✅ Project URL from tokenlist when available
✅
make checkpasses (tests + prettier)Assigning to sneak.
Branch
fix/contract-address-displaypushed. Changes:make checkpasses (14 tests + lint clean)Reviewing now before assigning.
Hmm, something's broken. Clicking the ERC20 on the
addressview doesn't go to theaddress-tokenview anymore.Investigating. The PR only modifies
src/popup/index.html(moving + restyling the contract-info div) andsrc/popup/views/addressToken.js(reformatting the info HTML). NeitheraddressDetail.jsnorhelpers.js(which contain the balance-row click handler andshowAddressToken()call) are touched.The click flow is:
.balance-rowelements in#address-balances→state.selectedToken = row.dataset.token→ctx.showAddressToken(). This code is identical to main.Could this be a pre-existing issue on main, or is it specific to this branch? Can you confirm clicking an ERC-20 balance row works on main but not on this branch? That would help me narrow down whether the HTML element repositioning somehow breaks the event binding.
Found the bug:
TOKEN_BY_ADDRESSwas used inaddressToken.jsbut never imported. This causedshow()to crash with a ReferenceError when navigating to the address-token view, which is why clicking an ERC-20 token did nothing.Fixed — added the missing import. Re-assigned to sneak.
Nope, still can't get to address-token view. The issue does not exist on
main.3413e696dbto3b419c7517Found the bug —
TOKEN_BY_ADDRESSwas used inaddressToken.jswithout being imported. This caused aReferenceErrorwhen trying to show the address-token view, preventing navigation entirely.Fix pushed: added
const { TOKEN_BY_ADDRESS } = require("../../shared/tokenList");import.(Note:
make testhas a pre-existing failure on main —uniswap.test.jscan't resolve a module. That's not from this PR.)This works, but now the contract address is wrapping. Reduce the margins.
Reduced margins from
mx-4tomx-1— should stop the address from wrapping. Pushed.