From 478cd03e7eab79113b7fe7a8f2ba29974d8d7536 Mon Sep 17 00:00:00 2001 From: Tarik Gul <47201679+TarikGul@users.noreply.github.com> Date: Tue, 21 May 2024 11:28:03 -0700 Subject: [PATCH] Use apiSystemPeople for identities on {relay | system} chains, and keep compat for parachains (#10598) * Use apiSystemPeople for identities on relay chains * Add apiIdentity support * add config * Fix nits * Get working condition for all chains! * add enableIdentity for correct support * Add comments to EndpointOption type * Add some inline comments --- .../src/endpoints/productionRelayKusama.ts | 13 ++++++ .../src/endpoints/productionRelayPolkadot.ts | 8 ++++ .../src/endpoints/testingRelayPaseo.ts | 2 + .../src/endpoints/testingRelayRococo.ts | 14 ++++++ .../src/endpoints/testingRelayWestend.ts | 13 ++++++ packages/apps-config/src/endpoints/types.ts | 20 +++++++++ packages/apps-config/src/endpoints/util.ts | 6 ++- packages/apps/src/WarmUp.tsx | 4 +- .../page-accounts/src/Accounts/Account.tsx | 44 +++++++++---------- .../page-accounts/src/modals/IdentityMain.tsx | 18 ++++---- .../page-accounts/src/modals/IdentitySub.tsx | 8 ++-- .../page-addresses/src/Contacts/Address.tsx | 2 +- .../src/Referenda/Delegate/useSuperIds.ts | 8 ++-- .../page-staking-legacy/src/Filtering.tsx | 4 +- .../src/Targets/Validator.tsx | 6 +-- .../src/Validators/Address/index.tsx | 6 +-- packages/page-staking/src/Filtering.tsx | 4 +- .../page-staking/src/Targets/Validator.tsx | 6 +-- .../src/Validators/Address/index.tsx | 6 +-- packages/react-api/src/Api.tsx | 16 +++++-- packages/react-api/src/types.ts | 9 ++++ packages/react-components/src/AccountName.tsx | 8 ++-- .../src/AccountSidebar/Identity.tsx | 4 +- .../src/AccountSidebar/RegistrarJudgement.tsx | 10 ++--- .../react-components/src/AddressToggle.tsx | 6 +-- packages/react-hooks/src/ctx/types.ts | 3 ++ packages/react-hooks/src/index.ts | 1 + packages/react-hooks/src/useAccountInfo.ts | 6 +-- .../react-hooks/src/useDeriveAccountInfo.ts | 6 +-- packages/react-hooks/src/usePeopleEndpoint.ts | 23 ++++++++++ packages/react-hooks/src/useRegistrars.ts | 4 +- packages/react-hooks/src/useSubidentities.ts | 4 +- 32 files changed, 206 insertions(+), 86 deletions(-) create mode 100644 packages/react-hooks/src/usePeopleEndpoint.ts diff --git a/packages/apps-config/src/endpoints/productionRelayKusama.ts b/packages/apps-config/src/endpoints/productionRelayKusama.ts index 7a232fc286..96529dd548 100644 --- a/packages/apps-config/src/endpoints/productionRelayKusama.ts +++ b/packages/apps-config/src/endpoints/productionRelayKusama.ts @@ -905,6 +905,7 @@ export const prodParasKusama: Omit[] = [ export const prodParasKusamaCommon: EndpointOption[] = [ { info: 'KusamaAssetHub', + isPeopleForIdentity: true, paraId: 1000, providers: { Dwellir: 'wss://asset-hub-kusama-rpc.dwellir.com', @@ -917,6 +918,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ RadiumBlock: 'wss://statemine.public.curie.radiumblock.co/ws', Stakeworld: 'wss://ksm-rpc.stakeworld.io/assethub' }, + relayName: 'kusama', teleport: [-1], text: 'AssetHub', ui: { @@ -926,6 +928,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ }, { info: 'kusamaBridgeHub', + isPeopleForIdentity: true, paraId: 1002, providers: { Dwellir: 'wss://kusama-bridge-hub-rpc.dwellir.com', @@ -938,6 +941,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ RadiumBlock: 'wss://bridgehub-kusama.public.curie.radiumblock.co/ws', Stakeworld: 'wss://ksm-rpc.stakeworld.io/bridgehub' }, + relayName: 'kusama', teleport: [-1], text: 'BridgeHub', ui: { @@ -946,6 +950,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ }, { info: 'kusamaCoretime', + isPeopleForIdentity: true, paraId: 1005, providers: { 'IBP-GeoDNS1': 'wss://sys.ibp.network/coretime-kusama', @@ -953,6 +958,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ Parity: 'wss://kusama-coretime-rpc.polkadot.io', Stakeworld: 'wss://ksm-rpc.stakeworld.io/coretime' }, + relayName: 'kusama', teleport: [-1], text: 'Coretime', ui: { @@ -962,6 +968,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ { homepage: 'https://encointer.org/', info: 'encointer', + isPeopleForIdentity: true, paraId: 1001, providers: { Dwellir: 'wss://encointer-kusama-rpc.dwellir.com', @@ -971,6 +978,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [ // OnFinality: 'wss://encointer.api.onfinality.io/public-ws', // https://github.com/polkadot-js/apps/issues/9986 // Stakeworld: 'wss://ksm-rpc.stakeworld.io/encointer' }, + relayName: 'kusama', teleport: [-1], text: 'Encointer Network', ui: { @@ -980,11 +988,14 @@ export const prodParasKusamaCommon: EndpointOption[] = [ }, { info: 'kusamaPeople', + isPeople: true, + isPeopleForIdentity: false, paraId: 1004, providers: { Parity: 'wss://kusama-people-rpc.polkadot.io', Stakeworld: 'wss://ksm-rpc.stakeworld.io/people' }, + relayName: 'kusama', teleport: [-1], text: 'People', ui: {} @@ -995,6 +1006,8 @@ export const prodRelayKusama: EndpointOption = { dnslink: 'kusama', genesisHash: KUSAMA_GENESIS, info: 'kusama', + isPeopleForIdentity: true, + isRelay: true, linked: [ ...prodParasKusamaCommon, ...prodParasKusama diff --git a/packages/apps-config/src/endpoints/productionRelayPolkadot.ts b/packages/apps-config/src/endpoints/productionRelayPolkadot.ts index 1eda5683a3..4a015b7bfe 100644 --- a/packages/apps-config/src/endpoints/productionRelayPolkadot.ts +++ b/packages/apps-config/src/endpoints/productionRelayPolkadot.ts @@ -832,6 +832,7 @@ export const prodParasPolkadot: Omit[] = [ export const prodParasPolkadotCommon: EndpointOption[] = [ { info: 'PolkadotAssetHub', + isPeopleForIdentity: true, paraId: 1000, providers: { Dwellir: 'wss://asset-hub-polkadot-rpc.dwellir.com', @@ -844,6 +845,7 @@ export const prodParasPolkadotCommon: EndpointOption[] = [ RadiumBlock: 'wss://statemint.public.curie.radiumblock.co/ws', Stakeworld: 'wss://dot-rpc.stakeworld.io/assethub' }, + relayName: 'polkadot', teleport: [-1], text: 'AssetHub', ui: { @@ -853,6 +855,7 @@ export const prodParasPolkadotCommon: EndpointOption[] = [ }, { info: 'polkadotBridgeHub', + isPeopleForIdentity: true, paraId: 1002, providers: { Dwellir: 'wss://polkadot-bridge-hub-rpc.dwellir.com', @@ -865,6 +868,7 @@ export const prodParasPolkadotCommon: EndpointOption[] = [ RadiumBlock: 'wss://bridgehub-polkadot.public.curie.radiumblock.co/ws', Stakeworld: 'wss://dot-rpc.stakeworld.io/bridgehub' }, + relayName: 'polkadot', teleport: [-1], text: 'BridgeHub', ui: { @@ -873,6 +877,7 @@ export const prodParasPolkadotCommon: EndpointOption[] = [ }, { info: 'polkadotCollectives', + isPeopleForIdentity: true, paraId: 1001, providers: { Dwellir: 'wss://polkadot-collectives-rpc.dwellir.com', @@ -885,6 +890,7 @@ export const prodParasPolkadotCommon: EndpointOption[] = [ RadiumBlock: 'wss://collectives.public.curie.radiumblock.co/ws', Stakeworld: 'wss://dot-rpc.stakeworld.io/collectives' }, + relayName: 'polkadot', teleport: [-1], text: 'Collectives', ui: { @@ -898,6 +904,8 @@ export const prodRelayPolkadot: EndpointOption = { dnslink: 'polkadot', genesisHash: POLKADOT_GENESIS, info: 'polkadot', + isPeopleForIdentity: true, + isRelay: true, linked: [ ...prodParasPolkadotCommon, ...prodParasPolkadot diff --git a/packages/apps-config/src/endpoints/testingRelayPaseo.ts b/packages/apps-config/src/endpoints/testingRelayPaseo.ts index 5ab37f47da..598c67e537 100644 --- a/packages/apps-config/src/endpoints/testingRelayPaseo.ts +++ b/packages/apps-config/src/endpoints/testingRelayPaseo.ts @@ -161,6 +161,8 @@ export const testRelayPaseo: EndpointOption = { dnslink: 'paseo', genesisHash: PASEO_GENESIS, info: 'paseo', + isPeopleForIdentity: true, + isRelay: true, linked: [ ...testParasPaseoCommon, ...testParasPaseo diff --git a/packages/apps-config/src/endpoints/testingRelayRococo.ts b/packages/apps-config/src/endpoints/testingRelayRococo.ts index b4776c2ac0..eddb6016e4 100644 --- a/packages/apps-config/src/endpoints/testingRelayRococo.ts +++ b/packages/apps-config/src/endpoints/testingRelayRococo.ts @@ -703,11 +703,13 @@ export const testParasRococo: Omit[] = [ export const testParasRococoCommon: EndpointOption[] = [ { info: 'RococoAssetHub', + isPeopleForIdentity: true, paraId: 1000, providers: { Dwellir: 'wss://asset-hub-rococo-rpc.dwellir.com', Parity: 'wss://rococo-asset-hub-rpc.polkadot.io' }, + relayName: 'rococo', teleport: [-1], text: 'AssetHub', ui: { @@ -717,11 +719,13 @@ export const testParasRococoCommon: EndpointOption[] = [ }, { info: 'rococoBridgehub', + isPeopleForIdentity: true, paraId: 1013, providers: { Dwellir: 'wss://rococo-bridge-hub-rpc.dwellir.com', Parity: 'wss://rococo-bridge-hub-rpc.polkadot.io' }, + relayName: 'rococo', teleport: [-1], text: 'Bridgehub', ui: { @@ -730,10 +734,12 @@ export const testParasRococoCommon: EndpointOption[] = [ }, { info: 'rococoContracts', + isPeopleForIdentity: true, paraId: 1002, providers: { Parity: 'wss://rococo-contracts-rpc.polkadot.io' }, + relayName: 'rococo', teleport: [-1], text: 'Contracts', ui: { @@ -743,10 +749,12 @@ export const testParasRococoCommon: EndpointOption[] = [ }, { info: 'rococoCoretime', + isPeopleForIdentity: true, paraId: 1005, providers: { Parity: 'wss://rococo-coretime-rpc.polkadot.io' }, + relayName: 'rococo', teleport: [-1], text: 'Coretime', ui: {} @@ -754,10 +762,12 @@ export const testParasRococoCommon: EndpointOption[] = [ { homepage: 'https://encointer.org/', info: 'encointer', + isPeopleForIdentity: true, paraId: 1003, providers: { 'Encointer Association': 'wss://rococo.api.encointer.org' }, + relayName: 'rococo', teleport: [-1], text: 'Encointer Lietaer', ui: { @@ -767,10 +777,12 @@ export const testParasRococoCommon: EndpointOption[] = [ }, { info: 'rococoPeople', + isPeopleForIdentity: false, paraId: 1004, providers: { Parity: 'wss://rococo-people-rpc.polkadot.io' }, + relayName: 'rococo', teleport: [-1], text: 'People', ui: {} @@ -781,6 +793,8 @@ export const testRelayRococo: EndpointOption = { dnslink: 'rococo', genesisHash: ROCOCO_GENESIS, info: 'rococo', + isPeopleForIdentity: true, + isRelay: true, linked: [ ...testParasRococoCommon, ...testParasRococo diff --git a/packages/apps-config/src/endpoints/testingRelayWestend.ts b/packages/apps-config/src/endpoints/testingRelayWestend.ts index 384722eaae..2f740f9e98 100644 --- a/packages/apps-config/src/endpoints/testingRelayWestend.ts +++ b/packages/apps-config/src/endpoints/testingRelayWestend.ts @@ -113,6 +113,7 @@ export const testParasWestend: Omit[] = [ export const testParasWestendCommon: EndpointOption[] = [ { info: 'WestendAssetHub', + isPeopleForIdentity: true, paraId: 1000, providers: { Dwellir: 'wss://asset-hub-westend-rpc.dwellir.com', @@ -123,6 +124,7 @@ export const testParasWestendCommon: EndpointOption[] = [ Parity: 'wss://westend-asset-hub-rpc.polkadot.io' // Stakeworld: 'wss://wnd-rpc.stakeworld.io/assethub' }, + relayName: 'westend', teleport: [-1], text: 'AssetHub', ui: { @@ -132,6 +134,7 @@ export const testParasWestendCommon: EndpointOption[] = [ }, { info: 'westendBridgeHub', + isPeopleForIdentity: true, paraId: 1002, providers: { Dwellir: 'wss://westend-bridge-hub-rpc.dwellir.com', @@ -141,6 +144,7 @@ export const testParasWestendCommon: EndpointOption[] = [ // OnFinality: 'wss://bridgehub-westend.api.onfinality.io/public-ws', // https://github.com/polkadot-js/apps/issues/9960 Parity: 'wss://westend-bridge-hub-rpc.polkadot.io' }, + relayName: 'westend', text: 'BridgeHub', ui: { logo: nodesBridgeHubSVG @@ -148,6 +152,7 @@ export const testParasWestendCommon: EndpointOption[] = [ }, { info: 'westendCollectives', + isPeopleForIdentity: true, paraId: 1001, providers: { Dwellir: 'wss://westend-collectives-rpc.dwellir.com', @@ -156,6 +161,7 @@ export const testParasWestendCommon: EndpointOption[] = [ 'IBP-GeoDNS2': 'wss://sys.dotters.network/collectives-westend', Parity: 'wss://westend-collectives-rpc.polkadot.io' }, + relayName: 'westend', teleport: [-1], text: 'Collectives', ui: { @@ -165,24 +171,29 @@ export const testParasWestendCommon: EndpointOption[] = [ }, { info: 'westendCoretime', + isPeopleForIdentity: true, paraId: 1005, providers: { 'IBP-GeoDNS1': 'wss://sys.ibp.network/coretime-westend', 'IBP-GeoDNS2': 'wss://sys.dotters.network/coretime-westend', Parity: 'wss://westend-coretime-rpc.polkadot.io' }, + relayName: 'westend', teleport: [-1], text: 'Coretime', ui: {} }, { info: 'westendPeople', + isPeople: true, + isPeopleForIdentity: false, paraId: 1004, providers: { 'IBP-GeoDNS1': 'wss://sys.ibp.network/people-westend', 'IBP-GeoDNS2': 'wss://sys.dotters.network/people-westend', Parity: 'wss://westend-people-rpc.polkadot.io' }, + relayName: 'westend', teleport: [-1], text: 'People', ui: { } @@ -193,6 +204,8 @@ export const testRelayWestend: EndpointOption = { dnslink: 'westend', genesisHash: WESTEND_GENESIS, info: 'westend', + isPeopleForIdentity: true, + isRelay: true, linked: [ ...testParasWestendCommon, ...testParasWestend diff --git a/packages/apps-config/src/endpoints/types.ts b/packages/apps-config/src/endpoints/types.ts index ba881b7721..657eeb487a 100644 --- a/packages/apps-config/src/endpoints/types.ts +++ b/packages/apps-config/src/endpoints/types.ts @@ -24,11 +24,27 @@ export interface EndpointOption extends BaseOption { isChild?: boolean; isDevelopment?: boolean; isDisabled?: boolean; + /** + * Declares whether the given endpoint is the People chain used to store identity information. + */ + isPeople?: boolean; isUnreachable?: boolean; linked?: EndpointOption[]; info?: string; providers: Record; text: string; + /** + * Declares whether or not the endpoint is a relay chain. + */ + isRelay?: boolean; + /** + * Declares whether the given endpoint uses the People chain to store identity information. + */ + isPeopleForIdentity?: boolean; + /** + * Declares the relays name. + */ + relayName?: string; } export interface LinkOption extends BaseOption, Option { @@ -36,12 +52,16 @@ export interface LinkOption extends BaseOption, Option { isChild?: boolean; isDevelopment?: boolean; isLightClient?: boolean; + isPeople?: boolean; isRelay?: boolean; isUnreachable?: boolean; isSpaced?: boolean; linked?: LinkOption[]; + providers?: `${'wss://' | 'light://substrate-connect/'}${string}`[]; + relayName?: string; textBy: string; textRelay?: React.ReactNode; + isPeopleForIdentity?: boolean; value: string; valueRelay?: string[]; } diff --git a/packages/apps-config/src/endpoints/util.ts b/packages/apps-config/src/endpoints/util.ts index 4e067b7736..9239c9c024 100644 --- a/packages/apps-config/src/endpoints/util.ts +++ b/packages/apps-config/src/endpoints/util.ts @@ -53,7 +53,7 @@ function expandLinked (input: LinkOption[]): LinkOption[] { }, []); } -function expandEndpoint (t: TFunction, { dnslink, genesisHash, homepage, info, isChild, isDisabled, isUnreachable, linked, paraId, providers, teleport, text, ui }: EndpointOption, firstOnly: boolean, withSort: boolean): LinkOption[] { +function expandEndpoint (t: TFunction, { dnslink, genesisHash, homepage, info, isChild, isDisabled, isPeople, isPeopleForIdentity, isUnreachable, linked, paraId, providers, relayName, teleport, text, ui }: EndpointOption, firstOnly: boolean, withSort: boolean): LinkOption[] { const hasProviders = Object.keys(providers).length !== 0; const base = { genesisHash, @@ -61,8 +61,12 @@ function expandEndpoint (t: TFunction, { dnslink, genesisHash, homepage, info, i info, isChild, isDisabled, + isPeople, + isPeopleForIdentity, isUnreachable: isUnreachable || !hasProviders, paraId, + providers: Object.keys(providers).map((k) => providers[k]), + relayName, teleport, text, ui diff --git a/packages/apps/src/WarmUp.tsx b/packages/apps/src/WarmUp.tsx index eaf5b1ccb9..d94e78e697 100644 --- a/packages/apps/src/WarmUp.tsx +++ b/packages/apps/src/WarmUp.tsx @@ -6,9 +6,9 @@ import React, { useEffect, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; function WarmUp (): React.ReactElement { - const { api, isApiReady } = useApi(); + const { api, apiIdentity, isApiReady } = useApi(); const indexes = useCall(isApiReady && api.derive.accounts?.indexes); - const registrars = useCall(isApiReady && api.query.identity?.registrars); + const registrars = useCall(isApiReady && apiIdentity.query.identity?.registrars); const issuance = useCall(isApiReady && api.query.balances?.totalIssuance); const [hasValues, setHasValues] = useState(false); diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index 864bf66537..a6149cf39d 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -150,13 +150,13 @@ function Account ({ account: { address, meta }, className = '', delegation, filt const { t } = useTranslation(); const [isExpanded, toggleIsExpanded] = useToggle(false); const { queueExtrinsic } = useQueue(); - const api = useApi(); + const { api, apiIdentity, enableIdentity, isDevelopment: isDevelopmentApiProps, isEthereum: isEthereumApiProps } = useApi(); const { getLedger } = useLedger(); const bestNumber = useBestNumber(); const balancesAll = useBalancesAll(address); const stakingInfo = useStakingInfo(address); - const democracyLocks = useCall(api.api.derive.democracy?.locks, [address]); - const recoveryInfo = useCall(api.api.query.recovery?.recoverable, [address], transformRecovery); + const democracyLocks = useCall(api.derive.democracy?.locks, [address]); + const recoveryInfo = useCall(api.query.recovery?.recoverable, [address], transformRecovery); const multiInfos = useMultisigApprovals(address); const proxyInfo = useProxies(address); const { flags: { isDevelopment, isEditable, isEthereum, isExternal, isHardware, isInjected, isMultisig, isProxied }, genesisHash, identity, name: accName, onSetGenesisHash, tags } = useAccountInfo(address); @@ -190,10 +190,10 @@ function Account ({ account: { address, meta }, className = '', delegation, filt unbonding: calcUnbonding(stakingInfo) }); - api.api.tx.vesting?.vest && setVestingTx(() => + api.tx.vesting?.vest && setVestingTx(() => balancesAll.vestingLocked.isZero() ? null - : api.api.tx.vesting.vest() + : api.tx.vesting.vest() ); } }, [address, api, balancesAll, setBalance, stakingInfo]); @@ -210,7 +210,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt } return { - democracyUnlockTx: createClearDemocracyTx(api.api, address, ids), + democracyUnlockTx: createClearDemocracyTx(api, address, ids), ids }; } @@ -230,7 +230,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt return { ids, - referendaUnlockTx: createClearReferendaTx(api.api, address, ids) + referendaUnlockTx: createClearReferendaTx(api, address, ids) }; } ); @@ -301,7 +301,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt const menuItems = useMemo(() => [ createMenuGroup('identityGroup', [ - isFunction(api.api.tx.identity?.setIdentity) && !isHardware && ( + isFunction(apiIdentity.tx.identity?.setIdentity) && enableIdentity && !isHardware && ( ), - isFunction(api.api.tx.identity?.setSubs) && identity?.display && !isHardware && ( + isFunction(apiIdentity.tx.identity?.setSubs) && enableIdentity && identity?.display && !isHardware && ( ), - isFunction(api.api.tx.democracy?.unlock) && democracyUnlockTx && ( + isFunction(api.tx.democracy?.unlock) && democracyUnlockTx && ( ), - isFunction(api.api.tx.convictionVoting?.unlock) && referendaUnlockTx && ( + isFunction(api.tx.convictionVoting?.unlock) && referendaUnlockTx && ( ), - isFunction(api.api.tx.vesting?.vest) && vestingVestTx && ( + isFunction(api.tx.vesting?.vest) && vestingVestTx && ( ) ], t('Backup')), - isFunction(api.api.tx.recovery?.createRecovery) && createMenuGroup('reoveryGroup', [ + isFunction(api.tx.recovery?.createRecovery) && createMenuGroup('reoveryGroup', [ !recoveryInfo && ( ], t('Recovery')), - isFunction(api.api.tx.multisig?.asMulti) && isMultisig && createMenuGroup('multisigGroup', [ + isFunction(api.tx.multisig?.asMulti) && isMultisig && createMenuGroup('multisigGroup', [ ], t('Multisig')), - isFunction(api.api.query.democracy?.votingOf) && delegation?.accountDelegated && createMenuGroup('undelegateGroup', [ + isFunction(api.query.democracy?.votingOf) && delegation?.accountDelegated && createMenuGroup('undelegateGroup', [ ], t('Undelegate')), createMenuGroup('delegateGroup', [ - isFunction(api.api.query.democracy?.votingOf) && !delegation?.accountDelegated && ( + isFunction(api.query.democracy?.votingOf) && !delegation?.accountDelegated && ( ), - isFunction(api.api.query.proxy?.proxies) && ( + isFunction(api.query.proxy?.proxies) && ( ) ], t('Delegate')), - isEditable && !api.isDevelopment && createMenuGroup('genesisGroup', [ + isEditable && !isDevelopmentApiProps && createMenuGroup('genesisGroup', [ ]) ].filter((i) => i), - [_clearDemocracyLocks, _clearReferendaLocks, _showOnHardware, _vestingVest, api, delegation, democracyUnlockTx, genesisHash, identity, isDevelopment, isEditable, isEthereum, isExternal, isHardware, isInjected, isMultisig, multiInfos, onSetGenesisHash, proxy, referendaUnlockTx, recoveryInfo, t, toggleBackup, toggleDelegate, toggleDerive, toggleForget, toggleIdentityMain, toggleIdentitySub, toggleMultisig, togglePassword, toggleProxyOverview, toggleRecoverAccount, toggleRecoverSetup, toggleUndelegate, vestingVestTx]); + [_clearDemocracyLocks, _clearReferendaLocks, _showOnHardware, _vestingVest, api, apiIdentity.tx.identity, enableIdentity, delegation, democracyUnlockTx, genesisHash, identity, isDevelopment, isDevelopmentApiProps, isEthereumApiProps, isEditable, isEthereum, isExternal, isHardware, isInjected, isMultisig, multiInfos, onSetGenesisHash, proxy, referendaUnlockTx, recoveryInfo, t, toggleBackup, toggleDelegate, toggleDerive, toggleForget, toggleIdentityMain, toggleIdentitySub, toggleMultisig, togglePassword, toggleProxyOverview, toggleRecoverAccount, toggleRecoverSetup, toggleUndelegate, vestingVestTx]); if (!isVisible) { return null; @@ -660,7 +660,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt onClick={toggleDelegate} /> )} - {proxy && proxy[0].length !== 0 && api.api.tx.utility && ( + {proxy && proxy[0].length !== 0 && api.tx.utility && ( - {(isFunction(api.api.tx.balances?.transferAllowDeath) || isFunction(api.api.tx.balances?.transfer)) && ( + {(isFunction(api.tx.balances?.transferAllowDeath) || isFunction(api.tx.balances?.transfer)) && (