feat(eip712): improve account presentation — show public key, fix hash label, adaptive row wrap (WALLET-1321)#1372
Merged
Comp0te merged 3 commits intoJun 26, 2026
Conversation
Reverts the internal provider method, action creators (and their action-type strings) and the ErrorMessages key from `signTypedDataEIP712` to `signTypedData`, realigning with the `signMessage`/`signDeploy` convention. The public `CasperWalletSupports.signTypedDataEIP712 = 'sign-typed-data-eip712'` value is intentionally kept. Bumps casper-wallet-core to 3d944e3, which renames the repository signing method to `signTypedData` (used in sign-eip712).
Comp0te
approved these changes
Jun 26, 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.
What & why
WALLET-1321 — improve how accounts are presented in EIP-712 signature requests.
After WALLET-1251 fixed
addressdecoding, account rows display the bare 32-byte account hash, even though theaccountInfoenrichment already carries the related public key. This PR shows the public key (and the saved account/contact name) when we have it, corrects the hash label, and makes long rows wrap adaptively.Changes
eip712-display-row.tsx): theaccountrow passesaccountInfo.publicKeytoAccountInfoRowwhen present (fallback to the account hash). This also fixes, for known accounts, the explorer link, the identicon, and the saved-name lookup (which compares againstpublicKeyand previously never matched an account hash).account-info-row.tsx): new optionalisAccountHash?: booleanprop. When set it forces theAccount hash/Public keylabel instead of relying on thestartsWith('01'|'02')heuristic that mislabels some account hashes. Defaultundefinedkeeps the existing heuristic, so all other screens that useAccountInfoRoware unaffected.RowDataContainergainsflex-wrap: wrap. Rows stay on a single line when there is room and wrap the value to a second, left-aligned line only when it would crowd the label (no forced column). Scalars (Value,Nonce, dates) stay single-row.Method rename —
signTypedDataEIP712→signTypedDataReverts the verbose
signTypedDataEIP712naming back tosignTypedData, realigning the typed-data signing method with the existingsignMessage/signDeployconvention:sdk.ts): the public, dapp-facing method isprovider.signTypedData(...)again.sdk-method.ts) and their action-type strings (CasperWalletProvider:SignTypedData/:Response/:Error), the background and content handlers, and theErrorMessages.signTypedDatakey.casper-wallet-corere-bump to448c7cb, which renames the repository method toeip712Repository.signTypedData(...)(used insign-eip712).CasperWalletSupports.signTypedDataEIP712 = 'sign-typed-data-eip712'capability value.Scope
The account-presentation changes are wallet frontend only — core already exposes
row.accountInfo.publicKey, so they need no core change. The bundled method rename (above) additionally re-bumpscasper-wallet-coreto thesignTypedDatarepository-method commit.Testing
This repo does not unit-test React components (zero
.tsxtests;testEnvironment: node;npm run testruns without--coverage), so changes are verified the established way:npm run ci-check— format, lint (0 errors), tsc, test (28 passed) all green.owner/spendershow the public key + saved name for known accounts; unknown accounts show the account hash labelled "Account hash" with no false "Public key"; the TransferWithAuthorization package row is unchanged; long rows wrap only when cramped; signing a typed-data request resolves throughprovider.signTypedData(...).Out of scope
subject == signerwarning (still deferred from WALLET-1251).