Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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]);
ta =>
"\n " +
ta.type +
" " +
getAccountName(ta) +
": " +
formatCurrencyUnit(getAccountUnit(ta), ta.balance, {
showCode: true,
disableRounding: true
}) +
" (" +
ta.operations.length +
" ops)"
)
({
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}
);
}
}
stringify: ({ data: account }) => {
const currency = getAccountCurrency(account)
const name = getAccountName(account)
return `${currency.ticker}|${currency.name}|${name}`
},
})
) : null}
{getAccountName(account)}
operation={operation}
account={account}
parentAccount={parentAccount}
/>
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 (
)
}
<div>
<div style="{{">
</div>
</div>
renderItem = ({ item, isActive }) => {
const currency = getAccountCurrency(item.account)
return (
{getAccountName(item.account)}
{isActive && (
)}
)
}