feat: EIP-712 signature requests (WALLET-1251)#1342
Merged
Conversation
Comp0te
reviewed
Jun 15, 2026
Comp0te
reviewed
Jun 15, 2026
# Conflicts: # package-lock.json # package.json
- persist eip712 payload by adding eip712PayloadReceived to updateVaultCipher trigger list, preventing a hung request after a service-worker restart - wrap handleSign key reconstruction + signing in try/catch, sending signTypedDataError on failure instead of leaving the dapp promise hanging - guard the eip712 payload JSON.parse and send signTypedDataError on malformed data instead of throwing during render - advertise signTypedData in CasperWalletSupports and getActiveAccountSupports (software accounts only) so dapps can feature-detect EIP-712 - reject watch-only accounts (no secret key) before signing - harden optional chaining when reading the signing account balance - import FormatDistanceToken from the date-fns package root Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The SDK bump 5.0.10 -> 5.0.12 changed the HTTP error format: a 500 response now throws HttpError(status, Error(statusText)), so the transfer error screen renders 'Internal Server Error' instead of 'failed to send http request, details: Code: 500, err: Internal Server Error'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comp0te
reviewed
Jun 16, 2026
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.
WALLET-1251 — EIP-712 signature requests
Jira: https://make-software.atlassian.net/browse/WALLET-1251 (epic WALLET-1250, release CW 2.5.0)
Adds the EIP-712 typed-data signing flow: a dapp calls
provider.signTypedData(params, publicKey), the user sees a window with Domain/Message blocks and signs with a software key, and the dapp receives the signature. All domain logic lives incasper-wallet-core(eip712Repository); the wallet renders the prepareddomainRows/messageRowsand signs.How it works
Changes
Dependencies / compilation
casper-js-sdk5.0.10 → 5.0.12 (deduplicates with the core copy),date-fns2.30 → ^4 (fixes theenUSimport in core)casper-js-sdk/dist/...moved to the package root (5.0.12 no longer ships.jsat those paths)SDK / protocol (
src/content/)sdk.ts:signTypedData(params, signingPublicKeyHex)methodsdk-method.ts:signTypedDataRequest/Response/Erroractionssdk-types.ts:SignTypedDataParams,SignTypedDataResult,EIP712HashArtifacts(contract aligned with the playground)index.ts: whitelist response/error in the content proxy (otherwise the call hangs)Background / redux
eip712ByIdfield +eip712PayloadReceived+selectEip712JsonById(follows the deployjsonByIdpattern)WindowApp.SignatureRequestEip712+RouterPath.SignEip712signTypedDataRequesthandler inbackground/index.tsUI (
src/apps/signature-request/pages/sign-eip712/)useFetchDataForEip712RequesthookEip712DisplayRow— presentation → component mapper (AccountInfoRow/ContractInfoRow/Hash/ text), all rows lay out label↔value viaSpaceBetweenFlexRowEip712NetworkRow— Network with icon (reusesNetworkIconColor+ the resolver from sign-transaction)SignEip712Content— Domain + Message blocksSignEip712Page— fetch + sign + cancel, route wired upLedger guard
signingAccount.hardware === HardwareWalletType.Ledgercheck sendssignTypedDataErrorback to the dapp and throws, so the user sees the ErrorBoundary screen. NewErrorMessages.signTypedData.LEDGER_NOT_SUPPORTEDconstant.Testing
npm run ci-check— green (format + lint + tsc + test)npm run build:chrome— successfulContractInfoRowfor a real package hash, and the Ledger-account rejection pathNotes
presentation: 'string'and the hash is shown in full. Recommendation for core — forcepresentation: 'hash'forcontract_package_hash. With a real package hash the row renders asContractInfoRowcorrectly.🤖 Generated with Claude Code