Repository navigation
Page 0.14.4: signatures for the wallets' signing window; Base in the overview - #266
Merged
Merged
Conversation
The signing window of the browser extension and of the app (sign-plan.js) decodes by itself only the token calls, and warned on every other call. The page now gives it, for the calls of a request, the signatures it knows: the called contract's verified ABI from the explorer (abi-decode.js, functionsOf), then the page's own decoders (its interfaces, call-decode.js's signatures). A signature is given only when it decodes the call (the arguments encoded again are the call data). The window checks each one again against the data before it shows the call by name and arguments (extension 0.2.8, app 0.10.3). window.__upwalletSignatureHints(req) reads the calls of a Key Manager transaction or of an operation of the UP (execute, executeBatch, a call of the UP to itself), at most 64. Inline script hashes updated (tools/csp.js). WALLET-BACKLOG.md says what the window shows and how it warns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
…r request
On Base, a UP that holds many tokens (airdrops, spam) had its token metadata read one by one: through the
browser extension the network's reading took longer than the overview waits (60 s), and Base was left
out ("8 of 9", then no Base). Now the metadata are read 6 at a time and kept 30 days (a token's name,
symbol, decimals and logo do not change), and every indexer request gives up after 20 s, so Alchemy's
failure falls back to Blockscout as before. Measured with 300 tokens and 150 ms per answer: 8 s the first
time (was over 45 s), 0.2 s at the next refresh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
"Not read: Base (assets: timeout 60 s)" instead of "network not reachable" for every cause: each step's timeout names the step (RPC, assets), and the error is shown with the network. Reported in the extension: the overview stopped at "8 of 9" and left Base out, with Alchemy's calls for Base answered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
…rview says when NFTs were not read The browser extension's Alchemy key gets no NFTs (HTTP 403), so for every network the NFTs come from its Blockscout. Base's Blockscout can be slow, and that read had no time limit: Base's whole reading went past the overview's 60 s, and Base was left out, tokens included (the identity page on the site, whose key gets the NFTs from Alchemy, showed Base fine). Now the fallback gives up after 25 s (every request after 20 s), the tokens already read are kept, and the network's card says "NFTs not read (...)". Measured with Blockscout never answering: Base read in 20 s, its tokens shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
1. Function signatures for the wallets' signing window
The signing window of the browser extension and of the Android app (
sign-plan.js) decodes by itself only token calls, so it warned on every other call ("unknown function"), even ones the wallet page fully understands. This PR lets the page hand the window the function signatures it knows, so the window can show those calls by name and arguments and warn only from what they actually do.up-wallet.html:window.__upwalletSignatureHints(req)reads the calls of a request (Key Managerexecute(bytes), the UP'sexecute/executeBatch, a call of the UP to itself; at most 64) and returns{ selector: "function name(type name, ...)" }.call-decode.jssignatures.abi-decode.js:AbiDecode.functionsOf(chainId, address).call-decode.js:CallDecode.signatures().node tools/csp.js);PAGE_VERSION0.14.4;WALLET-BACKLOG.mddescribes the new behaviour.The window side (extension 0.2.8, app 0.10.3, committed to their repos) does not trust the page. It uses a hint only if its selector is the call's and it decodes the data exactly. Then:
to/receiverthat is not the UP, bytes after the arguments, a call neither side decodes;2. Base left out of the extension's network overview
Symptom. In the extension, the overview counted "8 of 9", then dropped Base. The identity page on the site, which runs the same
asset-list.jsand the same Base RPC, showed Base fine.Cause. The extension's Alchemy key gets no NFTs (HTTP 403), so the NFTs come from each network's Blockscout. That read had no time limit, and Base's Blockscout can be slow. Base's whole reading then went past the overview's 60 s, so Base was dropped, tokens included.
Changes in
asset-list.js:Changes in
up-wallet.html:Tests
deposit,supplyandaddSupplieras hints; the unknown0xdeadbeefgets none.sign-plan.js: 3 calls are shown by name and arguments, 1 warning (the unknown call), no red.receiverthat is not the UP is warned.AssetList.liston Base, Alchemy mocked):nftErris "HTTP 403; Blockscout: timeout". Before, the read was unbounded.node tools/csp.js --check: all pages up to date.c81c3d2:test/sign-plan.js34/34, with 13 new cases.test/extension.js83/83, with a new end-to-end hint case.c81c3d2: 11/11, 35/35 (new: hints through the phone key), 22/22, 44/44.🤖 Generated with Claude Code
https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x