Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let name: string | undefined;
if (pair) {
name = pair.meta.name;
} else {
const addr = keyring.getAddress(address);
if (addr) {
name = addr.meta.name;
isRecent = addr.meta.isRecent;
} else {
isRecent = true;
}
}
return createItem(createKeyringItem(address, name), !isRecent);
}
return stashes.map((stashId) =>
createOption(stashId, getAddressName(stashId, 'account'))
);