Show labels of account parent (#306)
* Show derived accounts indentation * Add parent labels * Update branch * styling * CR requests * Slightly reword derive documentation * Remove derivation path from account metadata
This commit is contained in:
@@ -303,7 +303,11 @@ export default class Extension {
|
||||
}
|
||||
|
||||
private derivationCreate ({ genesisHash, name, parentAddress, parentPassword, password, suri }: RequestDeriveCreate): boolean {
|
||||
const childPair = this.derive(parentAddress, suri, parentPassword, { genesisHash, name, parentAddress });
|
||||
const childPair = this.derive(parentAddress, suri, parentPassword, {
|
||||
genesisHash,
|
||||
name,
|
||||
parentAddress
|
||||
});
|
||||
|
||||
keyring.addPair(childPair, password);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { InjectedAccount, MetadataDef, ProviderList, ProviderMeta, InjectedMetadataKnown } from '@polkadot/extension-inject/types';
|
||||
import { JsonRpcResponse } from '@polkadot/rpc-provider/types';
|
||||
import { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import { KeyringPair } from '@polkadot/keyring/types';
|
||||
import { KeyringPair, KeyringPair$Meta } from '@polkadot/keyring/types';
|
||||
import { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
@@ -23,11 +23,21 @@ type NullKeys<T> = { [K in keyof T]: IsNull<T, K> }[keyof T];
|
||||
|
||||
export type SeedLengths = 12 | 24;
|
||||
|
||||
export interface AccountJson {
|
||||
export interface AccountJson extends KeyringPair$Meta {
|
||||
address: string;
|
||||
genesisHash?: string | null;
|
||||
isExternal?: boolean;
|
||||
name?: string;
|
||||
parentAddress?: string;
|
||||
}
|
||||
|
||||
export type AccountWithChildren = AccountJson & {
|
||||
children?: AccountWithChildren[];
|
||||
}
|
||||
|
||||
export type AccountsContext = {
|
||||
accounts: AccountJson[];
|
||||
hierarchy: AccountWithChildren[];
|
||||
}
|
||||
|
||||
export interface AuthorizeRequest {
|
||||
|
||||
Reference in New Issue
Block a user