Skip to content

devop: release2-17#788

Merged
kvhnuke merged 20 commits intodevelopfrom
devop/release-v2-17
Apr 13, 2026
Merged

devop: release2-17#788
kvhnuke merged 20 commits intodevelopfrom
devop/release-v2-17

Conversation

@kvhnuke
Copy link
Copy Markdown
Contributor

@kvhnuke kvhnuke commented Feb 26, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed fee source mapping for 1inch Fusion with MEW; reduced Paraswap fee for MEW from 0.025 to 0.02.
    • Swap providers that fail to initialize are now skipped to improve reliability.
  • New Features

    • Polkadot metadata update now validates on-chain compatibility and shows a loading state during validation.
  • Style

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

    • Updated tooling and dependency versions across multiple packages.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 26, 2026

💼 Build Files
chrome: enkrypt-chrome-337cd96e.zip
firefox: enkrypt-firefox-337cd96e.zip

💉 Virus total analysis
chrome: 337cd96e
firefox: 337cd96e

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

coderabbitai bot commented Feb 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Bumps many dev/runtime dependency versions across packages, increments package versions in packages/extension and packages/swap, reduces ParaSwap MEW wallet fee, maps oneInchFusion quote source for MEW, makes several swap provider init methods async and filters failed providers, and applies multiple extension UI styling updates.

Changes

Cohort / File(s) Summary
Root manifest
package.json
Updated devDependencies: @commitlint/cli, @commitlint/config-conventional, @swc/core, nodemon.
Monorepo 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 lint/format tooling. packages/extension and packages/swap package versions incremented.
Swap configs
packages/swap/src/configs.ts
Reduced ParaSwap fee for WalletIdentifier.mew from 0.025 to 0.02.
oneInchFusion provider
packages/swap/src/providers/oneInchFusion/index.ts
Made init async; when fee config present, set quoteParams.source to "myetherwallet" for WalletIdentifier.mew; added WalletIdentifier import.
Provider init orchestration
packages/swap/src/index.ts, packages/swap/src/providers/*/index.ts
Several provider init methods changed to async. Swap init now awaits each provider, records failures, and removes providers that failed initialization from the active list.
Provider init signature updates
packages/swap/src/providers/oneInch/index.ts, packages/swap/src/providers/paraswap/index.ts, packages/swap/src/providers/zerox/index.ts
Changed init(tokenList: TokenType[]) to async init(...) (no other internal logic changes).
Extension UI styling
packages/extension/src/ui/action/views/network-assets/components/network-assets-header.vue, .../network-assets-item.vue, .../swap/** (multiple files)
Visual and interaction updates across network-assets and swap UI: layout/padding/width adjustments, hover/focus effects, button visuals, animations, scrollbar styling. No data-flow changes.
Polkadot metadata UI
packages/extension/src/providers/polkadot/ui/dot-update-metadata.vue
Added loading state and pre-approve validation against chain (ApiPromise + network lookup) to ensure metadata/specVersion/decimals match before adding metadata.

Sequence Diagram(s)

sequenceDiagram
  participant Client as App
  participant Swap as SwapService
  participant Reg as ProviderRegistry
  participant Prov as Provider
  rect rgba(200,200,255,0.5)
    Client->>Swap: init swap(tokenList)
    Swap->>Reg: get providers list
    loop per provider
      Swap->>Prov: await init(tokenList)
      alt init resolves
        Prov-->>Swap: resolved
      else init throws
        Prov-->>Swap: rejected
        Swap->>Swap: record initFailed[prov.name]=true
      end
    end
    Swap->>Reg: remove providers where initFailed
    Swap-->>Client: return initialized providers
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

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

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'devop: release2-17' is partially related to the changeset - it indicates a release version update, but uses informal naming ('devop' instead of 'devops' or 'chore', 'release2-17' instead of 'v2.17.0' or 'release 2.17'), lacks clarity about the scope of changes (dependency updates, UI improvements, provider initialization), and doesn't clearly convey the main changes to someone scanning history. Consider using a more descriptive title like 'chore: release v2.17.0 with dependency updates and UI improvements' or 'release: version 2.17.0' to better reflect the actual scope of changes.
✅ 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 unit tests (beta)
  • Create PR with unit tests
  • 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
Copy Markdown

@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

Comment thread packages/signers/ethereum/package.json Outdated
Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown

@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 thread packages/swap/src/index.ts
Copy link
Copy Markdown

@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

Caution

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

⚠️ Outside diff range comments (1)
packages/extension/src/providers/polkadot/ui/dot-update-metadata.vue (1)

159-171: ⚠️ Potential issue | 🟡 Minor

Close the reentrancy gap before isLoading is set.

Line 170 sets isLoading only after awaiting windowPromise (Line 160). A quick double-click can enter approve twice before the disabled state applies.

Proposed fix
 const approve = async () => {
+  if (isLoading.value) return;
+  isLoading.value = true;
   const { Resolve, Request } = await windowPromise;
   if (
     !Request.value.params ||
     Request.value.params.length < 1 ||
     !metadata.value ||
     !metadata.value.genesisHash
   ) {
+    isLoading.value = false;
     return Resolve.value({ error: getCustomError('No params') });
   }
-
-  isLoading.value = true;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/extension/src/providers/polkadot/ui/dot-update-metadata.vue` around
lines 159 - 171, The approve handler has a reentrancy gap because
isLoading.value is set only after awaiting windowPromise; move the
isLoading.value = true assignment to the very start of the approve function
(before awaiting windowPromise) so the UI disables immediately, and ensure you
clear isLoading.value = false on every early return/error path (including when
returning Resolve.value for missing Request.value.params or
metadata.value.genesisHash) to avoid leaving the UI locked; update references in
the approve function (windowPromise, Resolve, Request, metadata) accordingly.
🤖 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/providers/polkadot/ui/dot-update-metadata.vue`:
- Around line 127-155: The validation function validateMetadataAgainstApi should
be hardened: move the getAllNetworks() call and the targetNetwork lookup inside
the try block, wrap the targetNetwork.api() and any RPC-dependent accesses
(api.genesisHash, api.runtimeVersion.specVersion, targetNetwork.decimals) with a
cancellable/timeout wrapper so RPC calls fail fast, and include the caught error
details in the returned message (e.g., return or throw a string/error that
includes the original exception); specifically update validateMetadataAgainstApi
to perform network discovery and API connection inside try, apply a timeout to
targetNetwork.api() and subsequent ApiPromise usage, and ensure the catch block
returns or rethrows a wrapped error containing the original error message/stack
for easier debugging.
- Around line 178-187: The Promise from
mstorage.addMetadata(metadata.value.genesisHash, JSON.stringify(metadata.value))
currently has no .catch, so failures never resolve the request; add a .catch
handler on that promise to call Resolve.value with an error payload (e.g.,
result: JSON.stringify(false) and/or an error message) and ensure
isLoading.value = false is set in both success and failure paths (or move
isLoading.value = false into a .finally that runs after catch), referencing
mstorage.addMetadata, Resolve.value, metadata.value.genesisHash, and
isLoading.value to locate the code to change.

---

Outside diff comments:
In `@packages/extension/src/providers/polkadot/ui/dot-update-metadata.vue`:
- Around line 159-171: The approve handler has a reentrancy gap because
isLoading.value is set only after awaiting windowPromise; move the
isLoading.value = true assignment to the very start of the approve function
(before awaiting windowPromise) so the UI disables immediately, and ensure you
clear isLoading.value = false on every early return/error path (including when
returning Resolve.value for missing Request.value.params or
metadata.value.genesisHash) to avoid leaving the UI locked; update references in
the approve function (windowPromise, Resolve, Request, metadata) accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f7096b0b-0607-44c9-9fbd-ddb3b5dca586

📥 Commits

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

📒 Files selected for processing (1)
  • packages/extension/src/providers/polkadot/ui/dot-update-metadata.vue

@kvhnuke kvhnuke merged commit d1d1058 into develop Apr 13, 2026
5 checks passed
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.

4 participants