Conversation
Release: v2.8.0
…bs.com, block explorer sonicscan.org, with full activity/asset/NFT handler integration
## Walkthrough
This update introduces support for the Sonic network across the codebase, including new configuration, asset, activity, and token list handlers. It also adds EIP-712 typed message signing support for hardware wallets, updating relevant interfaces, implementations, and UI flows. Solana staking promotional banners with state management and event tracking are added to the UI. Numerous package dependencies are updated with minor and patch version bumps.
## Changes
| Files/Paths | Change Summary |
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
| packages/extension/src/providers/ethereum/networks/sonic.ts | New Sonic network configuration and export. |
| packages/extension/src/providers/ethereum/networks/index.ts | Imports and adds Sonic network to exported networks object. |
| packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts| Adds Sonic to Etherscan network endpoints. |
| packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts | Adds Sonic to supported MEW asset info networks. |
| packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts | Adds Sonic and Conflux token lists to Coingecko mappings. |
| packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts | Extends supported network names with Sonic. |
| packages/extension/src/providers/common/libs/new-features.ts | Updates newNetworks array to feature Sonic. |
| packages/types/src/networks.ts | Adds Sonic to NetworkNames and CoingeckoPlatform enums. |
| packages/extension/package.json | Bumps package version; updates multiple dependencies. |
| packages/extension-bridge/package.json<br>packages/keyring/package.json<br>packages/name-resolution/package.json<br>packages/request/package.json<br>packages/signers/bitcoin/package.json<br>packages/signers/ethereum/package.json<br>packages/signers/kadena/package.json<br>packages/signers/polkadot/package.json<br>packages/storage/package.json<br>packages/swap/package.json<br>packages/types/package.json<br>packages/utils/package.json | Updates devDependencies and/or runtime dependencies (patch/minor bumps). |
| package.json | Updates @swc/core devDependency version. |
| packages/hw-wallets/package.json | Updates dependencies; adds @metamask/eth-sig-util and @trezor/connect-plugin-ethereum. |
| packages/hw-wallets/src/types.ts | Adds SignTypedMessageRequest interface and abstract signTypedMessage method to HWWalletProvider. |
| packages/hw-wallets/src/index.ts | Adds signTypedMessage method to HWwalletManager. |
| packages/hw-wallets/src/ledger/ethereum/index.ts | Implements signTypedMessage for Ledger Ethereum; adds typedMessage capability. |
| packages/hw-wallets/src/ledger/bitcoin/index.ts<br>packages/hw-wallets/src/ledger/solana/index.ts<br>packages/hw-wallets/src/ledger/substrate/index.ts<br>packages/hw-wallets/src/trezor/bitcoin/index.ts<br>packages/hw-wallets/src/trezor/solana/index.ts | Adds signTypedMessage method that rejects as unsupported. |
| packages/hw-wallets/src/trezor/ethereum/index.ts | Implements signTypedMessage for Trezor Ethereum; adds typedMessage capability. |
| packages/extension/src/providers/ethereum/ui/libs/signer.ts | Adds TypedMessageSigner function for EIP-712 signing (hardware and software); updates exports. |
| packages/extension/src/providers/ethereum/ui/types.ts | Adds SignerTypedMessageOptions interface for typed message signing. |
| packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue | Refactors to use new TypedMessageSigner; adds hardware wallet message UI. |
| packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue | Updates "To" address logic to prefer tokenTo over toAddress in UI and identicon. |
| packages/extension/src/providers/ethereum/networks/sdn.ts | Updates Shiden WebSocket node URL. |
| packages/extension/src/providers/ethereum/networks/tlos.ts | Updates Telos RPC node URL. |
| packages/extension/src/providers/ethereum/networks/vic.ts | Updates Viction WebSocket node URL. |
| packages/extension/src/providers/ethereum/libs/transaction/index.ts | Converts sender address to lowercase for transaction count retrieval to support Rootstock addresses. |
| packages/swap/src/providers/changelly/index.ts | Includes tokens with protocol "RBTC" in fromTokens list for swaps, alongside fixRateEnabled tokens. |
| packages/extension/src/libs/banners-state/index.ts | Adds BannersState class to manage Solana staking banner visibility state in persistent storage. |
| packages/extension/src/libs/banners-state/types.ts | Adds StorageKeys enum and IState type for banners state management. |
| packages/extension/src/libs/metrics/index.ts | Adds trackSolanaStakingBanner event tracking function; minor formatting updates. |
| packages/extension/src/libs/metrics/types.ts | Adds SolanaStakingBannerEvents enum; fixes UpdatesOpenLocation enum syntax and formatting. |
| packages/extension/src/types/provider.ts | Adds bannersState member to InternalStorageNamespace enum. |
| packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue | New Solana staking promotional banner Vue component with event tracking and close functionality. |
| packages/extension/src/ui/action/components/app-menu/index.vue | Integrates Solana staking banner into app menu with state management and close handling. |
| packages/extension/src/ui/action/icons/banners/attractive-apr-icon.vue | Adds new SVG icon component for Attractive APR. |
| packages/extension/src/ui/action/icons/banners/consistent-rewards-icon.vue | Adds new SVG icon component for Consistent Rewards. |
| packages/extension/src/ui/action/icons/common/close-icon-white.vue | Adds new SVG close icon component in white. |
| packages/extension/src/ui/action/icons/common/enkrypt-staking-logo-white.vue | Adds new SVG component for Enkrypt Staking logo in white and purple gradient. |
| packages/extension/src/ui/action/icons/common/enkrypt-staking-logo.vue | Adds new SVG component for Enkrypt Staking logo in standard colors. |
| packages/extension/src/ui/action/views/network-assets/components/network-assets-solana-staking-banner.vue | New Solana staking banner component for network assets view with event tracking and close functionality. |
| packages/extension/src/ui/action/views/network-assets/index.vue | Integrates Solana staking banner into network assets view with state management and close handling. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant UI as eth-sign-typedata.vue
participant Signer as TypedMessageSigner
participant HW as HWwalletManager
participant Ledger/Trezor as Hardware Wallet
participant SW as Software Signer
participant BG as Background Script
UI->>Signer: TypedMessageSigner(options)
alt Hardware wallet
Signer->>HW: signTypedMessage(options)
HW->>Ledger/Trezor: signTypedMessage(options)
Ledger/Trezor-->>HW: signature or error
HW-->>Signer: signature or error
else Software wallet
Signer->>SW: compute hash (typedSignatureHash or eip712Hash)
SW->>BG: sign hash with account
BG-->>SW: signature or error
SW-->>Signer: signature or error
end
Signer-->>UI: signature or errorPossibly related PRs
Suggested reviewers
|
|
💼 Build Files |
There was a problem hiding this comment.
Actionable comments posted: 8
🔭 Outside diff range comments (1)
packages/extension/package.json (1)
3-3: Version string is still 2.8.0 – should be 2.9.0 for this release
The PR title indicatesrelease v2.9.0, but the package.jsonversionfield remains2.8.0. Forgetting to bump this prevents consumers and the CI publish step from picking up the new release.- "version": "2.8.0", + "version": "2.9.0",
🧹 Nitpick comments (8)
packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue (1)
85-95: Use nullish coalescing throughout for clarityRight now you mix
||and??, which can be surprising when empty string values appear.
decodedTx?.tokenTo ?? decodedTx?.toAddress ?? '~'would read a bit clearer and avoid subtle falsy traps.Not critical, just readability.
packages/extension/src/providers/ethereum/ui/types.ts (1)
40-45: Tighten up thetypedDatatyping for better DX
typedDatais declared asany, which leaks type-safety to every consumer. Consider aligning this with the EIP-712TypedDatadefinition that already exists in the codebase (@metamask/eth-sig-utilor your own helper types) or at leastRecord<string, unknown>.-export interface SignerTypedMessageOptions { - typedData: any; +export interface SignerTypedMessageOptions { + typedData: Record<string, unknown>; // or a dedicated TypedData typepackages/hw-wallets/src/trezor/solana/index.ts (1)
71-75: Align method style with the rest of the class (async+throw)
Other unsupported-feature stubs in this class (signPersonalMessage) are declaredasyncand simplythrow. For consistency and slightly cleaner stack-traces you can do the same here:- signTypedMessage(_request: SignTypedMessageRequest): Promise<string> { - return Promise.reject( - new Error("trezor-solana: signTypedMessage not supported"), - ); - } + async signTypedMessage(): Promise<string> { + throw new Error("trezor-solana: signTypedMessage not supported"); + }packages/hw-wallets/package.json (1)
3-3: Optional: bump internal package version for clarity
@enkryptcom/hw-walletsstays at0.0.12, yet new public APIs (signTypedMessage) were added. Semver-wise this is at least a minor bump (0.0.13) to avoid consumers silently missing the new feature.packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue (1)
9-9: Guard rendering of hardware-specific banner
<hardware-wallet-msg>is rendered unconditionally, which means it shows up even for software-only accounts. Wrap the component in av-if="account.isHardware"(or equivalent) to avoid confusing users.packages/hw-wallets/src/trezor/ethereum/index.ts (1)
138-148: Hash pre-computation duplicates Trezor-Connect logic
transformTypedDataalready returns the two hashes, butethereumSignTypedDatacan compute them internally whenmetamask_v4_compatis set. Supplying both hashes is harmless yet redundant. Consider dropping the manual transform to reduce code surface (and the dependency).packages/extension/src/providers/ethereum/ui/libs/signer.ts (2)
124-131: Early-exit for unsupported V1 is good, but expose proper error codeConsider returning the same
ErrorCodes.unsupportedMethodshape used elsewhere, so the UI can handle all “not supported” errors uniformly.
119-180: Type alias shadowingInside the non-hardware branch you redeclare
const version = options.version…which shadows the outerversionvariable coming from the function arguments. While harmless, it interrupts readability—prefer renaming the inner constant.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (28)
package.json(1 hunks)packages/extension-bridge/package.json(2 hunks)packages/extension/package.json(5 hunks)packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue(3 hunks)packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue(1 hunks)packages/extension/src/providers/ethereum/ui/libs/signer.ts(2 hunks)packages/extension/src/providers/ethereum/ui/types.ts(1 hunks)packages/hw-wallets/package.json(3 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(3 hunks)packages/types/package.json(2 hunks)packages/utils/package.json(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (7)
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/hw-wallets/src/ledger/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/hw-wallets/src/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/ledger/ethereum/index.ts (2)
packages/hw-wallets/src/types.ts (1)
SignTypedMessageRequest(56-62)packages/utils/src/index.ts (2)
bufferToHex(38-38)hexToBuffer(39-39)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: buildAll
🔇 Additional comments (30)
package.json (1)
37-37: Approve bump of@swc/core
The development dependency@swc/corewas updated to^1.12.1, aligning with other minor bumps across the monorepo.packages/swap/package.json (4)
3-3: Bump swap package version to 0.0.4
Aligns with the coordinated v2.9.0 release across the monorepo.
34-34: Upgrade rango-sdk-basic to ^0.1.69
Keeps the swap package in sync with the latest SDK improvements.
42-45: Update core TypeScript linting and ESLint tooling
Bumps@types/node,@typescript-eslintplugins/parsers, andeslintfor consistent code quality checks.
56-57: Bump supplementary devDependencies: typescript-eslint & vitest
Ensures test runner and ESLint config are up-to-date across packages.packages/keyring/package.json (3)
32-32: Upgrade @polkadot/util to ^13.5.2
Pulls in the latest utility functions and bug fixes from the Polkadot team.
37-40: Align core TypeScript & ESLint tooling versions
Bumps@types/node,@typescript-eslintplugins/parsers, andeslintfor uniform linting setup.
51-52: Update devDependencies: typescript-eslint & vitest
Brings the test framework and ESLint integration in line with the monorepo standard.packages/name-resolution/package.json (3)
25-28: Upgrade TypeScript & ESLint dev tooling
Bumps@types/node,@typescript-eslintplugins/parsers, andeslintto maintain consistency.
39-41: Bump test & tooling packages: typescript-eslint, viem, vitest
Updates the Ethereum client (viem) version and testing setup.
51-51: Upgrade @bonfida/spl-name-service to 3.0.11
Ensures name resolution uses the latest Solana Name Service updates.packages/extension-bridge/package.json (3)
47-47: Bump @types/node to ^24.0.3
Keeps Node definitions current for the extension bridge.
49-52: Update ESLint plugins, parser & bumpp
Aligns linting and release tooling versions with the rest of the monorepo.
64-64: Upgrade typescript-eslint to 8.34.1
Ensures consistent ESLint integration across packages.packages/signers/polkadot/package.json (3)
27-28: Upgrade @polkadot/util & util-crypto to ^13.5.2
Incorporates the latest performance and security fixes from Polkadot libraries.
34-37: Align core TypeScript & ESLint tooling
Bumps@types/node,@typescript-eslintplugins/parsers, andeslintfor consistent development environment.
48-49: Update devDependencies: typescript-eslint & vitest
Brings testing and linting integration up-to-date with the monorepo standard.packages/utils/package.json (1)
27-31: Dependency bumps look safe – just verify CI passesAll changes are simple patch/minor upgrades that should remain semver-compatible.
Please make sure the lock-file is updated and thatnpm audit/ unit tests still pass in CI after the bump.Also applies to: 33-37, 48-49
packages/signers/kadena/package.json (1)
31-37: Consistent version alignment – no further actionDev-dependency bumps mirror the rest of the monorepo.
No functional impact detected.Also applies to: 33-37, 47-49
packages/signers/ethereum/package.json (1)
35-39: Dev-dependency sync looks goodNothing to flag here.
Also applies to: 49-50
packages/hw-wallets/src/trezor/bitcoin/index.ts (1)
119-123: Explicit unsupported path OK – expose capability flag to avoid callsThe stubbed
signTypedMessagecorrectly rejects, but the provider’s capability list (getCapabilities) hasn’t been updated.
Since it still advertises onlysignMessage/signTx, higher-level code won’t call this method, so the defensive rejection is fine.No change required.
packages/hw-wallets/src/ledger/solana/index.ts (1)
85-89: Explicit rejection looks good – nothing else to do
The provider cleanly implements the new interface and rejects unsupported functionality. Consistent with the capability list returned below.packages/hw-wallets/src/ledger/bitcoin/index.ts (1)
209-213: Good – provider explicitly rejects unsupported feature
Implementation complies with the new abstract method.packages/hw-wallets/src/types.ts (2)
56-62: Interface addition LGTM
The shape matches EIP-712 needs and the union of V3/V4 keeps things strict.
111-112: Abstract method addition LGTM
All concrete providers now either implement or explicitly reject the call – fulfils type safety.packages/hw-wallets/src/index.ts (1)
71-76: Good addition – manager now exposes typed-message signing
The newsignTypedMessagedelegate follows the same lazy-initialisation pattern used by the other signers. Looks solid.packages/hw-wallets/src/ledger/ethereum/index.ts (2)
141-165: Edge-case & readability tweaks for the new EIP-712 flow
TypedDataUtils.hashStructalready returns a 32-byte buffer – no need to convert twice; consider passing the raw buffer to Ledger rather than hex to avoid one extra copy.as SignTypedDataVersion.V3 | SignTypedDataVersion.V4is redundant;request.version as SignTypedDataVersionis sufficient and less noisy.vis converted withBigInt(result.v - 27).result.vis already a number;Number(result.v) - 27is clearer and avoids an unnecessaryBigInt → number → BigIntround-trip.- const messageHash = TypedDataUtils.hashStruct( + const messageHash = TypedDataUtils.hashStruct( request.primaryType, request.message, request.types, - request.version as SignTypedDataVersion.V3 | SignTypedDataVersion.V4, + request.version as SignTypedDataVersion, ); @@ - bufferToHex(domainHash, true), - bufferToHex(messageHash, true), + bufferToHex(domainHash, true), + bufferToHex(messageHash, true), ) .then((result) => { - const v = BigInt(result.v - 27); + const v = Number(result.v) - 27; return toRpcSig(v, hexToBuffer(result.r), hexToBuffer(result.s)); });Please sanity-test with a real Ledger: whitelist both V3 & V4 payloads and ensure the signature matches
eth-sig-util’srecoverTypedSignature.
189-190: Capability advertised only if firmware really supports it
typedMessageis now exposed unconditionally. Older Ledger firmware (< 2.1.0) will rejectsignEIP712HashedMessage, which may break UI feature-detection. Consider gating this on an explicit firmware check (similar toledgerService.getAppAndVersion) or at least documenting the minimum firmware required.packages/extension/src/providers/ethereum/ui/eth-sign-typedata.vue (2)
54-56: Path sanity-checkThe import path for the banner component jumps two directories up into
common/ui/verify-transaction. Confirm that this file really exists once the build is flattened; otherwise the component will break at runtime.
106-117: ```shell
#!/bin/bashLocate and display sanitizeData function for context
sanitizer=$(fd sanitize-typed-data.ts)
echo "=== File: $sanitizer ==="
sed -n '1,200p' "$sanitizer"</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
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
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (1)
packages/extension/src/libs/banners-state/index.ts (1)
27-32: Consider consistency in resetBanners method.For consistency with other methods, consider using individual assignments rather than direct property access on the state object.
async resetBanners(): Promise<void> { - const state = await this.getOrInitializeState(); - state.isHideNetworkAssetSolanStakingBanner = false; - state.isHideSolanStakingBanner = false; - await this.storage.set(StorageKeys.bannersInfo, state); + const newState: IState = { + isHideSolanStakingBanner: false, + isHideNetworkAssetSolanStakingBanner: false, + }; + await this.storage.set(StorageKeys.bannersInfo, newState); }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
packages/extension/src/ui/action/assets/banners/solana-stacking-banner-bg.pngis excluded by!**/*.pngpackages/extension/src/ui/action/assets/banners/solana-stacking-banner-tokens-img.pngis excluded by!**/*.pngpackages/extension/src/ui/action/assets/banners/solana-stacking-banner.pngis excluded by!**/*.png
📒 Files selected for processing (14)
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/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(4 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(4 hunks)
✅ Files skipped from review due to trivial changes (7)
- packages/extension/src/ui/action/icons/banners/attractive-apr-icon.vue
- packages/extension/src/ui/action/icons/common/close-icon-white.vue
- packages/extension/src/ui/action/icons/banners/consistent-rewards-icon.vue
- packages/extension/src/libs/banners-state/types.ts
- packages/extension/src/ui/action/icons/common/enkrypt-staking-logo-white.vue
- packages/extension/src/ui/action/icons/common/enkrypt-staking-logo.vue
- packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/extension/src/libs/banners-state/index.ts (1)
packages/extension/src/libs/banners-state/types.ts (1)
IState(5-8)
🪛 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 (14)
packages/extension/src/types/provider.ts (1)
58-58: LGTM: Banner state namespace addition is well-integrated.The addition of
bannersStateto theInternalStorageNamespaceenum is consistent with the existing pattern and properly supports the new banner state management functionality.packages/extension/src/libs/metrics/types.ts (2)
72-73: LGTM: Quote style consistency improvement.The change from double quotes to single quotes improves code consistency across the codebase.
75-78: LGTM: Well-structured event enum for banner tracking.The
SolanaStakingBannerEventsenum follows the established naming pattern with descriptive event identifiers using dot notation, which will provide clear analytics tracking.packages/extension/src/libs/banners-state/index.ts (1)
5-25: LGTM: Well-structured state management class.The
BannersStateclass provides a clean abstraction for managing banner visibility with proper initialization and storage handling.packages/extension/src/ui/action/views/network-assets/components/network-assets-solana-staking-banner.vue (3)
1-41: LGTM: Well-structured promotional banner component.The template structure is clean with proper layering of background, image, and content. The close button positioning and event handling are implemented correctly.
60-63: LGTM: Proper event tracking implementation.The
openStakingLinkfunction correctly tracks user interactions before opening the external link, providing valuable analytics data.
9-17: Verify asset paths exist and consider using dynamic imports.The hardcoded image paths should be verified to ensure the assets exist at the specified locations.
#!/bin/bash # Verify that the banner asset images exist fd -t f "solana-stacking-banner-bg.png" --exec echo "Found: {}" fd -t f "solana-stacking-banner-tokens-img.png" --exec echo "Found: {}"packages/extension/src/libs/metrics/index.ts (4)
15-16: LGTM: Import additions for banner event tracking.The import statement is correctly updated to include the new
SolanaStakingBannerEventstype.
29-41: LGTM: Improved parameter formatting consistency.The change from commas to semicolons in the type annotations improves readability and consistency with TypeScript conventions.
97-106: LGTM: Improved function formatting with explicit return type.The reformatting of
trackUpdatesEventsto a multi-line function with explicit return type improves code readability and consistency.
118-120: LGTM: Consistent banner event tracking implementation.The
trackSolanaStakingBannerfunction follows the established pattern for event tracking and properly categorizes banner events under'solStakingBanner'.packages/extension/src/ui/action/views/network-assets/index.vue (1)
91-92: LGTM! Clean imports.The component and BannersState imports are properly structured.
packages/extension/src/ui/action/components/app-menu/index.vue (2)
208-209: LGTM! Clean imports.The component and BannersState imports are properly structured.
271-273: Clarify commented banner logic.The banner display logic is commented out, which means the banner will never show in the app menu. Is this intentional for a gradual rollout or should this be enabled?
If this should be enabled, apply this diff:
- // if (await bannersState.showSolanaStakingBanner()) { - // isSolanaStackingBanner.value = true; - // } + try { + if (await bannersState.showSolanaStakingBanner()) { + isSolanaStakingBanner.value = true; + } + } catch (error) { + console.error('Failed to check banner state:', error); + }
packages/extension/src/ui/action/views/network-assets/index.vue
Outdated
Show resolved
Hide resolved
packages/extension/src/ui/action/views/network-assets/index.vue
Outdated
Show resolved
Hide resolved
packages/extension/src/ui/action/views/network-assets/index.vue
Outdated
Show resolved
Hide resolved
Fix Solana staking banner UI bugs
Fix/solana staking banner fix
Summary by CodeRabbit
New Features
Improvements
Dependency Updates