How to use the @polkadot/ui-keyring/options/item function in @polkadot/ui-keyring

To help you get started, we’ve selected a few @polkadot/ui-keyring examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github polkadot-js / apps / packages / react-components / src / InputAddress / index.tsx View on Github external
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);
}
github polkadot-js / apps / packages / app-staking / src / Accounts.tsx View on Github external
return stashes.map((stashId) =>
      createOption(stashId, getAddressName(stashId, 'account'))
    );