From 4ebe82b8defb3d8d81ab99db9fd384130db5cd83 Mon Sep 17 00:00:00 2001 From: Tarik Gul <47201679+TarikGul@users.noreply.github.com> Date: Wed, 17 Sep 2025 11:51:53 -0400 Subject: [PATCH] Support for Extension Ethereum Signing (#11592) * Temp changes * Rogue console.log * cleanup --------- Co-authored-by: Valentin Fernandez Co-authored-by: Arjun Porwal --- package.json | 1 + packages/react-api/src/Api.tsx | 5 +++-- packages/react-api/src/types.ts | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ddca4fa867..1910e0c394 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "source-map-explorer": "^2.5.3" }, "resolutions": { + "@zondax/ledger-substrate": "1.1.1", "@polkadot/api": "^16.4.6", "@polkadot/api-augment": "^16.4.6", "@polkadot/api-base": "^16.4.6", diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index 17bdcff05f..03a56852db 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -82,12 +82,13 @@ async function getInjectedAccounts (injectedPromise: Promise ({ + return accounts.map(({ address, meta, type }, whenCreated): InjectedAccountExt => ({ address, meta: objectSpread({}, meta, { name: `${meta.name || 'unknown'} (${meta.source === 'polkadot-js' ? 'extension' : meta.source})`, whenCreated - }) + }), + type: type || 'sr25519' })); } catch (error) { console.error('web3Accounts', error); diff --git a/packages/react-api/src/types.ts b/packages/react-api/src/types.ts index 1b89b06955..6045692973 100644 --- a/packages/react-api/src/types.ts +++ b/packages/react-api/src/types.ts @@ -7,6 +7,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; import type { InjectedExtension } from '@polkadot/extension-inject/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; // helpers for HOC props export type OmitProps = Pick>; @@ -23,6 +24,7 @@ export interface InjectedAccountExt { source: string; whenCreated: number; }; + type: KeypairType; } export interface ApiState {