Support for Extension Ethereum Signing (#11592)
* Temp changes * Rogue console.log * cleanup --------- Co-authored-by: Valentin Fernandez <tinchofernandez8@gmail.com> Co-authored-by: Arjun Porwal <porwalarjun95@gmail.com>
This commit is contained in:
parent
3793d487ea
commit
4ebe82b8de
@ -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",
|
||||
|
||||
@ -82,12 +82,13 @@ async function getInjectedAccounts (injectedPromise: Promise<InjectedExtension[]
|
||||
|
||||
const accounts = await web3Accounts();
|
||||
|
||||
return accounts.map(({ address, meta }, whenCreated): InjectedAccountExt => ({
|
||||
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);
|
||||
|
||||
@ -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<T, K> = Pick<T, Exclude<keyof T, K>>;
|
||||
@ -23,6 +24,7 @@ export interface InjectedAccountExt {
|
||||
source: string;
|
||||
whenCreated: number;
|
||||
};
|
||||
type: KeypairType;
|
||||
}
|
||||
|
||||
export interface ApiState {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user