How to use the @ledgerhq/live-common/lib/account.getAccountName function in @ledgerhq/live-common

To help you get started, weā€™ve selected a few @ledgerhq/live-common 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 LedgerHQ / ledger-live-mobile / src / families / tezos / DelegationFlow / Summary.js View on Github external
navigation.navigate("DelegationSelectValidator", {
      ...navigation.state.params,
      transaction,
    });
  }, [rotateAnim, navigation, transaction]);

  const delegation = useDelegation(account);
  const addr =
    transaction.mode === "undelegate"
      ? (delegation && delegation.address) || ""
      : transaction.recipient;
  const baker = useBaker(addr);
  const bakerName = baker ? baker.name : shortAddressPreview(addr);
  const currency = getAccountCurrency(account);
  const color = getCurrencyColor(currency);
  const accountName = getAccountName(account);

  // handle any edit screen changes
  useTransactionChangeFromNavigation({
    navigation,
    setTransaction,
  });

  const onContinue = useCallback(async () => {
    navigation.navigate("DelegationConnectDevice", {
      accountId: account.id,
      parentId: parentAccount && parentAccount.id,
      transaction,
      status,
    });
  }, [status, account, parentAccount, navigation, transaction]);
github LedgerHQ / ledger-live-common / cli / src / accountFormatters.js View on Github external
ta =>
        "\n  " +
        ta.type +
        " " +
        getAccountName(ta) +
        ": " +
        formatCurrencyUnit(getAccountUnit(ta), ta.balance, {
          showCode: true,
          disableRounding: true
        }) +
        " (" +
        ta.operations.length +
        " ops)"
    )
github LedgerHQ / ledger-live-desktop / src / components / SelectAccount / index.js View on Github external
({
    account,
    isValue,
    disabled,
  }: {
    account: AccountLike,
    isValue?: boolean,
    disabled?: boolean,
  }) => {
    const currency = getAccountCurrency(account)
    const unit = getAccountUnit(account)
    const name = getAccountName(account)

    return (
      
        {!isValue && account.type === 'TokenAccount' ? tokenTick : null}
        
        
          {name}
github LedgerHQ / ledger-live-desktop / src / components / SelectAccount / index.js View on Github external
stringify: ({ data: account }) => {
    const currency = getAccountCurrency(account)
    const name = getAccountName(account)
    return `${currency.ticker}|${currency.name}|${name}`
  },
})
github LedgerHQ / ledger-live-mobile / src / components / OperationRow.js View on Github external
operation={operation}
              account={account}
              parentAccount={parentAccount}
            />
github LedgerHQ / ledger-live-desktop / src / components / modals / Receive / steps / StepReceiveFunds.js View on Github external
render() {
    const { account, parentAccount, isAddressVerified, token } = this.props
    const mainAccount = account ? getMainAccount(account, parentAccount) : null
    invariant(account && mainAccount, 'No account given')
    const name = token ? token.name : getAccountName(account)
    return (
      
        
        
      
    )
  }
github LedgerHQ / ledger-live-desktop / src / components / TopBar / Breadcrumb / AccountCrumb.js View on Github external
renderItem = ({ item, isActive }) => {
    const currency = getAccountCurrency(item.account)
    return (
      
        
        
          {getAccountName(item.account)}
        
        {isActive && (
          
            
          
        )}
      
    )
  }