Conversation
…bs.com, block explorer sonicscan.org, with full activity/asset/NFT handler integration
Add Sonic network support
…o devop/release-2-9
fix: node urls
devop: hw wallet typed message support
Enable `Changelly` swaps on Rootstock
Created Solana staking banners
Fix Solana staking banner UI bugs
Fix/solana staking banner fix
prep: release v2.9.0
WalkthroughThis update introduces support for the Sonic network, adds Solana staking promotional banners with persistent state management, and implements typed message (EIP-712) signing for hardware wallets. Numerous package dependencies are updated across the repository. The changes include new Vue components for banners, new metrics tracking events, and enhancements to network and asset handler logic. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AppMenu
participant BannersState
participant SolanaStakingBanner
User->>AppMenu: Open menu
AppMenu->>BannersState: showSolanaStakingBanner()
BannersState-->>AppMenu: (async) true/false
AppMenu->>SolanaStakingBanner: Render if true
User->>SolanaStakingBanner: Click close
SolanaStakingBanner->>AppMenu: Emit close
AppMenu->>BannersState: hideSolanaStakingBanner()
AppMenu->>SolanaStakingBanner: Remove from view
sequenceDiagram
participant DApp
participant ExtensionUI
participant TypedMessageSigner
participant HWwalletManager
participant HWProvider
DApp->>ExtensionUI: Request typed message signature
ExtensionUI->>TypedMessageSigner: Call with options
TypedMessageSigner->>HWwalletManager: signTypedMessage(options)
HWwalletManager->>HWProvider: signTypedMessage(options)
HWProvider-->>HWwalletManager: Signature or error
HWwalletManager-->>TypedMessageSigner: Signature or error
TypedMessageSigner-->>ExtensionUI: Signature or error
ExtensionUI-->>DApp: Return signature or error
Possibly related PRs
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
💼 Build Files |
There was a problem hiding this comment.
Actionable comments posted: 3
🔭 Outside diff range comments (4)
packages/signers/ethereum/package.json (1)
21-23: Update theengines.nodefield to satisfy ESLint v9’s minimum requirementESLint 9.x (introduced in this diff) officially requires Node ≥ 18.18.0.
Keeping"node": ">=14.15.0"will break installs wherenpm/pnpmenforces
engines, or CI runs with Node 16."engines": { - "node": ">=14.15.0" + "node": ">=18.18.0" },Also applies to: 38-38
packages/request/package.json (1)
21-23: Node engine constraint now too low for ESLint v9Same as in the Ethereum signer package: ESLint 9.x demands Node ≥ 18.18.0.
Please bump theengines.nodedeclaration so CI/dev installs don’t fail."engines": { - "node": ">=14.15.0" + "node": ">=18.18.0" },Also applies to: 37-37
packages/name-resolution/package.json (1)
21-23: Bumpengines.nodefor ESLint v9 compatibilityESLint 9.x requires Node ≥ 18.18.0. The current declaration still lists 14.x.
"engines": { - "node": ">=14.15.0" + "node": ">=18.18.0" },Also applies to: 28-28
packages/extension/package.json (1)
93-141: ESLint 9 & Vite 6 may require config updates
Both tools shipped breaking default-rule / plugin changes. If the IDE still auto-fixes but CI fails, check:
.eslintrc.cjsfor deprecated rulesvite.config.tsfor renamed hooks
This usually surfaces only in CI; better runyarn lint && yarn buildlocally now.
♻️ Duplicate comments (2)
packages/extension/src/ui/action/components/app-menu/index.vue (2)
271-273: Apply consistent error handling pattern.Similar to the network-assets component, this banner state check should include error handling.
Consider adding error handling for consistency:
+ try { if (await bannersState.showSolanaStakingBanner()) { isSolanaStakingBanner.value = true; } + } catch (error) { + console.error('Failed to check banner state:', error); + }
547-550: Apply consistent error handling pattern.Similar to the network-assets component, the banner close operation should handle storage errors.
Consider adding error handling for consistency:
const closeSolanaStakingBanner = () => { isSolanaStakingBanner.value = false; - bannersState.hideSolanaStakingBanner(); + try { + bannersState.hideSolanaStakingBanner(); + } catch (error) { + console.error('Failed to update banner state:', error); + } };
🧹 Nitpick comments (15)
packages/storage/package.json (1)
31-46: Dev-tooling bumps are fine, but you can dedupe & avoid the meta-package
typescript-eslintis only a meta roll-up that adds no functionality when@typescript-eslint/{parser,eslint-plugin}are already declared – you can safely drop it to reduce install size.- Since every package repeats the exact same devDependency versions, consider using Yarn’s
portal:/root-level devDeps or a dedicated “tooling” workspace to avoid version drift.packages/extension-bridge/package.json (1)
64-65: Same comment as storage – drop standalonetypescript-eslintSee explanation in the storage package review; the meta-package can be removed.
packages/signers/bitcoin/package.json (1)
49-50: Duplicate meta-package
typescript-eslintduplication same as earlier packages.packages/types/package.json (1)
41-41: Remove redundanttypescript-eslintmeta-packageAs noted across other packages.
packages/signers/ethereum/package.json (1)
35-38: Align@typescript-eslint/*package versions with the umbrellatypescript-eslintmeta-packageThe meta package
typescript-eslintis still pinned to8.34.1, which is good, but
you’ve converted the plugin & parser to caret ranges (^8.34.1).
For predictability, use the same specifier style across the trio—or, even better,
let the workspace protocol resolve everything:- "@typescript-eslint/eslint-plugin": "^8.34.1", - "@typescript-eslint/parser": "^8.34.1", - "typescript-eslint": "8.34.1", + "@typescript-eslint/eslint-plugin": "workspace:^", + "@typescript-eslint/parser": "workspace:^", + "typescript-eslint": "workspace:^",This keeps all sub-packages on the exact same version and avoids accidental drift.
Also applies to: 49-50
packages/request/package.json (1)
35-38: Keep@typescript-eslint/*version specifiers consistentRecommend using the workspace range (or the same specifier) for the plugin,
parser and meta package to avoid version skew, as illustrated in the
Ethereum-signer comment.Also applies to: 48-49
packages/name-resolution/package.json (1)
26-29: Standardise@typescript-eslint/*specifiersMirror the suggestion in the other packages: adopt a uniform
workspace:^
(or other single strategy) for plugin, parser and meta package.Also applies to: 39-41
packages/utils/package.json (1)
27-37: Consistent tooling version & caret prefix
typescript-eslintis declared twice: once split into plugin/parser (^8.34.1) and again as the meta-package without a caret ("typescript-eslint": "8.34.1").
Mixing caret/no-caret hampers monorepo deduplication and might freeze only this workspace at patch 34. Please unify:- "typescript-eslint": "8.34.1", + "typescript-eslint": "^8.34.1",(or drop it entirely; the standalone meta package is usually unnecessary with the scoped pair).
Also applies to: 48-49
packages/extension/src/ui/action/icons/common/enkrypt-staking-logo-white.vue (2)
1-6: Add accessible label for the inline SVG
Screen readers will ignore an unlabeled decorative SVG. If this logo conveys meaning (brand) supplyrole="img"+aria-labelor wrap in<title>. Otherwise setaria-hidden="true".-<svg width="121" height="24" viewBox="0 0 121 24" ... +<svg + width="121" + height="24" + viewBox="0 0 121 24" + fill="none" + xmlns="http://www.w3.org/2000/svg" + role="img" + aria-label="Enkrypt staking logo" +>
30-35: Style block can be dropped unless overridden elsewhere
The explicitinline-block&vertical-alignare default for inline SVG in modern browsers. If not needed, removing the scoped style reduces CSS payload.packages/extension/src/providers/ethereum/networks/tlos.ts (1)
18-18: Verify new RPC endpoint stability
https://rpc.telos.netis correct but rate-limited. The former EU node remains as fallback. Consider passing an array of nodes or keep a secondary URL to prevent wallet-wide outage.packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue (1)
33-38: Consider removing or reducing the hardcoded delay.The 1000ms delay before opening the staking link creates unnecessary friction in the user experience. If this delay is intended to ensure tracking completes, consider a more user-friendly approach.
const openStakingLink = async () => { trackSolanaStakingBanner(SolanaStakingBannerEvents.SolanaWalletClicked); - setTimeout(() => { - openLink('https://staking.enkrypt.com'); - }, 1000); + // Allow tracking to complete without blocking user interaction + openLink('https://staking.enkrypt.com'); };Alternatively, if the delay is necessary for tracking reliability, consider reducing it to 100-200ms for better UX.
packages/extension/src/libs/banners-state/index.ts (1)
20-21: Fix the typo in Solana property names.There's a consistent typo in the property names -
isHideSolanStakingBannershould beisHideSolanaStakingBanner(missing 'a' in "Solana"). This affects multiple lines and should be corrected for consistency.- isHideSolanStakingBanner: false, + isHideSolanaStakingBanner: false,Similar corrections needed in other methods that reference this property.
Also applies to: 30-30, 36-36, 41-41, 46-46, 52-52
packages/extension/src/ui/action/views/network-assets/index.vue (2)
150-155: Consider error handling for banner state operations.The async banner state check should handle potential errors to prevent component initialization failures.
onMounted(async () => { updateAssets(); - if (await bannersState.showNetworkAssetsSolanaStakingBanner()) { - isSolanaStakingBanner.value = true; - } + try { + if (await bannersState.showNetworkAssetsSolanaStakingBanner()) { + isSolanaStakingBanner.value = true; + } + } catch (error) { + console.error('Failed to check banner state:', error); + } });
184-187: Consider error handling for banner state persistence.The banner close operation should handle potential storage errors gracefully.
const closeSolanaStakingBanner = () => { isSolanaStakingBanner.value = false; - bannersState.hideNetworkAssetsSolanaStakingBanner(); + try { + bannersState.hideNetworkAssetsSolanaStakingBanner(); + } catch (error) { + console.error('Failed to update banner state:', error); + } };
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
packages/extension/src/ui/action/assets/banners/solana-staking-banner-bg.pngis excluded by!**/*.pngpackages/extension/src/ui/action/assets/banners/solana-staking-banner-tokens-img.pngis excluded by!**/*.pngpackages/extension/src/ui/action/assets/banners/solana-staking-banner.pngis excluded by!**/*.pngyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (55)
package.json(1 hunks)packages/extension-bridge/package.json(2 hunks)packages/extension/package.json(6 hunks)packages/extension/src/libs/banners-state/index.ts(1 hunks)packages/extension/src/libs/banners-state/types.ts(1 hunks)packages/extension/src/libs/metrics/index.ts(5 hunks)packages/extension/src/libs/metrics/types.ts(1 hunks)packages/extension/src/providers/common/libs/new-features.ts(1 hunks)packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts(1 hunks)packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts(1 hunks)packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts(1 hunks)packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts(1 hunks)packages/extension/src/providers/ethereum/libs/transaction/index.ts(1 hunks)packages/extension/src/providers/ethereum/networks/index.ts(2 hunks)packages/extension/src/providers/ethereum/networks/sdn.ts(1 hunks)packages/extension/src/providers/ethereum/networks/sonic.ts(1 hunks)packages/extension/src/providers/ethereum/networks/tlos.ts(1 hunks)packages/extension/src/providers/ethereum/networks/vic.ts(1 hunks)packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue(3 hunks)packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue(2 hunks)packages/extension/src/providers/ethereum/ui/libs/signer.ts(2 hunks)packages/extension/src/providers/ethereum/ui/types.ts(1 hunks)packages/extension/src/types/provider.ts(2 hunks)packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue(1 hunks)packages/extension/src/ui/action/components/app-menu/index.vue(9 hunks)packages/extension/src/ui/action/icons/banners/attractive-apr-icon.vue(1 hunks)packages/extension/src/ui/action/icons/banners/consistent-rewards-icon.vue(1 hunks)packages/extension/src/ui/action/icons/common/close-icon-white.vue(1 hunks)packages/extension/src/ui/action/icons/common/enkrypt-staking-logo-white.vue(1 hunks)packages/extension/src/ui/action/icons/common/enkrypt-staking-logo.vue(1 hunks)packages/extension/src/ui/action/views/network-assets/components/network-assets-solana-staking-banner.vue(1 hunks)packages/extension/src/ui/action/views/network-assets/index.vue(5 hunks)packages/hw-wallets/package.json(4 hunks)packages/hw-wallets/src/index.ts(2 hunks)packages/hw-wallets/src/ledger/bitcoin/index.ts(2 hunks)packages/hw-wallets/src/ledger/ethereum/index.ts(3 hunks)packages/hw-wallets/src/ledger/solana/index.ts(2 hunks)packages/hw-wallets/src/ledger/substrate/index.ts(2 hunks)packages/hw-wallets/src/trezor/bitcoin/index.ts(2 hunks)packages/hw-wallets/src/trezor/ethereum/index.ts(4 hunks)packages/hw-wallets/src/trezor/solana/index.ts(2 hunks)packages/hw-wallets/src/types.ts(2 hunks)packages/keyring/package.json(2 hunks)packages/name-resolution/package.json(3 hunks)packages/request/package.json(2 hunks)packages/signers/bitcoin/package.json(2 hunks)packages/signers/ethereum/package.json(2 hunks)packages/signers/kadena/package.json(2 hunks)packages/signers/polkadot/package.json(2 hunks)packages/storage/package.json(2 hunks)packages/swap/package.json(4 hunks)packages/swap/src/providers/changelly/index.ts(1 hunks)packages/types/package.json(2 hunks)packages/types/src/networks.ts(2 hunks)packages/utils/package.json(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (8)
packages/hw-wallets/src/ledger/solana/index.ts (1)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)
packages/hw-wallets/src/trezor/solana/index.ts (1)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)
packages/hw-wallets/src/trezor/bitcoin/index.ts (1)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)
packages/extension/src/providers/ethereum/networks/sonic.ts (2)
packages/extension/src/providers/ethereum/types/evm-network.ts (2)
EvmNetworkOptions(24-55)EvmNetwork(57-290)packages/extension/src/providers/ethereum/libs/activity-handlers/index.ts (1)
EtherscanActivity(10-10)
packages/hw-wallets/src/ledger/substrate/index.ts (1)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)
packages/hw-wallets/src/ledger/bitcoin/index.ts (1)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)
packages/extension/src/libs/banners-state/index.ts (1)
packages/extension/src/libs/banners-state/types.ts (1)
IState(5-8)
packages/hw-wallets/src/index.ts (1)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)
🪛 Biome (1.9.4)
packages/extension/src/types/provider.ts
[error] 136-136: This constructor is unnecessary.
Unsafe fix: Remove the unnecessary constructor.
(lint/complexity/noUselessConstructor)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: buildAll
- GitHub Check: test
- GitHub Check: test
🔇 Additional comments (77)
package.json (1)
37-37: Confirm SWC native bindings still resolve on all CI targets
@swc/core@^1.12.1ships new pre-built binaries and recently dropped support for some older Node minor versions. Please re-run the full build matrix (Linux/macOS/Windows, Node 18 & 20) to ensure the binary loads correctly and that there are no cryptic “Illegal instruction” or “Cannot find module ‘@swc/core-linux…’” errors at install/runtime.packages/extension-bridge/package.json (1)
49-53: Majorbumppupgrade: check for breaking CLI flags
bumppjumped from v9 → v10.2.0 (major). The default tag prefix behaviour and--commitflag changed in v10. If any release scripts (version:bump:*in root, CI workflows) invokebumpp, verify they still work as expected.packages/types/package.json (1)
28-31: Typings version vs engine mismatchSame
@types/node@^22vs Node ≥14 caveat applies here (less severe than v24, but still newer than LTS 18). Align with the minimum supported Node version or bump the engine field.packages/extension/src/ui/action/icons/common/close-icon-white.vue (1)
1-15: Icon component looks goodSelf-contained SVG, scoped styles and neutral sizing make the component
re-usable without side-effects.packages/extension/src/ui/action/icons/banners/consistent-rewards-icon.vue (1)
1-7: SVG asset is clean and ready for reuseNo functional or stylistic issues spotted.
packages/signers/polkadot/package.json (1)
27-29: Double-check cross-package compatibility & Node engine constraintsThe Polkadot libs were bumped to
13.5.2and tooling to8.34.1/9.29.0.
- These are minor bumps, but they occasionally include breaking WASM snapshots. Please run a signer integration test against a real node before publishing.
- All updated packages now officially test on Node ≥18, while this package still advertises
"node": ">=14.15.0". Node 14 is EOL since 2023-04-30 — consider lifting the engine field (prefer 18 or 20) to avoid downstream install warnings.Also applies to: 34-38, 48-50
packages/keyring/package.json (1)
32-33: Node engine & dependency alignmentSame concerns as in signer-polkadot:
• Verify that@polkadot/util 13.5.2plays nicely with the key-derivation logic (some bigint → BN regressions appeared in 13.5.x).
• Lift"engines.node"to ≥18 to stay in sync with upstream libraries’ test matrix.Also applies to: 38-41, 51-52
packages/extension/src/types/provider.ts (1)
58-59: Enum addition looks good – remember migration defaults
bannersStatenamespace is appended at the end, preserving enum order and avoiding implicit-value shifts – good!
Ensure that any storage migration code treats the new namespace as optional (i.e., falls back toundefinedfor existing users).packages/extension/package.json (2)
3-3: Confirm lock-file & extension store alignment after version bump
The version is set to2.9.0, butyarn.lock/package-lock.jsonchanges are not visible here. A mismatch will cause CI or extension-store publication to fail.
26-54: Several prod deps jumped a minor/major – smoke-test critical user flows
@polkadot/*,@amplitude/analytics-browser,pinia, etc. introduce breaking changes occasionally. Make sure:
- background scripts still initialise without runtime errors,
- storage migrations (Pinia) are intact,
- analytics events still fire.
A quick manual regression around onboarding + send/receive on at least one EVM & Substrate network is strongly advised before release.packages/extension/src/providers/ethereum/networks/sdn.ts (1)
18-18: OnFinality WS endpoint requires periodic ping
The replacement endpoint drops idle connections after ~30 s. Ensure your provider wrapper has keep-alive (e.g., etherskeepAlive:true) or expect random disconnects in long-lived tabs.packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts (1)
136-139: Confirm Sonic enum & token-list plumbing
CoingeckoPlatform.SonicandNetworkNames.Sonicmust already exist (types package). Also ensuretoken-lists.tsincludes a valid Sonic list; otherwisegetKnownNetworkTokenswill return empty and UX shows “Unknown token”.packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1)
61-61: Sonic network API endpoint accessibility confirmedVerified via
curl -I https://api.sonicscan.org/returned HTTP/2 200 OK with valid CORS headers. No further changes needed.packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts (1)
53-54: CoingeckoPlatform enum values for Sonic and Conflux confirmedBoth
Sonic = "sonic"andConflux = "conflux"are defined inpackages/types/src/networks.ts(lines 159 and 183), so no further changes are needed.packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts (1)
56-56: LGTM!The addition of
NetworkNames.Sonicto the type union is correctly implemented and maintains proper alphabetical ordering.packages/extension/src/providers/ethereum/libs/transaction/index.ts (1)
108-108: LGTM!The lowercase conversion fixes the Rootstock checksum address issue with web3. The fix is safe and well-documented with the comment.
packages/extension/src/providers/common/libs/new-features.ts (1)
3-3: LGTM!The update to feature Sonic network as the new network is consistent with the broader Sonic integration across the codebase.
packages/extension/src/providers/ethereum/networks/index.ts (1)
44-44: LGTM! Clean integration of Sonic network.The import and export follow the established pattern for adding new network nodes to the Ethereum provider system.
Also applies to: 134-134
packages/swap/src/providers/changelly/index.ts (1)
136-136: Verify the business logic for RBTC protocol exception.The change allows RBTC tokens to bypass the
fixRateEnabledrequirement for inclusion infromTokens. While the comment explains the reasoning, please ensure this exception doesn't introduce unintended behavior or security concerns in the swap flow.Consider documenting this exception in the code or creating a test case to verify that RBTC tokens behave correctly when
fixRateEnabledis false.packages/hw-wallets/src/ledger/bitcoin/index.ts (1)
24-24: LGTM! Consistent implementation of unsupported operation.The
signTypedMessagemethod correctly implements the interface requirement while appropriately rejecting the operation with a clear error message, which is consistent with Bitcoin's lack of support for EIP-712 typed message signing.Also applies to: 209-213
packages/hw-wallets/src/ledger/solana/index.ts (1)
14-14: LGTM! Consistent interface implementation.The
signTypedMessagemethod follows the same pattern as other non-Ethereum providers, correctly rejecting the unsupported operation with a descriptive error message.Also applies to: 85-89
packages/types/src/networks.ts (1)
78-78: LGTM! Proper enum additions for Sonic network.The additions to both
NetworkNamesandCoingeckoPlatformenums follow the established naming conventions and are correctly positioned within the enums.Also applies to: 159-159
packages/extension/src/ui/action/icons/banners/attractive-apr-icon.vue (1)
1-12: LGTM! Clean SVG icon implementation.The component is well-structured with appropriate scoped styles and fixed dimensions suitable for banner usage.
packages/hw-wallets/src/trezor/solana/index.ts (2)
12-12: Import addition looks correct.The
SignTypedMessageRequestimport aligns with the newsignTypedMessagemethod implementation.
71-75: Consistent error handling for unsupported feature.The implementation correctly rejects with a descriptive error message, following the same pattern as other unsupported methods in this class.
packages/hw-wallets/src/trezor/bitcoin/index.ts (2)
14-14: Import addition is appropriate.The
SignTypedMessageRequestimport supports the new method implementation.
119-123: Good implementation of unsupported feature handling.The method correctly rejects with a descriptive error and uses the underscore prefix convention for the unused parameter.
packages/swap/package.json (3)
3-3: Version bump is appropriate.The patch version increment from 0.0.3 to 0.0.4 aligns with the nature of the changes in this release.
43-45: Dev dependency updates look good.The typescript-eslint, eslint, and vitest updates are conservative patch-level increments that should improve tooling without breaking changes.
Also applies to: 56-57
34-34: Confirmed: rango-sdk-basic patch update is safeNo publicly documented breaking changes were introduced in versions 0.1.68 or 0.1.69. The only notable enhancement around this timeframe is the addition of PSBT support in the SDK examples. Patch releases adhere to semver and should remain backwards compatible. Proceed with the update.
packages/extension/src/providers/ethereum/ui/types.ts (1)
40-45: Well-designed typed message interface.The
SignerTypedMessageOptionsinterface follows the established pattern of other signer interfaces in this file. The version restriction to 'V3' | 'V4' correctly aligns with EIP-712 specifications, and theanytype fortypedDatais appropriate given the variable nature of typed data structures.packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue (2)
91-91: LGTM: Consistent recipient address prioritizationThe change correctly prioritizes
tokenToovertoAddressfor displaying the recipient address, which is appropriate for token transactions where the contract address and actual recipient may differ.
237-238: LGTM: Consistent identicon generation logicThe identicon generation now uses the same address prioritization logic as the display, ensuring visual consistency between the displayed address and its corresponding identicon.
packages/hw-wallets/src/types.ts (2)
56-62: LGTM: Well-structured EIP-712 typed message interfaceThe
SignTypedMessageRequestinterface correctly implements the EIP-712 standard with appropriate field types and version restrictions to V3/V4 (excluding deprecated V1/V2).
111-111: LGTM: Consistent abstract method declarationThe abstract method ensures all hardware wallet providers must implement typed message signing, maintaining interface consistency.
packages/extension/src/libs/metrics/types.ts (2)
72-73: LGTM: Fixed syntax and style consistencyThe closing brace completes the enum definition, and the single quote maintains consistency with the codebase style.
75-78: LGTM: Well-structured banner event trackingThe new enum follows a consistent dot-notation pattern for hierarchical event organization, supporting proper analytics tracking for Solana staking banner interactions.
packages/hw-wallets/src/index.ts (2)
17-17: LGTM: Required import for new functionalityThe import correctly brings in the
SignTypedMessageRequesttype needed for the new method implementation.
71-76: LGTM: Consistent method implementation patternThe
signTypedMessagemethod follows the established pattern of other signing methods in the class, with proper provider initialization and delegation. The implementation is consistent with the existing codebase architecture.packages/hw-wallets/package.json (3)
3-3: LGTM: Appropriate version bump for new featuresThe patch version increment from 0.0.12 to 0.0.13 is appropriate for the addition of typed message signing functionality.
61-65: LGTM: Dependencies support new typed message signingThe new dependencies
@metamask/eth-sig-utiland@trezor/connect-plugin-ethereumdirectly support the EIP-712 typed message signing functionality introduced in this release.
25-40: LGTM: Routine development dependency updatesThe development dependency updates maintain the project with current tooling versions, including TypeScript, ESLint, and testing frameworks.
packages/extension/src/libs/banners-state/types.ts (1)
6-6: Fix typo in property name.There appears to be a typo in the property name
isHideSolanStakingBanner- it should beisHideSolanaStakingBannerfor consistency with the other propertyisHideNetworkAssetSolanStakingBanner.export type IState = { - isHideSolanStakingBanner: boolean; + isHideSolanaStakingBanner: boolean; isHideNetworkAssetSolanStakingBanner: boolean; };Likely an incorrect or invalid review comment.
packages/extension/src/providers/ethereum/networks/sonic.ts (1)
8-24: LGTM: Well-structured network configuration.The Sonic network configuration follows the established pattern and includes all necessary fields. The chain ID, RPC endpoints, block explorers, and handlers are properly configured.
packages/hw-wallets/src/ledger/substrate/index.ts (1)
94-98: LGTM: Correct implementation for unsupported functionality.The method correctly rejects with a clear error message, consistent with other unsupported methods in this class. The underscore prefix on the parameter name properly indicates it's unused.
packages/hw-wallets/src/ledger/ethereum/index.ts (2)
141-165: LGTM: Correct EIP-712 typed message signing implementation.The implementation properly follows the EIP-712 standard:
- Correctly hashes domain and message using TypedDataUtils
- Properly calls Ledger's signEIP712HashedMessage method
- Accurately converts signature to RPC format with v value adjustment
- Follows established patterns for path handling
189-189: LGTM: Correct capability addition.The
typedMessagecapability is correctly added to reflect the new signing functionality.packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue (1)
1-17: LGTM: Well-structured banner component.The component template is clean and follows good practices with proper event handling and accessibility considerations.
packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue (4)
9-9: Good UX improvement with hardware wallet messaging.The addition of the
<hardware-wallet-msg>component provides better user guidance for hardware wallet interactions during typed data signing.
54-65: Well-organized import consolidation.The import changes properly consolidate typed data signing functionality by removing manual utilities and importing the centralized
TypedMessageSignerfunction.
105-117: Excellent refactoring to centralized signer.The refactored
approvefunction properly delegates to theTypedMessageSignerutility, which improves maintainability and ensures consistent signing behavior across hardware and software wallets.
120-120: Clean error handling simplification.The simplified
denyfunction correctly uses the centralized error handling approach.packages/extension/src/ui/action/icons/common/enkrypt-staking-logo.vue (1)
1-35: Clean SVG logo component implementation.The component is well-structured with proper gradient definitions, clip paths, and minimal styling. The SVG is appropriately sized and serves its purpose as a branding element for the Solana staking feature.
packages/extension/src/libs/metrics/index.ts (3)
16-16: Proper import addition for new event types.The import correctly includes the new
SolanaStakingBannerEventstype for the tracking functionality.
118-120: Well-implemented tracking function.The
trackSolanaStakingBannerfunction follows the established pattern in the codebase, using proper typing and consistent structure with other tracking functions.
131-132: Proper export of new tracking function.The export list is correctly updated to include the new
trackSolanaStakingBannerfunction.packages/extension/src/libs/banners-state/index.ts (3)
8-10: Proper initialization with dedicated storage namespace.The constructor correctly initializes browser storage with a dedicated namespace for banner state management.
12-25: Well-implemented state initialization pattern.The
getOrInitializeStatemethod properly handles both existing and new state scenarios with appropriate defaults.
27-32: Clean and consistent method implementations.All the banner management methods properly handle async state operations and maintain consistency in their implementation patterns.
Also applies to: 34-37, 39-42, 44-48, 50-54
packages/extension/src/providers/ethereum/ui/libs/signer.ts (5)
3-7: Proper imports for typed message signing.The import additions correctly include all necessary types and utilities for EIP-712 typed data signing functionality.
Also applies to: 14-18
119-130: Good security practice rejecting V1 for hardware wallets.The function correctly rejects SignTypedDataVersion.V1 for hardware wallets, which is appropriate given the security issues with V1 typed data signing.
131-154: Well-implemented hardware wallet delegation.The hardware wallet signing path properly delegates to the hardware wallet manager with all necessary parameters and handles errors appropriately.
155-180: Robust software wallet signing implementation.The software wallet path correctly handles different SignTypedDataVersion types, performs appropriate hashing, and includes comprehensive error handling.
182-182: Proper export of new signer function.The export statement is correctly updated to include the new
TypedMessageSignerfunction.packages/extension/src/ui/action/views/network-assets/index.vue (2)
16-20: LGTM: Clean conditional banner rendering.The banner is properly conditionally rendered based on both the network type and banner state flag. The event handling for closing is correctly implemented.
87-88: LGTM: Proper imports for banner functionality.The imports for the banner component and BannersState are correctly added and will be used in the component.
packages/extension/src/ui/action/views/network-assets/components/network-assets-solana-staking-banner.vue (3)
1-41: LGTM: Well-structured banner component template.The template structure is clean with proper accessibility considerations (alt attributes for images) and semantic HTML structure.
52-63: LGTM: Proper event handling and external link security.The component correctly emits close events and uses the
openLinkutility for external navigation, which is safer than directwindow.open()calls. The metrics tracking integration is also properly implemented.
66-191: LGTM: Comprehensive and well-organized CSS styling.The CSS is well-structured with:
- Proper LESS variable usage
- Responsive positioning
- Hover states
- Z-index layering for proper stacking
packages/hw-wallets/src/trezor/ethereum/index.ts (4)
7-7: LGTM: Proper import for EIP-712 typed data transformation.The import of
transformTypedDatafrom the Trezor Connect plugin is correct for handling EIP-712 typed data.
15-15: LGTM: Correct type import for typed message requests.The
SignTypedMessageRequestimport aligns with the new method signature requirements.
131-151: LGTM: Proper EIP-712 typed message signing implementation.The implementation correctly:
- Constructs the EIP-712 data object
- Uses
transformTypedDatato compute domain and message hashes- Calls Trezor Connect with MetaMask v4 compatibility
- Handles errors consistently with other methods
- Returns signature in proper hex format
162-162: LGTM: Capability declaration correctly updated.Adding
HWwalletCapabilities.typedMessageproperly declares the new EIP-712 signing capability.packages/extension/src/ui/action/components/app-menu/index.vue (2)
160-164: LGTM: Consistent banner implementation.The banner rendering follows the same pattern as the network-assets component, with proper conditional display based on expansion state and banner flag.
208-209: LGTM: Proper imports for banner functionality.The banner component and BannersState imports are correctly added.
packages/extension/src/providers/ethereum/networks/vic.ts (2)
9-21: Naming/ID consistency check (TomoChain ↔︎ Viction).
nameis stillNetworkNames.TomoChain,currencyNameisVIC, andcoingeckoIDremainstomochain.
If the ecosystem has fully re-branded to Viction, confirm these mixed identifiers are intentional and still expected by upstream services (e.g., CoinGecko, hardware-wallet derivation pathm/44'/889'). Mismatches can break price lookups or cause UI confusion.
18-18: Confirm new WebSocket endpoint & adjust fallback strategy
- Verified no remaining hard-coded TomoChain WS URLs (
rg "ws\.tomochain\.com"returned no hits).EvmNetworkOptions.nodeis typed as a singlestring, not an array—so it doesn’t natively support multiple endpoints for fallback. If you require a backup URL (e.g.wss://ws.tomochain.com), you’ll need to:
• Extend the type to acceptstring | string[]
• Or implement retry/fallback logic around the provider- Ensure
wss://ws.viction.xyzis fully live and reliable to avoid immediate RPC failures.Location to review:
• packages/extension/src/providers/ethereum/networks/vic.ts (line 18)
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Chores