Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { account, parentAccount, transaction, status } = this.props
if (!account) return null
const mainAccount = getMainAccount(account, parentAccount)
if (!mainAccount || !transaction) return null
const { estimatedFees, amount, totalSpent, warnings } = status
const feeTooHigh = warnings.feeTooHigh
const currency = getAccountCurrency(account)
const feesUnit = getAccountUnit(mainAccount)
const unit = getAccountUnit(account)
return (
<div>
<div style="{{"></div></div>
render() {
const { t, accounts, counterValue, range, countervalueFirst, theme } = this.props
const parentAccount =
accounts[0].type !== 'Account' ? this.lookupParentAccount(accounts[0].parentId) : null
const currency = getAccountCurrency(accounts[0])
const unit = getAccountUnit(accounts[0])
const color = getCurrencyColor(currency, theme.colors.palette.background.paper)
return (
render() {
const {
operation,
account,
parentAccount,
multipleAccounts,
isLast,
} = this.props;
const amount = getOperationAmountNumber(operation);
const valueColor = amount.isNegative() ? colors.darkBlue : colors.green;
const currency = getAccountCurrency(account);
const unit = getAccountUnit(account);
const text = ;
const isOptimistic = operation.blockHeight === null;
const spinner = (
render() {
const { account, parentAccount, t, operation, withAccount, text } = this.props
const isOptimistic = operation.blockHeight === null
const currency = getAccountCurrency(account)
const unit = getAccountUnit(account)
return (
{withAccount && }
)
}
}
const isSignificantAccount = acc =>
acc.balance.gt(10 ** (getAccountUnit(acc).magnitude - 6));
render() {
const { account, parentAccount, operation, currencySettings } = this.props;
const mainAccount = getMainAccount(account, parentAccount);
const unit = getAccountUnit(account);
const parentUnit = getAccountUnit(mainAccount);
const currency = getAccountCurrency(account);
const parentCurrency = getAccountCurrency(mainAccount);
const amount = getOperationAmountNumber(operation);
const isNegative = amount.isNegative();
const valueColor = isNegative ? colors.smoke : colors.green;
const confirmations = operation.blockHeight
? mainAccount.blockHeight - operation.blockHeight
: 0;
const uniqueSenders = uniq(operation.senders);
const uniqueRecipients = uniq(operation.recipients);
const { extra } = operation;
const { hasFailed } = operation;
const subOperations = operation.subOperations || [];
const internalOperations = operation.internalOperations || [];
const isConfirmed = confirmations >= currencySettings.confirmationsNb;
render() {
const { account, onSubAccountPress } = this.props;
const currency = getAccountCurrency(account);
const name = getAccountName(account);
const unit = getAccountUnit(account);
return (
onSubAccountPress(account)}
>
render() {
const {
disabled,
value,
account,
rightCurrency,
getCounterValue,
validTransactionError,
} = this.props
const right = getCounterValue(value) || BigNumber(0)
const rightUnit = rightCurrency.units[0]
const defaultUnit = getAccountUnit(account)
return (
{defaultUnit.code}}
/>
{'='}
const TransactionConfirm = ({ t, device, account, parentAccount, transaction, status }: Props) => {
const mainAccount = getMainAccount(account, parentAccount)
const isBlue = device && device.modelId === 'blue'
const { estimatedFees, amount } = status
const unit = getAccountUnit(account)
const feesUnit = getAccountUnit(mainAccount)
const r = transactionConfirmFieldsPerFamily[mainAccount.currency.family]
const Pre = r && r.pre
const Post = r && r.post
const recipientWording = t(`TransactionConfirm.recipientWording.${transaction.mode || 'send'}`)
return (
{!device ? null : (