fix: check for api.query.identity in getSubIdentities (#6093)

This commit is contained in:
Arjun Porwal
2025-02-14 08:12:06 -05:00
committed by GitHub
parent 1996dd477c
commit a15433ec0e
+1 -1
View File
@@ -148,7 +148,7 @@ export function identity (instanceId: string, api: DeriveApi): (accountId?: Acco
function getSubIdentities (identity: DeriveAccountRegistration, api: DeriveApi, accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> {
const targetAccount = identity.parent || accountId;
if (!targetAccount) {
if (!targetAccount || !api.query.identity) {
// No valid accountId return the identity as-is
return of(identity);
}