fix(paseo): relay for identity (#10651)

* fix(paseo): relay for identity

* fix: check for paseo to enable identity

* fix: lint
This commit is contained in:
Alejandro Martinez Andres 2024-06-11 01:46:29 +02:00 committed by GitHub
parent 2c557a9d50
commit dcc8b227fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ export const testRelayPaseo: EndpointOption = {
dnslink: 'paseo',
genesisHash: PASEO_GENESIS,
info: 'paseo',
isPeopleForIdentity: true,
isPeopleForIdentity: false,
isRelay: true,
linked: [
...testParasPaseoCommon,

View File

@ -299,7 +299,7 @@ export function ApiCtxRoot ({ apiUrl, children, isElectron, store: keyringStore
[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() === 'polkadot';
const enableIdentity = apiEndpoint?.isPeople || (isNumber(apiEndpoint?.paraId) && (apiEndpoint?.paraId >= 2000)) || apiEndpoint?.info?.toLowerCase() === 'polkadot' || 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 }),