diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index 011fbf5cff8..d945096431d 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -323,7 +323,11 @@ export function ApiCtxRoot ({ apiUrl, children, isElectron, store: keyringStore () => makeCreateLink(apiUrl, isElectron), [apiUrl, isElectron] ); - const enableIdentity = apiEndpoint?.isPeople || (isNumber(apiEndpoint?.paraId) && (apiEndpoint?.paraId >= 2000)) || (typeof apiEndpoint?.isPeopleForIdentity === 'boolean' && !apiEndpoint?.isPeopleForIdentity); + const enableIdentity = apiEndpoint?.isPeople || + // Ensure that parachains that don't have isPeopleForIdentity set, can access there own identity pallet. + (isNumber(apiEndpoint?.paraId) && (apiEndpoint?.paraId >= 2000) && !apiEndpoint?.isPeopleForIdentity) || + // Ensure that when isPeopleForIdentity is set to false that it enables the identity pallet access. + (typeof apiEndpoint?.isPeopleForIdentity === 'boolean' && !apiEndpoint?.isPeopleForIdentity); const value = useMemo( () => objectSpread({}, state, { api: statics.api, apiCoretime, apiEndpoint, apiError, apiIdentity: ((apiEndpoint?.isPeopleForIdentity && apiSystemPeople) || statics.api), apiRelay, apiSystemPeople, apiUrl, createLink, enableIdentity, extensions, isApiConnected, isApiInitialized, isElectron, isLocalFork, isWaitingInjected: !extensions }), [apiError, createLink, extensions, isApiConnected, isApiInitialized, isElectron, isLocalFork, state, apiEndpoint, apiCoretime, apiRelay, apiUrl, apiSystemPeople, enableIdentity]