polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.07k stars 354 forks source link

`api.derive.accounts.identity` called with SuperIdentity doesn't return SubIdentities #5810

Open wpank opened 9 months ago

wpank commented 9 months ago

Calling api.derive.accounts.identity gives some slightly unexpected behaviour - when called with the super / parent identity, it doesn't return the sub accounts, although calling with with one of the sub identities it returns the full thing, with all the sub identities / parent account. I want to say it used to be the case that this call returned sub-identities

https://github.com/w3f/1k-validators-be/blob/master/packages/common/src/chaindata/queries/Identity.ts#L91

This is how the call is being used in the 1kv-backend - I needed to add in the additional sub identity query.

TarikGul commented 9 months ago

I did just add some small compatibility fixes with api.derive.accounts.identity when increasing the substrate metadata to the latest release (This will be included in next weeks release), but I need to see if there is any correlation or what the root of the issue is.