Repository navigation
Conversation
This reverts commit 53409cc.
fixing v3/v4 signed compatibility
dont lookup by index but by named index
…ot parseEther which assumes 18
…hmac for ledger to prevent silent failures we enable display=true to get xpub as a fallback (for unusual paths). wallet hmac allows us to process non standard policies silently without requiring display
fix(keyring): derive concrete watch descriptor receive addresses
Add session-bound encryption for private application records
Guard formatted EVM sends at the final signing boundary
Use Node 26.12.1 and Yarn 1.22.22 for repository development and CI. Keep published package versions and consumer engine requirements unchanged.
Pin SDK build and CI tooling to Node 26
…loors fix: require patched syscoinjs in utils
…-floors fix: require patched Bitcoin dependencies in keyring
fix: pin keyring git dependency selector
refactor: isolate vault persistence behind async host storage
refactor: separate transaction hardware adapters from software core
feat: add an isolated software keyring entry
fix: preserve Pali EVM fee approvals in the shared keyring
chore: prepare keyring 1.0.628
build: omit compiled tests from keyring releases
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e2e065d2c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const legacyKey = await this.deriveLegacySessionKey(password, salt); | ||
| decryptedVault = await this.vaultPersistence.getDecryptedVault( | ||
| legacyKey |
There was a problem hiding this comment.
Restore raw-password decryption for existing CBC vaults
For wallets created by the pre-change initializeSession(), the vault is CryptoJS AES encrypted with the raw password, and vault-keys contains { hash, salt } without currentSessionSalt. This unlock path tries only the modern PBKDF2 key and then the 20,000-iteration PBKDF2 key; neither decrypts that existing format. Consequently, upgrading an ordinary existing wallet makes unlock(correctPassword) return { canLogin: false }. Authenticate and migrate the raw-password CBC format rather than treating every unmarked CBC vault as PBKDF2-encrypted.
Useful? React with 👍 / 👎.
| const oldSessionPassword = this.encryptSHA512( | ||
| password, | ||
| vaultKeys.currentSessionSalt | ||
| ); |
There was a problem hiding this comment.
Use the historical HMAC key for session-salt migration
For legacy currentSessionSalt vaults whose mnemonic is encrypted with the old session key, this now derives the wrong recovery key. Before this commit, encryptSHA512() used HMAC-SHA512; its replacement uses PBKDF2, so the subsequent recovery attempts try the raw password and a PBKDF2 key instead of the historical HMAC key. A valid legacy vault therefore throws Legacy vault secret could not be recovered even with the correct password. Keep the historical HMAC derivation specifically for reading these legacy records.
Useful? React with 👍 / 👎.
| await this.vaultPersistence.setEncryptedVault( | ||
| { mnemonic: decryptedMnemonic }, | ||
| sessionPasswordKey | ||
| ); |
There was a problem hiding this comment.
Preserve encrypted account keys when migrating the vault
When a currentSessionSalt vault has a plain or recoverable mnemonic, this migration succeeds but re-encrypts only the vault payload. Existing account xprv records were encrypted with the historical HMAC session key, while recreateSessionFromVault(sessionPasswordKey) installs the new PBKDF2 key. getDecryptedPrivateKey() and getPrivateKeyByAccountId() then try that new key against unchanged ciphertext, so unlock can succeed while existing imported accounts cannot sign or export their keys. Retain a compatible wrapping-key profile or migrate the encrypted account records before switching session keys; imported private keys cannot be reconstructed from the mnemonic.
Useful? React with 👍 / 👎.
| if (!tx.chainId) { | ||
| const network = await provider.getNetwork(); | ||
| tx.chainId = Number(network.chainId); | ||
| } |
There was a problem hiding this comment.
Reject explicit chain IDs that differ from the provider
For a software account selected on chain 1, sendFormattedTransaction() can pass an explicit chainId: 137 through to this helper. verifyConfiguredChainId() verifies the RPC against its configured chain, not against the transaction, and this conditional checks the provider network only when the transaction omits its chain ID. The helper therefore signs a chain-137 envelope and attempts to broadcast it through the chain-1 provider instead of rejecting before signing, unlike the previous Wallet.sendTransaction() path. Compare any supplied transaction chain ID with the provider network before producing a signature.
Useful? React with 👍 / 👎.
Moves the extension hardware adapter to Trezor Connect 10.0.1 and the supported Suite Desktop / Suite Web transport. Software-only imports remain isolated from browser hardware code. The upcoming keyring version is 1.0.629; this PR does not publish it.
The adapter normalizes Connect 10 errors and signatures, retains account/network/session signing guards, and rejects cancelled or stale results immediately. Raw cleanup is deferred while a remote request is pending because upstream disposal can trigger a new fallback window. Lock/destroy remain prompt; reconnection receives a terminal busy error until the old request settles. Suite Web may retain its old popup, whose late approval is discarded. No private upstream state mutation, global rejection suppression, or forced dependency overrides are used.
Validation: all 43 keyring suites / 1,395 tests passed; tsc and lint passed (three existing warnings). The full-suite diagnostic runner reported existing fixture timers and explicitly exited after the results, so natural full-suite process exit is not claimed. Focused tests exited normally. Independent actual Connect protocol checks cover Desktop/Web cancellation, held late responses, full keyring destruction and reconnect, wrong-origin/unknown-ID messages, and unknown errors without retries. All 141 packed distribution files were independently verified.
Candidate tarball SHA-256: b6bf9f244b3daf6ac84def44139000bcef443582c5aa295f530d538513bfd3a2. Pali must adopt the exact Suite origin in externally_connectable and pre-register the worker transport. Physical hardware/display confirmation is still required; mock transport tests do not establish device compatibility. A separate stacked cleanup will remove the legacy UTXO helper dependency before final Pali package qualification and npm publication.