Skip to content

Conversation

@popenta
Copy link

@popenta popenta commented Sep 17, 2025

For testing purposes, api and explorer urls can be changed for devnet/testnet. For that, check out the last commit (hash: e9558d926b882ffc1c09e9968f439d75e83c14de).

Summary by CodeRabbit

  • New Features
    • Added full MultiversX (EGLD) network support: provider, accounts, address validation, balances, activity, NFTs, and market data.
    • Enabled sending and verifying MultiversX transactions (native and ESDT), with fee display and max send.
    • Added message/transaction signing flows and persistent events handling.
  • UI
    • New MultiversX connect, sign-message, send, and verify-transaction screens with token selectors and alerts.
    • Activity view now displays MultiversX transactions and statuses.
  • Documentation
    • Listed MultiversX under supported chains.
  • Bug Fixes
    • Corrected “request” typo in an error message.
  • Chores
    • Added required SDKs and signer package.
  • Tests
    • Introduced signer generation and sign/verify tests.

@coderabbitai
Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Adds MultiversX (MVX) support across the extension: new provider, network, signer, APIs, UI flows (connect, sign message, send/verify transaction), activity/NFT handlers, storage for per-domain approvals, and types integration. Updates initialization, injection, background handling, and keyring. Minor docs/readme and request error message fix included.

Changes

Cohort / File(s) Summary
Docs
README.md
Adds MultiversX to supported chains list.
Dependency wiring
packages/extension/package.json, packages/keyring/package.json
Adds MultiversX SDK libs to extension and signer dependency to keyring.
Background/injection integration
packages/extension/src/libs/background/index.ts, packages/extension/src/scripts/inject.ts, packages/extension/src/providers/index.ts
Registers MultiversX provider, hooks persistent events, window messaging, and tab providers; injects MVX into page.
Wallet/network utilities
packages/extension/src/libs/utils/initialize-wallet.ts, packages/extension/src/libs/utils/networks.ts
Initializes default MVX account if absent; adds MVX to network maps, defaults, and popularity. Removes DEFAULT_EVM_NETWORK_NAME export.
Provider core (MVX)
packages/extension/src/providers/multiversx/index.ts, .../inject.ts, .../methods/*, .../libs/api.ts, .../libs/message-handler.ts
Implements background/injected MVX provider, RPC middleware (mvx_signTransaction), API wrapper, and incoming message handling.
MVX network/type layer
packages/extension/src/providers/multiversx/networks/*, .../types/index.ts, .../types/mvx-network.ts, .../types/mvx-token.ts
Defines MVX network configuration, address utils, token model with buildTransaction/sign, and provider message/types.
Activity/NFT handlers (MVX)
packages/extension/src/providers/multiversx/libs/activity-handlers/*, packages/extension/src/types/activity.ts
Adds MVX activity/NFT fetchers and raw info type; extends Activity rawInfo union.
Per-domain approval state (MVX)
packages/extension/src/providers/multiversx/libs/account-state/*
Adds storage-backed approval state per domain for MVX.
MVX UI flows
packages/extension/src/providers/multiversx/ui/routes/*, .../ui/libs/signer.ts, .../ui/mvx-accounts.vue, .../ui/mvx-sign-message.vue
Adds routes and UIs for account connect and message signing; internal signer bridge.
MVX Send/Verify UI
packages/extension/src/providers/multiversx/ui/send-transaction/**/*, packages/extension/src/ui/action/views/send-transaction/index.vue, packages/extension/src/ui/action/views/verify-transaction/index.vue
Implements MVX send flow components, fee displays, token pickers, verify screen; wires into generic send/verify views.
App/UI ancillary updates
packages/extension/src/ui/action/App.vue, .../views/network-activity/index.vue, .../views/network-activity/components/network-activity-transaction.vue
Adds MVX buy link support, metrics/init tweaks, MVX activity status handling and imports.
Type surface updates
packages/extension/src/types/base-network.ts, .../base-token.ts, .../nft.ts, .../provider.ts, packages/types/src/index.ts, packages/types/src/networks.ts
Extends unions/enums for MVX API, token, NFT type, provider name/type, storage namespace, signer type, and network names/platform.
Keyring/signers
packages/keyring/src/index.ts, packages/signers/multiversx/**/*
Adds ed25519mvx signer mapping; introduces MultiversX signer package with generate/sign/verify and tests.
Miscellaneous
packages/request/src/index.ts, packages/extension/tsconfig.json
Fixes typo in error message; adds TS types path for PactJS.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor DApp
  participant Injected as Injected MVX Provider
  participant Content as Content Script
  participant BG as Background (MultiversXProvider)
  participant MW as MVX Middlewares
  participant UI as UI Window
  participant User as User

  DApp->>Injected: request({ method: "mvx_signTransaction", params })
  Injected->>Content: sendMessage(name=multiversx, payload)
  Content->>BG: relay(payload)
  BG->>MW: mvx_signTransaction middleware
  MW-->>UI: Open mvx-sign route with payload
  UI-->>User: Display sign prompt
  User-->>UI: Approve / Reject
  UI-->>MW: Resolve result/error
  MW-->>BG: OnMessageResponse
  BG-->>Content: response
  Content-->>Injected: response
  Injected-->>DApp: result/error
Loading
sequenceDiagram
  autonumber
  actor User
  participant Send as MVX Send Form
  participant Verify as MVX Verify Screen
  participant Net as MultiversXNetwork/MVXToken
  participant API as MVX API
  participant Store as Activity Store

  User->>Send: Enter to, select token, amount
  Send->>Net: Build Transaction (MVXToken.buildTransaction)
  Send-->>Verify: Navigate with tx data
  Verify->>API: sendTransaction(tx)
  API-->>Verify: txHash
  Verify->>Store: add Activity (rawInfo, status=pending)
  Verify-->>User: Success/Close
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • Release: v2.4.0 #621 — Touches the same wallet initialization flow (initialize-wallet.ts), overlapping with MVX account bootstrapping.
  • Fix/copy #598 — Modifies network aggregation/utilities similar to this PR’s networks.ts changes, potential merge conflicts.
  • feat: add conflux network #683 — Also adds a new network via NetworkNames/CoingeckoPlatform enums, overlapping enum surfaces with this PR.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: MultiversX support" is concise, uses the conventional "feat" prefix, and accurately summarizes the primary change introduced by the branch (adding MultiversX integration across providers, signers, networks, and UI), so a reviewer scanning history will understand the main intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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: 27

Caution

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

⚠️ Outside diff range comments (3)
packages/extension/src/libs/background/index.ts (2)

58-72: Don’t rotate randomUserID on every init (breaks stability/analytics).

randomUserID is reset on each init. Persist it after first set; only set if missing.

Apply:

   async init(): Promise<void> {
     await handlePersistentEvents.bind(this)();
     const enkryptSettings = await this.#settingsState.getEnkryptSettings();
-    if (!enkryptSettings.installedTimestamp) {
-      await this.#settingsState.setEnkryptSettings({
-        ...enkryptSettings,
-        ...{
-          installedTimestamp: new Date().getTime(),
-          randomUserID: randomUUID(),
-        },
-      });
-    } else {
-      await this.#settingsState.setEnkryptSettings({
-        ...enkryptSettings,
-        randomUserID: randomUUID(),
-      });
-    }
+    await this.#settingsState.setEnkryptSettings({
+      ...enkryptSettings,
+      installedTimestamp: enkryptSettings.installedTimestamp ?? Date.now(),
+      randomUserID: enkryptSettings.randomUserID ?? randomUUID(),
+    });
   }

78-103: Guard invalid/missing tabId and tabs.get failures to avoid runtime errors.

External messages without a valid tab can throw. Return a typed error instead.

-    const tabInfo = TabInfo(await Browser.tabs.get(_tabid));
+    if (typeof _tabid !== 'number') {
+      return { error: JSON.stringify(getCustomError('Invalid tab id')) };
+    }
+    let tab;
+    try {
+      tab = await Browser.tabs.get(_tabid);
+    } catch {
+      return { error: JSON.stringify(getCustomError('Tab not found')) };
+    }
+    const tabInfo = TabInfo(tab);
packages/extension/src/ui/action/views/send-transaction/index.vue (1)

50-56: Bug: using props.network instead of resolved network.

This can desync layout selection vs. passed network. Use the resolved network.

 getNetworkByName(networkName).then(network => {
   if (network) {
-    localNetwork.value = props.network;
+    localNetwork.value = network;
     localAccounts.value = props.accountInfo;
     layout.value = sendLayouts[network.provider];
   }
 });
🧹 Nitpick comments (79)
packages/signers/multiversx/.eslintignore (1)

1-2: LGTM, with a tiny pattern nit: prefer trailing slashes for directories.

Using coverage/ and dist/ makes the intent unambiguous and avoids accidental matches on files named coverage or dist.

-coverage
-dist
+coverage/
+dist/
packages/signers/multiversx/.gitignore (4)

83-84: Deduplicate dist ignore.

dist is listed twice (Lines 83–84 and Line 106). Keep a single entry.

@@
-.vuepress/dist
-
-dist
+.vuepress/dist
@@
-
-dist

Also applies to: 106-106


71-74: Add env.*.local variants (common in tooling).

These often contain secrets and should be ignored alongside .env and .env.test.

 # dotenv environment variables file
 .env
 .env.test
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local

31-36: Prune legacy tool entries (optional).

bower_components, node-waf, and FuseBox are likely irrelevant here. Consider removing to keep the file lean, unless still in use.

Also applies to: 97-99


48-55: Add Vite cache ignores where Vite is used.
Vite is present in packages/extension — add node_modules/.vite and .vite to the repo .gitignore or to packages/extension/.gitignore; pnpm, Yarn PnP (.pnp.*) and Turbo (.turbo) artifacts were not detected, so their ignores aren’t necessary here.

packages/signers/multiversx/.editorconfig (2)

1-1: Use HTTPS in the reference URL.

Minor: swap to HTTPS to avoid redirects.

-# Editor configuration, see http://editorconfig.org
+# Editor configuration, see https://editorconfig.org

4-8: Add common cross‑platform defaults (EOL, final newline, trim).

These reduce diff noise and CI/editor inconsistencies.

 [*]
 charset = utf-8
 indent_style = space
 indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
packages/signers/multiversx/.eslintrc.json (4)

2-9: Prefer enabling Prettier as an ESLint rule.

Replace plain "prettier" extend with "plugin:prettier/recommended" to surface formatting issues during lint and auto‑fix on save.

   "extends": [
     "airbnb-base",
     "plugin:import/errors",
     "plugin:import/warnings",
     "plugin:import/typescript",
     "plugin:@typescript-eslint/recommended",
-    "prettier"
+    "plugin:prettier/recommended"
   ],

54-56: Enable type‑aware linting by wiring the project.

If you plan to use type‑aware rules (e.g., no-floating-promises, no-unsafe-*), point the parser at tsconfig.

   "parser": "@typescript-eslint/parser",
-  "env": {},
-  "overrides": [],
+  "parserOptions": {
+    "project": ["./tsconfig.json"]
+  },
+  "env": {
+    "es2022": true,
+    "browser": true,
+    "node": true
+  },
+  "overrides": [
+    {
+      "files": ["tests/**/*.ts", "**/*.spec.ts", "**/*.test.ts"],
+      "env": { "jest": true, "node": true }
+    }
+  ],

Note: with JSON configs, omit tsconfigRootDir; project path should resolve relative to this file.


54-56: Ignore build artifacts to speed up lint and avoid noise.

   "parser": "@typescript-eslint/parser",
+  "ignorePatterns": ["dist/", "build/", "coverage/"],

20-21: Sanity check on console usage.

Keeping no-console off is fine during integration; consider gating or routing to a shared logger before release to avoid noisy logs in production builds.

packages/extension/package.json (1)

47-48: Lazy-load MVX transaction decoder; avoid deep-import

  • Verified eager deep-import at packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts:7 — import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder/lib/src/transaction.decoder';
  • Change to a dynamic import inside MVX-only code paths to keep the base bundle small, e.g. const { TransactionDecoder } = await import('@multiversx/sdk-transaction-decoder') (if the package root doesn't export it, lazy-load the same deep path).
  • Also confirm @multiversx/sdk-core (^15.0.0) and @multiversx/sdk-transaction-decoder (^2.0.0) are compatible with your Node/Vite targets and bundler CJS/ESM handling.
packages/signers/multiversx/vitest.config.mts (1)

1-10: LGTM; minimal and correct Vitest setup.

Consider pinning test.environment explicitly if you later add DOM-dependent tests.

packages/extension/src/providers/multiversx/ui/send-transaction/components/send-alert.vue (1)

1-6: Add minimal a11y semantics to the alert container.

Expose the live region so SR users are notified when errors appear.

Apply:

-  <div class="send-alert">
+  <div class="send-alert" role="alert" aria-live="polite" aria-atomic="true">
packages/signers/multiversx/package.json (1)

21-23: Bump Node engine to a supported LTS.

Node 14 is EOL; tsup/vitest toolchains generally assume >=18.

Apply:

-  "engines": {
-    "node": ">=14.15.0"
-  },
+  "engines": {
+    "node": ">=18.18.0"
+  },
packages/extension/src/providers/multiversx/libs/message-handler.ts (1)

18-23: Guard params and method handling to avoid undefined address emissions.

Validate params before emitting; otherwise accountsChanged may fire with [undefined].

Apply:

-    if (jsonMsg.method === MessageMethod.changeAddress) {
-      const address = jsonMsg.params[0] as string;
-      _provider.emit(EmitEvent.accountsChanged, [address]);
-    } else {
+    if (jsonMsg.method === MessageMethod.changeAddress) {
+      const address = Array.isArray(jsonMsg.params)
+        ? jsonMsg.params[0]
+        : undefined;
+      if (typeof address === 'string' && address.length > 0) {
+        _provider.emit(EmitEvent.accountsChanged, [address]);
+      } else {
+        console.error('Invalid changeAddress payload:', jsonMsg);
+      }
+    } else {
       console.error(`Unable to process message: ${message}`);
     }
packages/extension/src/providers/multiversx/ui/types/index.ts (1)

26-27: Prefer lowerCamelCase for field names; align with usage.

transactionData reads cleaner and avoids confusion with type names.

Apply:

-  TransactionData: SendTransactionDataType;
+  transactionData: SendTransactionDataType;

Follow up: update all call sites (e.g., MVX verify view) accordingly.

packages/extension/src/providers/multiversx/inject.ts (1)

53-55: Defensively create the global injection path.

Avoid runtime errors if window.enkrypt or .providers isn’t initialized yet.

Apply:

-  const provider = new Provider(options);
-  document['enkrypt']['providers'][options.name] = provider;
+  const provider = new Provider(options);
+  const root = (document as any)['enkrypt'] || ((document as any)['enkrypt'] = { providers: {}, settings: {} });
+  root.providers = root.providers || {};
+  root.providers[options.name] = provider;
packages/extension/src/providers/multiversx/ui/send-transaction/verify-transaction/index.vue (4)

136-151: Add guards for missing/invalid route/network/account.

Non-null assertions can crash if id/txData are malformed; surface an error and block send instead.

Consider:

  • If getNetworkByName returns undefined, set errorMsg and return.
  • If KeyRing.getAccount(...) returns undefined, set errorMsg and return.

176-183: Call buildTransaction on the token you’re sending (avoid placeholder instance).

Using mvxToken (a placeholder) to call buildTransaction is odd and risks state coupling. Use tokenToSend instead.

Apply:

-    const transaction = await mvxToken.value!.buildTransaction!(
+    const transaction = await tokenToSend.buildTransaction!(
       txData.toAddress,
       account.value!,
-      tokenToSend,
+      tokenToSend,
       txData.TransactionData.value,
       network.value as MultiversXNetwork,
     );

189-207: Activity.value should reflect the actual sent amount.

Use the transactionData.value you passed to buildTransaction to avoid drift with toToken.amount.

Apply:

-      value: txData.toToken.amount,
+      value: txData.TransactionData.value,

254-260: Null-safe scroll check.

$el can be undefined during initial render; avoid potential access errors.

Apply:

-  if (verifyScrollRef.value) {
-    return verifyScrollRef.value.$el.classList.contains('ps--active-y');
-  }
+  const el = verifyScrollRef.value?.$el as HTMLElement | undefined;
+  if (el) return el.classList.contains('ps--active-y');
packages/extension/src/providers/multiversx/types/mvx-token.ts (2)

19-25: Narrow the token “type” to a discriminated union (not string).

Prevents invalid states and enables exhaustive handling for native/fungible/NFT/SFT.

-export interface MvxTokenOptions extends BaseTokenOptions {
-  type: string;
-}
+export type MvxTokenType =
+  | 'native'
+  | 'FungibleESDT'
+  | 'NonFungibleESDT'
+  | 'SemiFungibleESDT'
+  | 'MetaESDT';
+
+export interface MvxTokenOptions extends BaseTokenOptions {
+  type: MvxTokenType;
+}
 
 export class MVXToken extends BaseToken {
-  public type: string;
+  public type: MvxTokenType;

42-44: Avoid Promise and clarify unsupported flows.

Return a typed Never/throw with a specific error code to help callers branch.

-  public async send(): Promise<any> {
+  public async send(): Promise<never> {
     throw new Error('send is not implemented here');
   }
packages/signers/multiversx/tests/sign.test.ts (1)

7-10: Include extraWord (even if empty) in test mnemonic for clarity.

Prevents accidental dependence on optionality and mirrors runtime usage.

-  const MNEMONIC = {
-    mnemonic:
-      "matter trumpet twenty parade fame north lift sail valve salon foster cinnamon",
-  };
+  const MNEMONIC = {
+    mnemonic:
+      "matter trumpet twenty parade fame north lift sail valve salon foster cinnamon",
+    extraWord: "",
+  };
packages/signers/multiversx/tests/generate.test.ts (1)

14-26: Fix Vitest matcher: use toBe/toEqual instead of equals.

equals is not a Vitest matcher and will fail at runtime.

-    expect(keypair.address).equals(
+    expect(keypair.address).toBe(
       "erd1l8g9dk3gz035gkjhwegsjkqzdu3augrwhcfxrnucnyyrpc2220pqg4g7na",
     );
@@
-    expect(keypair.address).equals(
+    expect(keypair.address).toBe(
       "erd1fmhwg84rldg0xzngf53m0y607wvefvamh07n2mkypedx27lcqnts4zs09p",
     );
@@
-    expect(keypair.address).equals(
+    expect(keypair.address).toBe(
       "erd1tyuyemt4xz2yjvc7rxxp8kyfmk2n3h8gv3aavzd9ru4v2vhrkcksptewtj",
     );
packages/extension/src/providers/multiversx/libs/activity-handlers/index.ts (1)

1-3: Use direct re-export to avoid an extra import hop.

Slightly cleaner and avoids tree-shaking edge cases.

-import { multiversxScanActivity, nftHandler } from './multiversx';
-
-export { multiversxScanActivity, nftHandler };
+export { multiversxScanActivity, nftHandler } from './multiversx';
packages/extension/src/libs/utils/initialize-wallet.ts (1)

69-75: Harden MVX default account creation check.

Use strict equality for the new block (matches TS best practices) and guard against missing network config to avoid runtime errors if MultiversXNetworks isn’t registered.

-  if (ed25519mvx.length == 0)
+  if (ed25519mvx.length === 0 && MultiversXNetworks?.multiversx)
     await keyring.saveNewAccount({
       basePath: MultiversXNetworks.multiversx.basePath,
       name: 'MultiversX Account 1',
       signerType: MultiversXNetworks.multiversx.signer[0],
       walletType: WalletType.mnemonic,
     });
packages/extension/src/ui/action/views/network-activity/components/network-activity-transaction.vue (3)

203-211: Fix token symbol in Unknown-network fallback.

Currently uses fromTokenSymbol for both sides; should use toTokenSymbol on the right.

-    return (
-      `Swap from` +
-      ` ${fromTokenSymbol}` +
-      ` to ${fromTokenSymbol}` +
-      ` (Unknown)`
-    );
+    return (
+      `Swap from` +
+      ` ${fromTokenSymbol}` +
+      ` to ${toTokenSymbol}` +
+      ` (Unknown)`
+    );

12-21: Add alt text for identicon image (a11y).

-        <img
+        <img
           :src="
             network.identicon(
               network.displayAddress(
                 activity.isIncoming ? activity.from : activity.to,
               ),
             )
           "
           @error="imageLoadError"
+          alt="Address identicon"
         />

84-87: Add alt text for token logo (a11y).

-        <img
+        <img
           :src="(activity.rawInfo as SwapRawInfo).toToken.logoURI"
           @error="imageLoadError"
+          alt="Token logo"
         />
packages/signers/multiversx/tsconfig.json (2)

17-23: Resolve include/exclude conflict for tests.

Right now tests are both included and excluded. Exclude from build; let Vitest handle tests with its own tsconfig.

-  "include": ["src/**/*.ts", "tests/**/*.ts"],
+  "include": ["src/**/*.ts"],
   "exclude": [
     "node_modules/**/*",
     "_warmup/**/*",
-    ".vscode/**/*",
-    "tests/**/*"
+    ".vscode/**/*"
   ],

10-12: Consider modern targets for smaller/faster builds.

target: "es5" and module: "commonjs" may be overly conservative for current environments; ES2019+/ES2020 and dual ESM/CJS builds are common. Non-blocking.

packages/extension/src/providers/multiversx/libs/account-state/types.ts (1)

1-6: Add optional schemaVersion to IState for forward‑compatible storage migrations. Extend IState in packages/extension/src/providers/multiversx/libs/account-state/types.ts with schemaVersion?: number so stored records can be migrated without changing StorageKeys; ensure callers that create/set states (see setState in index.ts) supply or default the version.

packages/extension/src/providers/multiversx/types/index.ts (1)

1-6: Type‑only re‑export and lighter ‘any’ usage

Re‑export InjectedProvider as a type to avoid accidental value exports; prefer unknown[] over any[].

-import type { Provider as InjectedProvider } from '../inject';
+import type { Provider as InjectedProvider } from '../inject';
@@
-export interface ProviderMessage {
+export interface ProviderMessage {
   method: MessageMethod;
-  params: Array<any>;
+  params: unknown[];
 }
@@
-export { InjectedProvider };
+export type { InjectedProvider };

Also applies to: 8-11, 21-21

packages/extension/src/providers/multiversx/ui/mvx-sign-message.vue (1)

12-13: UX and safety nits: dynamic title, safe favicon, precise 0x stripping, and minor a11y

  • Title says “Sign message” even when used by mvx_signTransaction.
  • Load favicon defensively.
  • Strip 0x more robustly.
  • Add alt text for images.

Apply:

-      <h2>Sign message</h2>
+      <h2>{{ heading }}</h2>
@@
-        <div class="common-popup__info">
-          <img :src="Options.faviconURL" />
+        <div class="common-popup__info">
+          <img :src="safeFavicon(Options.faviconURL)" alt="Site favicon" />
           <div class="common-popup__info-info">
             <h4>{{ Options.domain }}</h4>
           </div>
         </div>
@@
-          {{ message }}
+          {{ message }}

Script updates:

-import { onBeforeMount, ref } from 'vue';
+import { onBeforeMount, ref } from 'vue';
@@
-const message = ref('');
+const message = ref('');
+const heading = ref('Sign message');
@@
   Options.value = options;
   message.value = getRTLOLTLOSafeString(Request.value.params![0].data);
   account.value = Request.value.params![1] as EnkryptAccount;
   network.value = (await getNetworkByName(
     Request.value.params![0].network,
   )) as MultiversXNetwork;
+  heading.value =
+    Request.value.method === 'mvx_signTransaction'
+      ? 'Sign transaction'
+      : 'Sign message';
@@
-  TransactionSigner({
+  TransactionSigner({
     account,
     network: network.value,
     payload: bufferToHex(blake2AsU8a(msg.data)),
   })
     .then(res => {
       Resolve.value({
-        result: res.result?.replace('0x', '') as string,
+        result: strip0x(res.result as string),
       });
     })

Add helpers and alt text:

-          <img :src="network.identicon(account.address)" />
+          <img :src="network.identicon(account.address)" alt="Account identicon" />
@@
-        <img :src="network.icon" />
+        <img :src="network.icon" alt="Network icon" />
@@
 const account = ref({ address: '' } as EnkryptAccount);
+const strip0x = (hex?: string) =>
+  (hex && hex.startsWith('0x') ? hex.slice(2) : hex) || '';
+const safeFavicon = (url: string) =>
+  /^(https?:|data:)/i.test(url) ? url : '';

Also applies to: 26-35, 49-69, 92-113

packages/extension/src/providers/multiversx/networks/multiversx.ts (1)

11-30: Network metadata verified — SLIP-0044 coin_type 508 & CoinGecko ID "elrond-erd-2" confirmed (verified Sep 17, 2025)

Both values are correct; no changes required. Optional: change currencyNameLong to "MultiversX eGold" for clarity.

packages/extension/src/libs/background/index.ts (1)

86-89: Await event deletion and consider cleaning provider map.

  • Not awaiting deleteEvents can race with subsequent logic.
  • Optional: also delete this.#tabProviders[_provider][_tabid] to avoid leaks.
-        this.#persistentEvents.deleteEvents(_tabid);
+        await this.#persistentEvents.deleteEvents(_tabid);
+        // Optional: cleanup provider instance for the tab
+        if (this.#tabProviders[_provider]) {
+          delete this.#tabProviders[_provider][_tabid];
+        }
packages/extension/src/providers/multiversx/ui/send-transaction/components/send-fee-select.vue (4)

2-2: Accessibility: avoid clickable-looking bare anchor without semantics.

Use a button (or div with role="button") only if interactive; otherwise use a div.

-  <a class="send-fee-select" :class="{ swap: inSwap }">
+  <div class="send-fee-select" :class="{ swap: inSwap }">
...
-  </a>
+  </div>

21-21: Type coupling to EVM GasFeeInfo.

Importing Ethereum UI types from MVX UI creates cross‑provider coupling. Extract a shared GasFeeInfo (or MVX-specific) type under a common types module.


14-15: Guard missing nativeSymbol to avoid rendering “undefined”.

-        <span>{{ fee.nativeSymbol }}</span>
+        <span v-if="fee.nativeSymbol">{{ fee.nativeSymbol }}</span>

47-50: Duplicate CSS declaration.

box-sizing is set twice.

   margin: 0 32px 8px 32px;
-  box-sizing: border-box;
   border: 1px solid @gray02;
   box-sizing: border-box;
packages/extension/src/ui/action/views/send-transaction/index.vue (1)

35-35: Type the layout ref for clarity.

-const layout = shallowRef();
+const layout = shallowRef<any>(null);
packages/extension/src/providers/multiversx/ui/send-transaction/components/send-token-select.vue (4)

36-41: Guard decimals; avoid non‑null assertion.

-const balance = computed(() =>
-  props.token && props.token.balance
-    ? fromBase(props.token.balance, props.token.decimals!)
-    : undefined,
-);
+const balance = computed(() => {
+  const t = props.token;
+  if (!t || !t.balance || typeof t.decimals !== 'number') return undefined;
+  return fromBase(t.balance, t.decimals);
+});

30-36: Prefer a required prop over defensive non‑nulls.

-interface IProps {
-  token?: BaseToken | Partial<BaseToken>;
-}
+interface IProps {
+  token: BaseToken | Partial<BaseToken>;
+}

Ensure all call sites pass token.


2-2: Accessibility: use a button for interactive element.

-  <a class="send-token-select" @click="emit('update:toggleTokenSelect')">
+  <button type="button" class="send-token-select" @click="emit('update:toggleTokenSelect')">
...
-  </a>
+  </button>

50-53: Duplicate CSS declaration.

   margin: 0 32px 8px 32px;
-  box-sizing: border-box;
   border: 1px solid @gray02;
   box-sizing: border-box;
packages/extension/src/providers/multiversx/ui/send-transaction/components/send-fee-display.vue (6)

8-13: Don’t hide zero-valued fees; guard against undefined instead.

v-if="fee.nativeValue" treats 0 as falsy and shows "~". Check for null/undefined to allow 0.

Apply:

-      <p v-if="fee.nativeValue" class="send-fee-select__value-crypto">
+      <p v-if="fee.nativeValue !== undefined && fee.nativeValue !== null" class="send-fee-select__value-crypto">
         {{ $filters.formatFloatingPointValue(fee.nativeValue).value }}
-        <span>{{ fee.nativeSymbol }}</span>
+        <span v-if="fee.nativeSymbol">{{ fee.nativeSymbol }}</span>
       </p>
-      <p v-else class="send-fee-select__value-crypto">~</p>
+      <p v-else class="send-fee-select__value-crypto">~</p>

18-24: Avoid coupling MVX UI to Ethereum types.

Importing GasFeeInfo from an EVM path creates cross-provider coupling. Define a provider-agnostic fee type in a shared module and import it here.


28-33: Simplify Boolean prop default.

Use a literal default to reduce noise.

  inSwap: {
    type: Boolean,
-   default: () => {
-     return false;
-   },
+   default: false,
  },

44-47: Remove duplicate CSS declaration.

box-sizing: border-box; is declared twice.

-  box-sizing: border-box;
-  border: 1px solid @gray02;
-  box-sizing: border-box;
+  box-sizing: border-box;
+  border: 1px solid @gray02;

54-56: Cursor suggests clickability when there’s no action.

Drop cursor: pointer unless this element is interactive or opens a selector.

-  cursor: pointer;

93-123: Unused BEM blocks.

&__arrow and &__time aren’t rendered by the template; remove or implement.

packages/signers/multiversx/src/index.ts (2)

28-35: Be liberal in hex input handling (0x prefix).

If callers pass 0x-prefixed hex, hexToBuffer may or may not accept it. Normalize inputs to avoid intermittent failures.

-    const verifier = new UserPublicKey(hexToBuffer(publicKey));
-    return verifier.verify(hexToBuffer(msgHash), hexToBuffer(sig));
+    const toBuf = (h: string) => hexToBuffer(h.startsWith('0x') ? h.slice(2) : h);
+    const verifier = new UserPublicKey(toBuf(publicKey));
+    return verifier.verify(toBuf(msgHash), toBuf(sig));

16-19: Derivation index parsing: handle non-numeric tails robustly.

Current parsing coerces to 0 on malformed paths. Prefer explicit extraction and validation.

-    const dPathSegments = `${derivationPath}`.split("/");
-    const index = Number(dPathSegments.slice(-1)[0].replace("'", "")) || 0;
+    const last = `${derivationPath}`.split('/').filter(Boolean).slice(-1)[0] ?? '0';
+    const indexStr = last.replace(/'$/, '');
+    const index = Number.isFinite(Number(indexStr)) ? Number(indexStr) : 0;
packages/extension/src/ui/action/App.vue (1)

435-444: Persist MVX per‑domain approved address on account switch.

EVM/BTC/SOL are handled; MVX is omitted. Add MVX AccountState to keep UX consistent.

 import BTCAccountState from '@/providers/bitcoin/libs/accounts-state';
 import EVMAccountState from '@/providers/ethereum/libs/accounts-state';
+import MVXAccountState from '@/providers/multiversx/libs/accounts-state';
 import { MessageMethod } from '@/providers/ethereum/types';
@@
   const accountStates = {
     [ProviderName.ethereum]: EVMAccountState,
     [ProviderName.bitcoin]: BTCAccountState,
     [ProviderName.solana]: SolAccountState,
+    [ProviderName.multiversx]: MVXAccountState,
   };
packages/extension/src/ui/action/views/network-activity/index.vue (1)

112-121: Instantiate Swap only on EVM networks.

Casting non‑EVM APIs to EvmAPI risks undefined web3. Guard by provider before creating Swap.

-apiPromise.then(api => {
-  swap = new Swap({
-    api: (api as EvmAPI).web3 as Web3Eth,
-    network: props.network.name as unknown as SupportedNetworkName,
-    walletIdentifier: WalletIdentifier.enkrypt,
-    evmOptions: {
-      infiniteApproval: true,
-    },
-  });
-});
+apiPromise.then(api => {
+  if (props.network.provider === ProviderName.ethereum) {
+    swap = new Swap({
+      api: (api as EvmAPI).web3 as Web3Eth,
+      network: props.network.name as unknown as SupportedNetworkName,
+      walletIdentifier: WalletIdentifier.enkrypt,
+      evmOptions: { infiniteApproval: true },
+    });
+  }
+});
packages/extension/src/providers/multiversx/ui/mvx-accounts.vue (1)

39-43: Copy tweak.

Grammar: “reveal all your public addresses, wallet balances, and activity…”

-          This will reveal your all your public addresses, wallet balance and
+          This will reveal all your public addresses, wallet balances, and
packages/extension/src/providers/multiversx/ui/send-transaction/components/send-token-item.vue (4)

19-22: Guard the price row when price is unknown.

Avoid calling currency formatter on undefined.

-  <p>@{{ $filters.parseCurrency(tokenPrice) }}</p>
+  <p v-if="tokenPrice != null">@{{ $filters.parseCurrency(tokenPrice) }}</p>

2-2: Use button semantics for clickable row (a11y).

<a> without href is not ideal. Prefer <button type="button"> or add role/keyboard handlers.

-<a class="send-token-item" @click="select">
+<button type="button" class="send-token-item" @click="select">
 ...
-</a>
+</button>

Also applies to: 60-71


4-4: Add alt text and defer image loading.

-      <img :src="token.icon" />
+      <img :src="token.icon" :alt="token.symbol || token.name || 'token'" loading="lazy" />

32-37: Drop unused props.

activeAccount and api are unused; remove to keep the API tight.

packages/extension/src/providers/multiversx/libs/api.ts (2)

33-36: Normalize nonce to BigInt.

SDKs sometimes return number. Coerce to BigInt to keep the API stable.

-  async getAccountNonce(address: Address): Promise<bigint> {
-    const account = await this.networkProvider.getAccount(address);
-    return account.nonce;
-  }
+  async getAccountNonce(address: Address): Promise<bigint> {
+    const account = await this.networkProvider.getAccount(address);
+    const n: any = account.nonce as any;
+    return typeof n === 'bigint' ? n : BigInt(n);
+  }

71-73: Clarify unsupported method.

Throw a more specific error or implement if needed.

-  async broadcastTx(_rawtx: string): Promise<boolean> {
-    throw new Error('Method not implemented.');
-  }
+  async broadcastTx(_rawtx: string): Promise<boolean> {
+    throw new Error('broadcastTx is not supported for MultiversX API wrapper.');
+  }
packages/extension/src/providers/multiversx/libs/account-state/index.ts (2)

38-41: Deduplicate: reuse isApproved in isConnected.

-  async isConnected(domain: string): Promise<boolean> {
-    return this.getStateByDomain(domain).then(res => res.isApproved);
-  }
+  async isConnected(domain: string): Promise<boolean> {
+    return this.isApproved(domain);
+  }

13-24: Normalize domains before storing/reading.

Persisting raw domains risks duplicates (https://, www., case). Normalize (lowercase host only) at boundaries to avoid orphaned states.

Would you like a small helper (e.g., private normalizeDomain) wired into all methods?

Also applies to: 30-36, 46-50, 52-59, 61-67

packages/extension/src/providers/multiversx/ui/send-transaction/index.vue (1)

195-197: Drop console logging in production path.

Remove console.log/error or gate behind a debug flag.

packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts (5)

31-33: Fix typo “enpoint” → “endpoint”.

Minor naming nit, but it reduces confusion and improves grep-ability.

-  const enpoint = NetworkEndpoint[networkName];
+  const endpoint = NetworkEndpoint[networkName];
-  const activities = await getAddressActivity(address, enpoint, ttl);
+  const activities = await getAddressActivity(address, endpoint, ttl);
-            tokenDetails = await getFungibleTokenDetails(
-              enpoint,
+            tokenDetails = await getFungibleTokenDetails(
+              endpoint,
               tokenIdentifier,
               ttl,
             );
-            tokenDetails = await getNFTTokenDetails(
-              enpoint,
+            tokenDetails = await getNFTTokenDetails(
+              endpoint,
               tokenIdentifier,
               ttl,
             );
-  const enpoint = NetworkEndpoint[networkName];
+  const endpoint = NetworkEndpoint[networkName];
-  const nfts = await getAddressNfts(address, enpoint, ttl);
+  const nfts = await getAddressNfts(address, endpoint, ttl);

Also applies to: 81-85, 90-94, 205-207, 208-209


86-100: Harden token detail fallbacks to avoid undefined fields.

Ensure icon, price, name, symbol, and decimals always resolve to sane defaults.

-            icon = tokenDetails.assets?.pngUrl;
-            price = tokenDetails.price?.toString();
+            icon = tokenDetails?.assets?.pngUrl ?? '';
+            price =
+              tokenDetails?.price != null
+                ? String(tokenDetails.price)
+                : '0';
@@
-            icon = tokenDetails.media?.[0]?.thumbnailUrl || '';
+            icon = tokenDetails?.media?.[0]?.thumbnailUrl ?? '';
@@
-          const name = tokenDetails.name;
-          const symbol = tokenDetails.identifier;
+          const name = tokenDetails?.name ?? tokenIdentifier;
+          const symbol = tokenDetails?.identifier ?? tokenIdentifier;
@@
-              decimals: tokenDetails.decimals || 0,
+              decimals: Number(tokenDetails?.decimals ?? 0),

Also applies to: 115-120


101-106: Normalize address comparison for isIncoming.

Bech32 case/format differences can cause false positives. Compare normalized display forms.

-            isIncoming: metadata.sender !== address,
+            isIncoming:
+              network.displayAddress(metadata.sender) !==
+              network.displayAddress(address),
@@
-          isIncoming: metadata.sender !== address,
+          isIncoming:
+            network.displayAddress(metadata.sender) !==
+            network.displayAddress(address),

Also applies to: 125-130


152-166: Incorrect return typing and inconsistent fallbacks in detail fetchers.

These helpers return single objects (or arrays on error), but are typed as Promise<any[]>. Align types and return an object fallback to simplify call-sites.

-const getFungibleTokenDetails = async (
+const getFungibleTokenDetails = async (
   endpoint: string,
   token: string,
   ttl: number,
-): Promise<any[]> => {
+): Promise<any> => {
   const url = `${endpoint}/tokens/${token}`;
   return cacheFetch({ url }, ttl)
     .then(res => {
-      return res ? res : [];
+      return res ?? {};
     })
     .catch(error => {
       console.error('Failed to fetch fungible tokens:', error);
-      return [];
+      return {};
     });
 };
 
-const getNFTTokenDetails = async (
+const getNFTTokenDetails = async (
   endpoint: string,
   token: string,
   ttl: number,
-): Promise<any[]> => {
+): Promise<any> => {
   const url = `${endpoint}/nfts/${token}`;
   return cacheFetch({ url }, ttl)
     .then(res => {
-      return res ? res : [];
+      return res ?? {};
     })
     .catch(error => {
       console.error('Failed to fetch NFT:', error);
-      return [];
+      return {};
     });
 };

Also applies to: 168-182


189-190: Fetching 10,000 NFTs in one call may be slow and memory-heavy.

Consider pagination with backoff and a hard upper bound.

packages/extension/src/providers/multiversx/index.ts (1)

21-24: Superfluous listeners override.

Casting super.listeners return type is not needed for runtime and adds noise. Consider removing unless TS forces it.

packages/extension/src/providers/multiversx/ui/send-transaction/components/send-address-input.vue (5)

91-94: Emit toggle:showContacts(false) on blur as well.

Current logic only emits on focus; consumers can’t hide contacts on blur.

 const changeFocus = (val: FocusEvent) => {
   isFocus.value = val.type === 'focus';
-  if (isFocus.value) emit('toggle:showContacts', isFocus.value);
+  emit('toggle:showContacts', isFocus.value);
 };

49-51: Make network required; defaulting to {} risks runtime errors.

network.displayAddress/identicon are called; an empty object will throw if try/catch doesn’t catch all paths.

  network: {
     type: Object as PropType<BaseNetwork>,
-    default: () => ({}),
+    required: true,
   },

19-21: Avoid inline color styling; use a class with theme tokens.

Hard-coded red/black makes theming/a11y harder. Prefer a class toggle.

-        :style="{ color: !isAddress ? 'red' : 'black' }"
+        :class="{ invalid: !isAddress }"

Add style:

 .send-address-input {
@@
   &__address {
@@
     input {
@@
     }
+
+    input.invalid {
+      color: @error;
+    }

Also applies to: 148-165


103-107: Duplicate CSS declaration.

box-sizing: border-box; is declared twice; remove the duplicate.


14-22: Optional: add input UX hints for addresses.

Disable autocorrect/capitalization and spellcheck for address fields.

       <input
         ref="addressInput"
         v-model="address"
         type="text"
         :disabled="disableDirectInput"
         placeholder="address"
+        autocapitalize="off"
+        autocomplete="off"
+        autocorrect="off"
+        spellcheck="false"
         @focus="changeFocus"
         @blur="changeFocus"
       />
packages/extension/src/providers/multiversx/types/mvx-network.ts (1)

241-257: Prefer using the initialized API wrapper for data fetching (consistency & pooling).

You’re mixing API (with .api() above) and raw ApiNetworkProvider here. Consider routing these calls through the initialized API instance to reuse connections, headers, and future cross-cutting concerns (logging, retries).

Example (outline):

const api = (await this.api()) as API;
return api.networkProvider.doGetGeneric(`accounts/${addr}/tokens?from=0&size=...`);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a648bc and e9558d9.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (65)
  • README.md (1 hunks)
  • packages/extension/package.json (1 hunks)
  • packages/extension/src/libs/background/index.ts (2 hunks)
  • packages/extension/src/libs/utils/initialize-wallet.ts (3 hunks)
  • packages/extension/src/libs/utils/networks.ts (4 hunks)
  • packages/extension/src/providers/index.ts (2 hunks)
  • packages/extension/src/providers/multiversx/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/inject.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/account-state/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/account-state/types.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/activity-handlers/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/configs.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/api.ts (1 hunks)
  • packages/extension/src/providers/multiversx/libs/message-handler.ts (1 hunks)
  • packages/extension/src/providers/multiversx/methods/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/methods/mvx_signTransaction.ts (1 hunks)
  • packages/extension/src/providers/multiversx/networks/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/networks/multiversx.ts (1 hunks)
  • packages/extension/src/providers/multiversx/types/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/types/mvx-network.ts (1 hunks)
  • packages/extension/src/providers/multiversx/types/mvx-token.ts (1 hunks)
  • packages/extension/src/providers/multiversx/ui/libs/signer.ts (1 hunks)
  • packages/extension/src/providers/multiversx/ui/mvx-accounts.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/mvx-sign-message.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/routes/index.ts (1 hunks)
  • packages/extension/src/providers/multiversx/ui/routes/names.ts (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/components/send-address-input.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/components/send-alert.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/components/send-fee-display.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/components/send-fee-select.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/components/send-token-item.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/components/send-token-select.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/index.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/send-transaction/verify-transaction/index.vue (1 hunks)
  • packages/extension/src/providers/multiversx/ui/types/index.ts (1 hunks)
  • packages/extension/src/scripts/inject.ts (2 hunks)
  • packages/extension/src/types/activity.ts (3 hunks)
  • packages/extension/src/types/base-network.ts (3 hunks)
  • packages/extension/src/types/base-token.ts (2 hunks)
  • packages/extension/src/types/nft.ts (1 hunks)
  • packages/extension/src/types/provider.ts (6 hunks)
  • packages/extension/src/ui/action/App.vue (2 hunks)
  • packages/extension/src/ui/action/views/network-activity/components/network-activity-transaction.vue (2 hunks)
  • packages/extension/src/ui/action/views/network-activity/index.vue (3 hunks)
  • packages/extension/src/ui/action/views/send-transaction/index.vue (2 hunks)
  • packages/extension/src/ui/action/views/verify-transaction/index.vue (1 hunks)
  • packages/extension/tsconfig.json (1 hunks)
  • packages/keyring/package.json (1 hunks)
  • packages/keyring/src/index.ts (2 hunks)
  • packages/request/src/index.ts (1 hunks)
  • packages/signers/multiversx/.editorconfig (1 hunks)
  • packages/signers/multiversx/.eslintignore (1 hunks)
  • packages/signers/multiversx/.eslintrc.json (1 hunks)
  • packages/signers/multiversx/.gitignore (1 hunks)
  • packages/signers/multiversx/.nvmrc (1 hunks)
  • packages/signers/multiversx/package.json (1 hunks)
  • packages/signers/multiversx/src/index.ts (1 hunks)
  • packages/signers/multiversx/tests/generate.test.ts (1 hunks)
  • packages/signers/multiversx/tests/sign.test.ts (1 hunks)
  • packages/signers/multiversx/tsconfig.json (1 hunks)
  • packages/signers/multiversx/tsconfig.paths.json (1 hunks)
  • packages/signers/multiversx/vitest.config.mts (1 hunks)
  • packages/types/src/index.ts (2 hunks)
  • packages/types/src/networks.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (21)
packages/extension/src/providers/multiversx/ui/types/index.ts (1)
packages/types/src/index.ts (1)
  • EnkryptAccount (190-190)
packages/extension/src/providers/multiversx/networks/multiversx.ts (2)
packages/extension/src/providers/multiversx/types/mvx-network.ts (3)
  • MultiversXNetworkOptions (18-47)
  • isValidAddress (49-56)
  • MultiversXNetwork (62-262)
packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts (2)
  • multiversxScanActivity (26-150)
  • nftHandler (200-243)
packages/extension/src/providers/multiversx/methods/mvx_signTransaction.ts (2)
packages/extension/src/types/provider.ts (1)
  • ProviderRPCRequest (193-195)
packages/extension/src/libs/error/index.ts (1)
  • getCustomError (27-33)
packages/signers/multiversx/tests/sign.test.ts (1)
packages/signers/multiversx/src/index.ts (1)
  • MultiversXSigner (9-43)
packages/signers/multiversx/tests/generate.test.ts (1)
packages/signers/multiversx/src/index.ts (1)
  • MultiversXSigner (9-43)
packages/extension/src/providers/multiversx/ui/libs/signer.ts (2)
packages/extension/src/providers/multiversx/ui/types/index.ts (1)
  • SignerTransactionOptions (29-33)
packages/extension/src/libs/error/index.ts (1)
  • getCustomError (27-33)
packages/extension/src/providers/multiversx/libs/message-handler.ts (2)
packages/extension/src/types/provider.ts (1)
  • handleIncomingMessage (161-164)
packages/extension/src/providers/multiversx/types/index.ts (1)
  • ProviderMessage (8-11)
packages/extension/src/providers/multiversx/index.ts (4)
packages/extension/src/types/provider.ts (1)
  • ProviderRPCRequest (193-195)
packages/extension/src/providers/multiversx/types/mvx-network.ts (1)
  • MultiversXNetwork (62-262)
packages/types/src/index.ts (2)
  • MiddlewareFunction (198-198)
  • OnMessageResponse (200-200)
packages/extension/src/providers/multiversx/inject.ts (1)
  • request (32-38)
packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts (4)
packages/extension/src/providers/multiversx/libs/activity-handlers/index.ts (2)
  • multiversxScanActivity (3-3)
  • nftHandler (3-3)
packages/extension/src/types/activity.ts (3)
  • Activity (153-153)
  • ActivityStatus (154-154)
  • ActivityType (155-155)
packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/configs.ts (2)
  • NetworkEndpoint (11-11)
  • NetworkTtl (11-11)
packages/extension/src/types/nft.ts (2)
  • NFTCollection (18-24)
  • NFTItem (10-17)
packages/signers/multiversx/src/index.ts (2)
packages/types/src/index.ts (3)
  • SignerInterface (204-204)
  • MnemonicWithExtraWord (199-199)
  • KeyPair (194-194)
packages/utils/src/index.ts (2)
  • hexToBuffer (39-39)
  • bufferToHex (38-38)
packages/extension/src/providers/multiversx/libs/account-state/index.ts (1)
packages/extension/src/providers/multiversx/libs/account-state/types.ts (1)
  • IState (4-6)
packages/extension/src/providers/multiversx/types/mvx-token.ts (3)
packages/extension/src/types/base-token.ts (1)
  • BaseTokenOptions (15-24)
packages/extension/src/providers/multiversx/libs/api.ts (1)
  • api (19-21)
packages/extension/src/providers/multiversx/types/mvx-network.ts (1)
  • MultiversXNetwork (62-262)
packages/extension/src/libs/utils/initialize-wallet.ts (2)
packages/extension/src/libs/utils/accounts.ts (1)
  • getAccountsByNetworkName (14-44)
packages/extension/src/providers/multiversx/types/index.ts (1)
  • MultiversXNetworks (4-6)
packages/extension/src/types/base-token.ts (1)
packages/extension/src/providers/multiversx/libs/api.ts (1)
  • api (19-21)
packages/extension/src/providers/index.ts (1)
packages/extension/src/types/provider.ts (1)
  • MultiversXProvider (174-174)
packages/extension/src/scripts/inject.ts (1)
packages/extension/src/libs/messenger/window.ts (1)
  • providerSendMessage (27-38)
packages/extension/src/providers/multiversx/types/mvx-network.ts (7)
packages/extension/src/types/nft.ts (1)
  • NFTCollection (18-24)
packages/extension/src/types/provider.ts (1)
  • AssetsType (223-238)
packages/extension/src/providers/multiversx/libs/api.ts (1)
  • api (19-21)
packages/extension/src/types/base-network.ts (1)
  • BaseNetworkOptions (18-47)
packages/extension/src/providers/multiversx/types/mvx-token.ts (2)
  • MVXToken (23-123)
  • MvxTokenOptions (19-21)
packages/extension/src/libs/sparkline/index.ts (1)
  • Sparkline (5-25)
packages/extension/src/libs/market-data/types.ts (1)
  • CoinGeckoTokenMarket (23-37)
packages/extension/src/providers/multiversx/inject.ts (6)
packages/extension/src/types/provider.ts (4)
  • Provider (178-184)
  • SendMessageHandler (81-84)
  • ProviderOptions (86-90)
  • handleIncomingMessage (161-164)
packages/extension/src/libs/background/types.ts (1)
  • ProviderType (19-27)
packages/extension/src/providers/multiversx/types/index.ts (1)
  • MultiversXNetworks (4-6)
packages/extension/src/providers/multiversx/index.ts (1)
  • request (59-68)
packages/extension/src/providers/ethereum/types/index.ts (2)
  • EthereumRequest (49-52)
  • EthereumResponse (28-31)
packages/extension/src/types/globals.ts (1)
  • EnkryptWindow (3-12)
packages/keyring/src/index.ts (1)
packages/signers/multiversx/src/index.ts (1)
  • MultiversXSigner (9-43)
packages/extension/src/types/provider.ts (2)
packages/extension/src/types/activity.ts (1)
  • MultiversXRawInfo (161-161)
packages/extension/src/providers/multiversx/inject.ts (1)
  • Provider (15-47)
packages/extension/src/libs/utils/networks.ts (1)
packages/extension/src/providers/multiversx/types/index.ts (1)
  • MultiversXNetworks (4-6)
🪛 Biome (2.1.2)
packages/extension/src/providers/multiversx/methods/mvx_signTransaction.ts

[error] 12-12: The function should not return a value because its return type is void.

The function is here:

'void' signals the absence of value. The returned value is likely to be ignored by the caller.

(lint/correctness/noVoidTypeReturn)


[error] 15-15: The function should not return a value because its return type is void.

The function is here:

'void' signals the absence of value. The returned value is likely to be ignored by the caller.

(lint/correctness/noVoidTypeReturn)

Comment on lines +42 to +43
this.requestProvider = getRequestProvider('', this.middlewares);
this.requestProvider.on('notification', (notif: any) => {
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Initialize RequestProvider with the active network node.

Creating it with an empty string may route requests incorrectly until a later network change. Initialize with network.node up front.

-    this.requestProvider = getRequestProvider('', this.middlewares);
+    this.requestProvider = getRequestProvider(network.node, this.middlewares);
🤖 Prompt for AI Agents
In packages/extension/src/providers/multiversx/index.ts around lines 42-43, the
RequestProvider is being initialized with an empty string which can route
requests incorrectly; replace the empty string with the active network node
(e.g., network.node or this.network.node as appropriate in scope) when calling
getRequestProvider, ensuring the provider is created with the current node
upfront and keeping any existing logic that reinitializes the provider on
network changes.

import { BaseNetwork } from '@/types/base-network';
import { NFTCollection, NFTItem, NFTType } from '@/types/nft';
import { TokenComputer, TransactionStatus } from '@multiversx/sdk-core';
import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder/lib/src/transaction.decoder';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid deep import for TransactionDecoder (use public entry).

Deep-importing internal paths is brittle and can break with minor package updates. Import from the package root instead.

-import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder/lib/src/transaction.decoder';
+import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder/lib/src/transaction.decoder';
import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder';
🤖 Prompt for AI Agents
In
packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts
around line 7, the file is deep-importing TransactionDecoder from an internal
path which is brittle; change the import to use the package's public entry (e.g.
import { TransactionDecoder } from '@multiversx/sdk-transaction-decoder') and
remove the internal path, then run typecheck/build to ensure the symbol is
exported from the package root and update any references if the exported name or
location differs.

Comment on lines 229 to 240
// Create NFTCollection objects
const nftCollections: NFTCollection[] = Object.entries(collectionsMap).map(
([collectionId, items]) => ({
name: collectionId,
id: collectionId,
items,
type: NFTType.MultiversXNFT,
image: items[0]?.image ?? '',
description: '',
contract: '',
}),
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Returned NFTCollection shape doesn’t match declared interface.

NFTCollection (per types/nft.ts) doesn’t include id or type, and description is null | string. This will cause TS/type drift and downstream assumptions to break.

-  const nftCollections: NFTCollection[] = Object.entries(collectionsMap).map(
-    ([collectionId, items]) => ({
-      name: collectionId,
-      id: collectionId,
-      items,
-      type: NFTType.MultiversXNFT,
-      image: items[0]?.image ?? '',
-      description: '',
-      contract: '',
-    }),
-  );
+  const nftCollections: NFTCollection[] = Object.entries(collectionsMap).map(
+    ([collectionId, items]) => ({
+      name: collectionId,
+      image: items[0]?.image ?? '',
+      description: null,
+      items,
+      contract: '',
+    }),
+  );

If you do need id/type, extend the shared type definition accordingly and update all consumers.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Create NFTCollection objects
const nftCollections: NFTCollection[] = Object.entries(collectionsMap).map(
([collectionId, items]) => ({
name: collectionId,
id: collectionId,
items,
type: NFTType.MultiversXNFT,
image: items[0]?.image ?? '',
description: '',
contract: '',
}),
);
// Create NFTCollection objects
const nftCollections: NFTCollection[] = Object.entries(collectionsMap).map(
([collectionId, items]) => ({
name: collectionId,
image: items[0]?.image ?? '',
description: null,
items,
contract: '',
}),
);
🤖 Prompt for AI Agents
In
packages/extension/src/providers/multiversx/libs/activity-handlers/multiversx/index.ts
around lines 229 to 240, the created NFTCollection objects include fields (id,
type) and set description to '' which do not match the declared NFTCollection
interface (which lacks id/type and expects description: null | string). Either
(A) produce objects that conform to the current interface by removing id and
type and set description to null when empty, or (B) if id/type are required,
update the shared types/nft.ts NFTCollection definition (and all consumers) to
add id: string and type: NFTType and adjust description to string | null; then
rebuild/fix consumers to handle the new fields.

Comment on lines +14 to +23
"@typescript-eslint/no-var-requires": "off",
"no-multi-assign": "off",
"no-param-reassign": "off",
"no-underscore-dangle": "off",
"no-continue": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-console": "off",
"no-plusplus": "off",
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": "off",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Re-enable dependency validation; current setting hides real build/runtime breakages.

Turning off import/no-extraneous-dependencies can let missing deps slip through (especially with new signer code). Enable it but allow common dev/test paths.

-    "import/no-extraneous-dependencies": "off",
+    "import/no-extraneous-dependencies": [
+      "error",
+      {
+        "devDependencies": [
+          "**/tests/**",
+          "**/*.test.ts",
+          "**/*.spec.ts",
+          "**/scripts/**"
+        ]
+      }
+    ],

Additionally, avoid blanket disables for TS comments; require context:

-    "@typescript-eslint/ban-ts-comment": "off",
+    "@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],

And prefer type‑only imports for cleaner emits:

+    "@typescript-eslint/consistent-type-imports": ["error", { "fixStyle": "separate-type-imports" }],

Also applies to: 41-41

🤖 Prompt for AI Agents
In packages/signers/multiversx/.eslintrc.json around lines 14-23 (and also
adjust line 41), re-enable the import/no-extraneous-dependencies rule instead of
"off" and configure it to allow common dev/test paths (e.g., {
"devDependencies": ["**/test/**", "**/*.spec.*", "**/scripts/**"] } or
equivalent), change "@typescript-eslint/ban-ts-comment" from "off" to a stricter
setting (e.g., "warn" or "error") so TS comments require justification, and
restore rules that enforce cleaner imports by preferring type-only imports
(enable relevant rules like @typescript-eslint/consistent-type-imports or
similar) rather than blanket disables; make these targeted rule adjustments so
development/test tooling is permitted but production dependency validation and
type-import practices remain enforced.

Comment on lines +34 to +40
"import/no-unresolved": [
2,
{
"commonjs": true,
"amd": true
}
],
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Add TypeScript resolver to stop false positives from path aliases and TS files.

The alias resolver is fine, but import/no-unresolved can still misfire without the TS resolver wired to tsconfig.

   "settings": {
     "import/resolver": {
+      "typescript": {
+        "project": "./tsconfig.json"
+      },
       "alias": {
         "map": [
           ["@src", "./src"],
           ["@tests", "./tests"]
         ],
         "extensions": [".ts", ".js"]
       }
     }
   }

Please verify devDeps include eslint-import-resolver-typescript and eslint-import-resolver-alias.

Also applies to: 58-66


🏁 Script executed:

#!/bin/bash
# Verify resolver packages and tsconfig presence
fd -a package.json packages/signers/multiversx | while read -r p; do
  echo "Checking $p"
  jq -r '.devDependencies, .dependencies' "$p" | grep -E 'eslint-import-resolver-(typescript|alias)|eslint-plugin-import' || true
done
fd -a tsconfig.json packages/signers/multiversx

Length of output: 210


Install and configure eslint-import-resolver-typescript

tsconfig.json and eslint-import-resolver-alias exist, but eslint-import-resolver-typescript is not installed — add the TS resolver to .eslintrc.json and install the package.

Files:

  • packages/signers/multiversx/.eslintrc.json
  • packages/signers/multiversx/package.json
    Add the resolver block:
 "settings": {
   "import/resolver": {
+    "typescript": {
+      "project": "./tsconfig.json"
+    },
     "alias": {
       "map": [
         ["@src", "./src"],
         ["@tests", "./tests"]
       ],
       "extensions": [".ts", ".js"]
     }
   }
 }

Add devDependency "eslint-import-resolver-typescript" to packages/signers/multiversx/package.json (e.g., npm/yarn/pnpm install -D eslint-import-resolver-typescript).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"import/no-unresolved": [
2,
{
"commonjs": true,
"amd": true
}
],
{
"settings": {
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
},
"alias": {
"map": [
["@src", "./src"],
["@tests", "./tests"]
],
"extensions": [".ts", ".js"]
}
}
},
"rules": {
"import/no-unresolved": [
2,
{
"commonjs": true,
"amd": true
}
]
}
}
🤖 Prompt for AI Agents
In packages/signers/multiversx/.eslintrc.json around lines 34 to 40, the config
enables import/no-unresolved but the TypeScript import resolver package is not
added; add an "import/resolver" block that includes "typescript": {} to
.eslintrc.json so ESLint can resolve TS paths, and add the devDependency
"eslint-import-resolver-typescript" to packages/signers/multiversx/package.json
(then run your package manager to install it, e.g., npm/yarn/pnpm install -D
eslint-import-resolver-typescript).

@@ -0,0 +1 @@
lts/fermium No newline at end of file
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Use a supported Node LTS; “lts/fermium” (Node 14) is EOL and will cause build/tooling issues.

Align with the repo’s root Node version or move to a currently supported LTS (e.g., lts/iron or lts/*). Avoid per‑package drift in a monorepo.

Apply one of these diffs:

- lts/fermium
+ lts/*    # tracks the latest LTS installed via nvm

or (if your repo standardizes on Node 20 LTS):

- lts/fermium
+ lts/iron

Run to check for version drift across the repo and CI:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .nvmrc files =="
fd -H -a '.nvmrc' | xargs -I{} sh -c 'printf "-- %s: " "{}"; cat "{}"; echo'

echo -e "\n== package.json engines (node) =="
rg -nP '"engines"\s*:\s*\{[^}]*\}' -g '!**/node_modules/**' -C2 | sed -n '1,200p'
rg -nP '"node"\s*:\s*"[^"]+"' -g '!**/node_modules/**' -C2 | sed -n '1,200p'

echo -e "\n== GitHub Actions Node versions (setup-node) =="
rg -nP 'uses:\s*actions/setup-node@|node-version:\s*' -g '.github/workflows/**' -C2 | sed -n '1,200p'

Length of output: 830


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== root .nvmrc =="
if [ -f .nvmrc ]; then
  echo "path: .nvmrc"
  sed -n '1,5p' .nvmrc
else
  echo "no root .nvmrc"
fi

echo
echo "== all .nvmrc files (path: first-line) =="
# robust find for .nvmrc files
find . -type f -name ".nvmrc" -print0 2>/dev/null | while IFS= read -r -d '' f; do
  echo "$f: $(sed -n '1p' "$f" 2>/dev/null || true)"
done || true

echo
echo "== files containing 'lts/fermium' =="
grep -RIn --hidden --line-number --exclude-dir=node_modules "lts/fermium" . || echo "none"

echo
echo "== package.json engines.node =="
find . -type f -name "package.json" -print0 2>/dev/null | while IFS= read -r -d '' f; do
  python3 - <<PYTHON
import json,sys
p=sys.argv[1]
try:
    obj=json.load(open(p))
    node=obj.get("engines",{}).get("node")
    if node:
        print(f"{p}: {node}")
except Exception:
    pass
PYTHON
"$f"
done || true

echo
echo "== GitHub Actions: setup-node / node-version occurrences =="
if [ -d .github/workflows ]; then
  rg -n --hidden 'actions/setup-node' .github/workflows || true
  rg -n --hidden 'node-version' .github/workflows || true
else
  echo "no .github/workflows directory"
fi

Length of output: 4417


Align package .nvmrc files to a supported LTS (match repo root: v22.18.0)

Root .nvmrc is v22.18.0 and GitHub Actions use node-version 22.18.0; multiple package .nvmrc files still contain lts/fermium (Node 14, EOL). Update these to match the root (v22.18.0) or use lts/* to avoid per-package drift:

  • packages/hw-wallets/.nvmrc
  • packages/keyring/.nvmrc
  • packages/name-resolution/.nvmrc
  • packages/request/.nvmrc
  • packages/signers/bitcoin/.nvmrc
  • packages/signers/ethereum/.nvmrc
  • packages/signers/kadena/.nvmrc
  • packages/signers/polkadot/.nvmrc
  • packages/signers/multiversx/.nvmrc
  • packages/storage/.nvmrc
  • packages/swap/.nvmrc
  • packages/types/.nvmrc
  • packages/utils/.nvmrc
🤖 Prompt for AI Agents
In packages/signers/multiversx/.nvmrc around line 1 the file currently contains
"lts/fermium" (Node 14, EOL); update this to match the repo root Node version by
replacing the file content with "v22.18.0" (or use "lts/*" if you prefer
automatic LTS tracking) so package Node version aligns with root and CI.

Comment on lines +6 to +12
"main": "src/index.ts",
"module": "src/index.ts",
"publishConfig": {
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Main/module should point to built artifacts, not TS sources.

Pointing to src/* breaks consumers in workspaces and after publish (only dist is shipped). Align top-level fields with dist and drop publishConfig indirection.

Apply:

   "type": "module",
-  "main": "src/index.ts",
-  "module": "src/index.ts",
-  "publishConfig": {
-    "main": "dist/index.cjs",
-    "module": "dist/index.js",
-    "types": "dist/index.d.ts"
-  },
+  "main": "dist/index.cjs",
+  "module": "dist/index.js",
+  "types": "dist/index.d.ts",

Add an exports map (top-level) to improve resolution:

"exports": {
  ".": {
    "types": "./dist/index.d.ts",
    "import": "./dist/index.js",
    "require": "./dist/index.cjs"
  }
}
🤖 Prompt for AI Agents
In packages/signers/multiversx/package.json around lines 6 to 12, the
package.json currently points "main" and "module" at TypeScript sources and uses
a publishConfig indirection; change "main" to "dist/index.cjs" and "module" to
"dist/index.js", remove the publishConfig block, and add a top-level "exports"
map that exposes types as "./dist/index.d.ts", import as "./dist/index.js" and
require as "./dist/index.cjs" so consumers and published packages resolve to
built artifacts.

Comment on lines +37 to +42
async sign(msgHash: string, keyPair: KeyPair): Promise<string> {
const signer = new UserSecretKey(hexToBuffer(keyPair.privateKey));
const signature = signer.sign(hexToBuffer(msgHash));

return bufferToHex(signature);
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Signature serialization likely incorrect; use SDK’s hex accessor.

UserSecretKey.sign() returns a Signature object (not a Buffer). bufferToHex(signature) may produce wrong output. Use signature.hex().

   async sign(msgHash: string, keyPair: KeyPair): Promise<string> {
     const signer = new UserSecretKey(hexToBuffer(keyPair.privateKey));
-    const signature = signer.sign(hexToBuffer(msgHash));
-
-    return bufferToHex(signature);
+    const signature = signer.sign(hexToBuffer(msgHash));
+    return signature.hex();
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async sign(msgHash: string, keyPair: KeyPair): Promise<string> {
const signer = new UserSecretKey(hexToBuffer(keyPair.privateKey));
const signature = signer.sign(hexToBuffer(msgHash));
return bufferToHex(signature);
}
async sign(msgHash: string, keyPair: KeyPair): Promise<string> {
const signer = new UserSecretKey(hexToBuffer(keyPair.privateKey));
const signature = signer.sign(hexToBuffer(msgHash));
return signature.hex();
}
🤖 Prompt for AI Agents
In packages/signers/multiversx/src/index.ts around lines 37 to 42, the code
treats the result of UserSecretKey.sign() as a Buffer and calls
bufferToHex(signature), but sign() returns a Signature object; replace
bufferToHex(signature) with signature.hex() (or otherwise call the SDK hex
accessor) so the method returns the correct hex string representation of the
signature and keep the return type Promise<string>.

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.

2 participants