Adjust address filter, always apply (#6392)
* Adjust address filter, always apply * Adjust * Adjust
This commit is contained in:
parent
b47cb9c942
commit
fc0bcb3f45
@ -14,13 +14,16 @@ export function checkVisibility (api: ApiPromise, address: string, accountInfo:
|
||||
if (filterLower || onlyNamed) {
|
||||
if (accountInfo) {
|
||||
const { accountId, accountIndex, identity, nickname } = accountInfo;
|
||||
const hasAddressMatch = (!!accountId && accountId.toString().includes(filterName)) || (!!accountIndex && accountIndex.toString().includes(filterName));
|
||||
|
||||
if (!onlyNamed && (accountId?.toString().includes(filterName) || accountIndex?.toString().includes(filterName))) {
|
||||
if (!onlyNamed && hasAddressMatch) {
|
||||
isVisible = true;
|
||||
} else if (isFunction(api.query.identity?.identityOf)) {
|
||||
isVisible =
|
||||
(!!identity?.display && identity.display.toLowerCase().includes(filterLower)) ||
|
||||
(!!identity?.displayParent && identity.displayParent.toLowerCase().includes(filterLower));
|
||||
isVisible = !!identity && (!!identity.display || !!identity.displayParent) && (
|
||||
hasAddressMatch ||
|
||||
(!!identity.display && identity.display.toLowerCase().includes(filterLower)) ||
|
||||
(!!identity.displayParent && identity.displayParent.toLowerCase().includes(filterLower))
|
||||
);
|
||||
} else if (nickname) {
|
||||
isVisible = nickname.toLowerCase().includes(filterLower);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user