Skip to content

devop: release2-17#788

Open
kvhnuke wants to merge 7 commits intodevelopfrom
devop/release-v2-17
Open

devop: release2-17#788
kvhnuke wants to merge 7 commits intodevelopfrom
devop/release-v2-17

Conversation

@kvhnuke
Copy link
Contributor

@kvhnuke kvhnuke commented Feb 26, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed fee source mapping for 1inch Fusion when used with MEW wallet.
    • Reduced Paraswap fee for MEW wallet from 0.025 to 0.02.
    • Improved swap provider initialization to skip providers that fail to initialize, improving reliability.
  • Style

    • Visual and interaction refinements across swap and network-assets views (layout, spacing, transitions, focus/hover states, buttons, badges, and scroll behavior).
  • Chores

    • Updated package versions and tooling/dev dependency alignments across multiple packages.

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

💼 Build Files
chrome: enkrypt-chrome-3d3c1b1f.zip
firefox: enkrypt-firefox-3d3c1b1f.zip

💉 Virus total analysis
chrome: 3d3c1b1f
firefox: 3d3c1b1f

@kvhnuke kvhnuke changed the title Devop/release v2 17 devop: release2-17 Feb 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Walkthrough

Bumps many dev/runtime dependency versions across packages, increments two package versions, reduces ParaSwap MEW wallet fee, adjusts oneInchFusion quote source for MEW, makes several provider init methods async and filters out providers that fail initialization, and applies multiple UI styling changes in the extension.

Changes

Cohort / File(s) Summary
Root manifest
package.json
Updated devDependencies: @commitlint/cli, @commitlint/config-conventional, @swc/core, nodemon.
Monorepo package manifests
packages/extension-bridge/package.json, packages/extension/package.json, packages/hw-wallets/package.json, packages/keyring/package.json, packages/name-resolution/package.json, packages/request/package.json, packages/signers/.../package.json, packages/storage/package.json, packages/types/package.json, packages/utils/package.json, packages/swap/package.json
Widespread version bumps for devDeps (ESLint, @typescript-eslint, @types/node, etc.); some packages add dev tooling (eslint-plugin-import, eslint-plugin-module-resolver, prettier, ts-node). packages/extension and packages/swap package versions incremented.
Swap fee config
packages/swap/src/configs.ts
Reduced ParaSwap fee for WalletIdentifier.mew from 0.025 to 0.02.
oneInchFusion provider logic
packages/swap/src/providers/oneInchFusion/index.ts
Made init async; when a fee config exists, map quoteParams.source to "myetherwallet" for WalletIdentifier.mew, else leave wallet identifier as source; added WalletIdentifier import.
Provider init orchestration
packages/swap/src/index.ts, packages/swap/src/providers/*/index.ts
Changed several providers' init methods to async. Swap provider initialization now awaits each provider init, records failures, and removes providers that failed to initialize from the active list.
Swap: oneInch, ParaSwap, ZeroX init signatures
packages/swap/src/providers/oneInch/index.ts, packages/swap/src/providers/paraswap/index.ts, packages/swap/src/providers/zerox/index.ts
Updated init(tokenList: TokenType[]) signatures to async (no other logic changes inside those methods).
Swap provider: oneInchFusion import change
packages/swap/src/providers/oneInchFusion/index.ts
Imported WalletIdentifier from types to enable conditional quote source mapping for MEW.
Swap provider runtime index
packages/swap/src/index.ts
Now awaits per-provider init with per-provider failure capture and filters out providers that failed initialization.
Swap UI and components
packages/swap/src/configs.ts
Fee config change (ParaSwap MEW fee decreased).
Extension UI styling
packages/extension/src/ui/.../network-assets-header.vue, .../network-assets-item.vue, .../swap/** (multiple files)
Various styling and interaction updates across network-assets and swap UI components: layout adjustments, padding/width tweaks, hover/focus effects, button visuals, animations, and scrollbar styling. No behavioral logic changes.

Sequence Diagram(s)

sequenceDiagram
  participant App as Client
  participant Swap as SwapService
  participant ProvReg as ProviderRegistry
  participant Prov as Provider
  rect rgba(200,200,255,0.5)
    App->>Swap: request swap init(tokenList)
    Swap->>ProvReg: get providers list
    loop for each provider
      Swap->>Prov: call init(tokenList)
      alt init succeeds
        Prov-->>Swap: resolved
      else init fails
        Prov-->>Swap: rejected (error)
        Swap->>Swap: record provider in initFailed
      end
    end
    Swap->>ProvReg: remove providers in initFailed
    Swap-->>App: return initialized providers
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • devop: prep release 2.10 #732 — overlaps swap FEE_CONFIGS and provider entries (directly related to fee/config changes).
  • feat/release-2.0 #573 — modifies provider initialization behavior (async/init control flow) and aligns with init-related changes here.
  • release: v2.13.0 #761 — touches oneInchFusion and RFQ/swap provider integration (related to oneInchFusion/source/fee adjustments).

Suggested reviewers

  • gamalielhere
  • NickKelly1
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'devop: release2-17' is vague and uses non-descriptive formatting that doesn't clearly convey the actual changes in the PR, which include dependency updates across multiple packages and UI improvements. Use a more descriptive title that summarizes the main changes, such as 'chore: update dependencies and improve swap UI' or 'release: v2.17.0 with dependency updates and UI enhancements'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devop/release-v2-17

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
packages/signers/polkadot/package.json (1)

24-30: @commitlint/cli appears misplaced in runtime dependencies.

This is a commit linting tool that should typically be in devDependencies rather than dependencies. While this is a pre-existing issue and not introduced by this PR, consider moving it in a follow-up to avoid bundling unnecessary tooling in production builds.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/signers/polkadot/package.json` around lines 24 - 30, Move the
tooling package entry "@commitlint/cli" out of the "dependencies" block and
place it into "devDependencies" in package.json so it isn't bundled into runtime
builds; update the JSON by removing "@commitlint/cli": "^20.4.2" from the
"dependencies" object and adding the same entry under "devDependencies"
(preserve the version) and run a quick install/test to ensure lockfile updates.
packages/signers/ethereum/package.json (1)

49-49: Inconsistent version specifier for typescript-eslint.

Same as in packages/request/package.json - this package is pinned to an exact version (8.56.1) while the related typescript-eslint packages on lines 36-37 use caret prefixes. Consider adding the caret for consistency.

Suggested fix
-    "typescript-eslint": "8.56.1",
+    "typescript-eslint": "^8.56.1",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/signers/ethereum/package.json` at line 49, The typescript-eslint
dependency in packages/signers/ethereum/package.json is pinned to "8.56.1" while
related typescript-eslint packages use caret ranges; update the dependency
string for "typescript-eslint" to use a caret range (e.g., "^8.56.1") for
consistency with the other typescript-eslint entries and with
packages/request/package.json.
packages/request/package.json (1)

48-48: Inconsistent version specifier for typescript-eslint.

This package is pinned to an exact version (8.56.1) while the related @typescript-eslint/eslint-plugin and @typescript-eslint/parser on lines 35-36 use caret prefixes (^8.56.1). Consider adding the caret for consistency with the rest of the devDependencies.

Suggested fix
-    "typescript-eslint": "8.56.1",
+    "typescript-eslint": "^8.56.1",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/request/package.json` at line 48, The devDependency
"typescript-eslint" is pinned to an exact version while related packages
"@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser" use caret
ranges; update the "typescript-eslint" entry in package.json to use a
caret-prefixed version (e.g., change "8.56.1" to "^8.56.1") so its version
specifier is consistent with the other `@typescript-eslint` packages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/signers/ethereum/package.json`:
- Line 35: The package.json dependency for "@types/node" is set to "^25.3.2"
here while other packages use v22.x causing inconsistent type definitions across
the monorepo; either (A) align all packages to a single `@types/node` version by
updating the dependency entry for "@types/node" in signers—ethereum (and the
other signers and hw-wallets packages) to match the chosen monorepo version, or
(B) if different versions are intentional, add a short rationale in each
package’s package.json or repo documentation explaining the Node target
differences and why distinct `@types/node` versions are required so maintainers
understand the split.

---

Nitpick comments:
In `@packages/request/package.json`:
- Line 48: The devDependency "typescript-eslint" is pinned to an exact version
while related packages "@typescript-eslint/eslint-plugin" and
"@typescript-eslint/parser" use caret ranges; update the "typescript-eslint"
entry in package.json to use a caret-prefixed version (e.g., change "8.56.1" to
"^8.56.1") so its version specifier is consistent with the other
`@typescript-eslint` packages.

In `@packages/signers/ethereum/package.json`:
- Line 49: The typescript-eslint dependency in
packages/signers/ethereum/package.json is pinned to "8.56.1" while related
typescript-eslint packages use caret ranges; update the dependency string for
"typescript-eslint" to use a caret range (e.g., "^8.56.1") for consistency with
the other typescript-eslint entries and with packages/request/package.json.

In `@packages/signers/polkadot/package.json`:
- Around line 24-30: Move the tooling package entry "@commitlint/cli" out of the
"dependencies" block and place it into "devDependencies" in package.json so it
isn't bundled into runtime builds; update the JSON by removing
"@commitlint/cli": "^20.4.2" from the "dependencies" object and adding the same
entry under "devDependencies" (preserve the version) and run a quick
install/test to ensure lockfile updates.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c65a4f7 and 4a35d2c.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (18)
  • package.json
  • packages/extension-bridge/package.json
  • packages/extension/package.json
  • packages/hw-wallets/package.json
  • packages/keyring/package.json
  • packages/name-resolution/package.json
  • packages/request/package.json
  • packages/signers/bitcoin/package.json
  • packages/signers/ethereum/package.json
  • packages/signers/kadena/package.json
  • packages/signers/massa/package.json
  • packages/signers/polkadot/package.json
  • packages/storage/package.json
  • packages/swap/package.json
  • packages/swap/src/configs.ts
  • packages/swap/src/providers/oneInchFusion/index.ts
  • packages/types/package.json
  • packages/utils/package.json

"@typescript-eslint/eslint-plugin": "^8.56.0",
"@typescript-eslint/parser": "^8.56.0",
"eslint": "^9.39.2",
"@types/node": "^25.3.2",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check `@types/node` versions across all package.json files in the monorepo

echo "=== `@types/node` versions across packages ==="
fd 'package.json' --type f --exec grep -l '@types/node' {} \; | xargs -I {} sh -c 'echo "File: {}"; grep "@types/node" "{}" || true; echo ""'

Repository: enkryptcom/enKrypt

Length of output: 1215


Address inconsistent @types/node versions across the monorepo.

The monorepo uses two major versions of @types/node: v25.x in some packages (signers—ethereum, bitcoin, kadena, polkadot—and hw-wallets) and v22.x in others. If this split is intentional (e.g., due to different Node.js targets), document the rationale. Otherwise, align all packages to a single version to avoid potential type definition conflicts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/signers/ethereum/package.json` at line 35, The package.json
dependency for "@types/node" is set to "^25.3.2" here while other packages use
v22.x causing inconsistent type definitions across the monorepo; either (A)
align all packages to a single `@types/node` version by updating the dependency
entry for "@types/node" in signers—ethereum (and the other signers and
hw-wallets packages) to match the chosen monorepo version, or (B) if different
versions are intentional, add a short rationale in each package’s package.json
or repo documentation explaining the Node target differences and why distinct
`@types/node` versions are required so maintainers understand the split.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/extension/package.json (2)

26-82: ⚠️ Potential issue | 🔴 Critical

@amplitude/analytics-browser@2.35.3 cannot be verified as a published version and should be investigated.

The official Amplitude TypeScript repository changelog does not include entries for 2.35.x versions, and public package registries (UNPKG) show 2.33.5 as the most recent available version. This suggests the specified version may not exist or may not be properly published. This must be resolved before merging.

vue 3.5.29 is a safe patch release containing only bug fixes (instance leak prevention, className escaping, transition race condition fix) with no breaking changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/extension/package.json` around lines 26 - 82, The dependency entry
"@amplitude/analytics-browser": "^2.35.3" in package.json cannot be verified as
a published version; update or revert it to a valid released version (e.g.,
replace the version with a confirmed published release such as "^2.33.5" or the
latest valid version), or remove the dependency if unused, then run yarn/npm
install and lockfile update to ensure consistency; verify by checking the npm
registry for "@amplitude/analytics-browser" before pushing.

103-142: ⚠️ Potential issue | 🔴 Critical

Correction needed: @types/chrome 0.1.37 does not exist, and rollup 4.59.0 introduces a breaking change that requires verification.

The version @types/chrome@0.1.37 does not exist in npm; published versions are 0.0.x and 0.1.0–0.1.4 only. Additionally, rollup@4.59.0 introduces a breaking change: it now throws an error if generated output paths would escape output.dir (via ../ traversal or absolute paths). This is a security fix for CVE-2026-27606 and requires verifying that the build configuration does not rely on path escaping via entryFileNames, chunkFileNames, assetFileNames, or plugin-emitted files.

The other packages (eslint@9.39.3, vue-tsc@3.2.5) are patch releases with no breaking changes. @types/lodash@4.17.24 and @types/node@22.19.13 are patch updates without documented breaking changes, though @types/node should be verified for TypeScript version compatibility and undici-types changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/extension/package.json` around lines 103 - 142, The package.json
lists a non-existent `@types/chrome`@0.1.37 and a potentially breaking
rollup@4.59.0; change "@types/chrome" to a published version (e.g., 0.1.4 or the
latest 0.0.x) and either pin rollup to a known-safe v4 release or audit/adjust
your Rollup config: inspect and fix any usage of entryFileNames, chunkFileNames,
assetFileNames or plugin-emitted file names that produce "../" or absolute paths
so outputs never escape output.dir, and run a full build to confirm no errors;
while here also verify `@types/node` (and undici-types) compatibility with your
TypeScript version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/extension/package.json`:
- Around line 26-82: The dependency entry "@amplitude/analytics-browser":
"^2.35.3" in package.json cannot be verified as a published version; update or
revert it to a valid released version (e.g., replace the version with a
confirmed published release such as "^2.33.5" or the latest valid version), or
remove the dependency if unused, then run yarn/npm install and lockfile update
to ensure consistency; verify by checking the npm registry for
"@amplitude/analytics-browser" before pushing.
- Around line 103-142: The package.json lists a non-existent
`@types/chrome`@0.1.37 and a potentially breaking rollup@4.59.0; change
"@types/chrome" to a published version (e.g., 0.1.4 or the latest 0.0.x) and
either pin rollup to a known-safe v4 release or audit/adjust your Rollup config:
inspect and fix any usage of entryFileNames, chunkFileNames, assetFileNames or
plugin-emitted file names that produce "../" or absolute paths so outputs never
escape output.dir, and run a full build to confirm no errors; while here also
verify `@types/node` (and undici-types) compatibility with your TypeScript
version.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a35d2c and 0e80c0c.

📒 Files selected for processing (1)
  • packages/extension/package.json

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue (1)

292-293: Add overflow guards for fixed-width columns to avoid row misalignment

With fixed widths at Line 292 and Line 333, long currency/localized values can wrap or overflow and make row heights inconsistent. Add truncation in the value block to keep layout stable.

💡 Suggested CSS adjustment
   &__value {
     text-align: right;
     width: 90px;
     flex-shrink: 0;
+    overflow: hidden;
   }

   &__usd {
     font-size: 15px;
     font-weight: 600;
     color: `@primaryLabel`;
     margin: 0 0 2px 0;
     line-height: 1.3;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
   }

   &__price {
     font-size: 12px;
     font-weight: 400;
     color: `@tertiaryLabel`;
     margin: 0;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;

     &::before {
       content: '@';
       opacity: 0.7;
     }
   }

Also applies to: 333-334

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue`
around lines 292 - 293, The fixed-width column blocks that set "width: 80px;
flex-shrink: 0;" (and the similar block at the later pair of lines) need
overflow guards so long currency/localized values don't wrap and change row
height; update the CSS for the cell/value container referenced in
network-assets-item.vue to include "overflow: hidden; text-overflow: ellipsis;
white-space: nowrap;" (or apply these rules to the direct child that renders the
value) so text is truncated with an ellipsis and layout remains stable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue`:
- Around line 292-293: The fixed-width column blocks that set "width: 80px;
flex-shrink: 0;" (and the similar block at the later pair of lines) need
overflow guards so long currency/localized values don't wrap and change row
height; update the CSS for the cell/value container referenced in
network-assets-item.vue to include "overflow: hidden; text-overflow: ellipsis;
white-space: nowrap;" (or apply these rules to the direct child that renders the
value) so text is truncated with an ellipsis and layout remains stable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b791262f-bb00-426d-ab57-a1d9d9b3cd32

📥 Commits

Reviewing files that changed from the base of the PR and between 0e80c0c and 8cea407.

📒 Files selected for processing (2)
  • packages/extension/src/ui/action/views/network-assets/components/network-assets-header.vue
  • packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/extension/src/ui/action/views/swap/index.vue (1)

905-914: Empty ::before pseudo-element has no visual effect.

The pseudo-element defines positioning and dimensions but lacks any visual properties (background, color, border, etc.). This appears to be unused code or an incomplete implementation.

💡 Consider removing or completing the pseudo-element

If this was intended as a decorative element, add visual properties:

   &::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 200px;
     pointer-events: none;
     z-index: 0;
+    background: linear-gradient(135deg, rgba(98, 126, 234, 0.05) 0%, transparent 100%);
   }

Or remove it if not needed:

   overflow: hidden;
-
-  &::before {
-    content: '';
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    height: 200px;
-    pointer-events: none;
-    z-index: 0;
-  }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/extension/src/ui/action/views/swap/index.vue` around lines 905 -
914, The ::before pseudo-element in the CSS block inside the swap component is
empty and has no visual effect; either remove the entire &::before rule or
complete it by adding intended visual properties (e.g., background, gradient,
opacity, border, or box-shadow) and ensure pointer-events and z-index remain
correct; update the selector (&::before) in the swap/index.vue styles where
height: 200px and positioning are defined so the intended decorative effect is
actually visible or the dead rule is eliminated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/extension/src/ui/action/views/swap/components/swap-token-to-amount/index.vue`:
- Around line 93-96: The .focus styles never apply because isFocus is never
changed; either add a reactive isFocus boolean on the component and toggle it on
the amount input's focus and blur handlers (set isFocus = true on `@focus` and
isFocus = false on `@blur`, then bind the container class so it gets "focus" when
isFocus is true), or drop the JS and change the selector to use :focus-within on
the container so the focus ring appears whenever the amount input is focused;
update the template to ensure the amount input triggers the chosen approach.

In `@packages/swap/src/index.ts`:
- Around line 171-180: Filtering out failed providers after initialization
(using initFailed and Provider.init) leaves this.providers missing entries that
public methods expect; update the public entry points (getSwap, getStatus,
submitRFQOrder) to defensively handle missing providers by checking the result
of this.providers.find(...) and returning a clean failure/error when not found
instead of dereferencing it; keep the existing initFailed logic but ensure each
method performs a null-check on the provider (by provider id/name from
quote.provider or options.provider) and returns a clear error or throws a
well-defined exception when the provider is absent.

---

Nitpick comments:
In `@packages/extension/src/ui/action/views/swap/index.vue`:
- Around line 905-914: The ::before pseudo-element in the CSS block inside the
swap component is empty and has no visual effect; either remove the entire
&::before rule or complete it by adding intended visual properties (e.g.,
background, gradient, opacity, border, or box-shadow) and ensure pointer-events
and z-index remain correct; update the selector (&::before) in the
swap/index.vue styles where height: 200px and positioning are defined so the
intended decorative effect is actually visible or the dead rule is eliminated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 21093c06-d0e0-42e2-a524-ff9ed5987a4d

📥 Commits

Reviewing files that changed from the base of the PR and between 8cea407 and 3d3c1b1.

📒 Files selected for processing (12)
  • packages/extension/src/ui/action/views/swap/components/send-address-input.vue
  • packages/extension/src/ui/action/views/swap/components/swap-network-select/index.vue
  • packages/extension/src/ui/action/views/swap/components/swap-token-amount-input/index.vue
  • packages/extension/src/ui/action/views/swap/components/swap-token-select/index.vue
  • packages/extension/src/ui/action/views/swap/components/swap-token-to-amount/index.vue
  • packages/extension/src/ui/action/views/swap/index.vue
  • packages/swap/package.json
  • packages/swap/src/index.ts
  • packages/swap/src/providers/oneInch/index.ts
  • packages/swap/src/providers/oneInchFusion/index.ts
  • packages/swap/src/providers/paraswap/index.ts
  • packages/swap/src/providers/zerox/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/swap/package.json

Comment on lines 93 to 96
&.focus {
border: 1px solid @primary;
box-shadow: 0 0 0 3px rgba(98, 126, 234, 0.12);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

The new focus ring never becomes active.

Line 93 styles a .focus state, but this component never mutates isFocus, so the container never receives that class. The new focus treatment won't appear when the amount input is focused.

💡 Suggested fix
-  <div class="swap-token-input" :class="{ focus: isFocus }">
+  <div class="swap-token-input">
-import { computed, ref } from 'vue';
+import { computed } from 'vue';
...
-const isFocus = ref(false);
-  &.focus {
+  &:focus-within {
     border: 1px solid `@primary`;
     box-shadow: 0 0 0 3px rgba(98, 126, 234, 0.12);
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/extension/src/ui/action/views/swap/components/swap-token-to-amount/index.vue`
around lines 93 - 96, The .focus styles never apply because isFocus is never
changed; either add a reactive isFocus boolean on the component and toggle it on
the amount input's focus and blur handlers (set isFocus = true on `@focus` and
isFocus = false on `@blur`, then bind the container class so it gets "focus" when
isFocus is true), or drop the JS and change the selector to use :focus-within on
the container so the focus ring appears whenever the amount input is focused;
update the template to ensure the amount input triggers the chosen approach.

Comment on lines +171 to +180
const initFailed: string[] = [];
await Promise.all(
this.providers.map((Provider) => Provider.init(this.tokenList.all)),
this.providers.map((Provider) => {
const initedProv = Provider.init(this.tokenList.all).catch(() => {
initFailed.push(Provider.name);
});
return initedProv;
}),
);
this.providers = this.providers.filter((p) => !initFailed.includes(p.name));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Filtering failed providers here makes later find() calls unsafe.

After Line 180, this.providers is no longer guaranteed to contain every quote.provider / options.provider value the public methods receive. getSwap, getStatus, and submitRFQOrder still dereference the find() result unconditionally, so a stale quote or status object now turns into a runtime exception instead of a clean failure.

🛡️ Suggested guard for the public entry points
  getSwap(
    quote: SwapQuote,
    context?: { signal?: AbortSignal },
  ): Promise<ProviderSwapResponse | null> {
    const provider = this.providers.find((p) => p.name === quote.provider);
-   return provider.getSwap(quote, context);
+   if (!provider) return Promise.resolve(null);
+   return provider.getSwap(quote, context);
  }

  getStatus(options: StatusOptionsResponse): Promise<TransactionStatus | null> {
    const provider = this.providers.find((p) => p.name === options.provider);
-   return provider.getStatus(options.options);
+   if (!provider) return Promise.resolve(null);
+   return provider.getStatus(options.options);
  }

  submitRFQOrder(options: RFQOptionsResponse): Promise<string> {
    const provider = this.providers.find((p) => p.name === options.provider);
-   return (provider as ProviderWithRFQ).submitRFQOrder(options.options);
+   if (!provider) {
+     return Promise.reject(
+       new Error(`Provider ${options.provider} is unavailable`),
+     );
+   }
+   return (provider as ProviderWithRFQ).submitRFQOrder(options.options);
  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/swap/src/index.ts` around lines 171 - 180, Filtering out failed
providers after initialization (using initFailed and Provider.init) leaves
this.providers missing entries that public methods expect; update the public
entry points (getSwap, getStatus, submitRFQOrder) to defensively handle missing
providers by checking the result of this.providers.find(...) and returning a
clean failure/error when not found instead of dereferencing it; keep the
existing initFailed logic but ensure each method performs a null-check on the
provider (by provider id/name from quote.provider or options.provider) and
returns a clear error or throws a well-defined exception when the provider is
absent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant