Enable apiIdentity for Polkadot (#10751)
* Enable apiIdentity for Polkadot * remove consoles
This commit is contained in:
parent
889e03d687
commit
1a44e92764
@ -298,11 +298,9 @@ export function ApiCtxRoot ({ apiUrl, children, isElectron, store: keyringStore
|
||||
() => makeCreateLink(apiUrl, isElectron),
|
||||
[apiUrl, isElectron]
|
||||
);
|
||||
// TODO: Once the people migration is complete for polkadot, we can remove the polkadot check at the end.
|
||||
const enableIdentity = apiEndpoint?.isPeople || (isNumber(apiEndpoint?.paraId) && (apiEndpoint?.paraId >= 2000)) || apiEndpoint?.info?.toLowerCase() === 'paseo';
|
||||
// TODO remove `(apiEndpoint?.relayName === 'polkadot' && !apiEndpoint?.isRelay && apiRelay)` once polkadot is migrated over to the people chain for identities.
|
||||
const value = useMemo<ApiProps>(
|
||||
() => objectSpread({}, state, { api: statics.api, apiEndpoint, apiError, apiIdentity: (apiEndpoint?.relayName === 'polkadot' && !apiEndpoint?.isRelay && apiRelay) || ((apiEndpoint?.isPeopleForIdentity && apiSystemPeople) || statics.api), apiRelay, apiSystemPeople, apiUrl, createLink, enableIdentity, extensions, isApiConnected, isApiInitialized, isElectron, isLocalFork, isWaitingInjected: !extensions }),
|
||||
() => objectSpread({}, state, { api: statics.api, 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, apiRelay, apiUrl, apiSystemPeople, enableIdentity]
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user