diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.jsx index a9f5a0c5..e8989bb4 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.jsx @@ -1,6 +1,7 @@ // @flow import React, { useState } from 'react' import { withStyles } from '@material-ui/core/styles' +import { getTxAmount } from '~/routes/safe/components/Transactions/TxsTable/columns' import { type Transaction } from '~/routes/safe/store/models/transaction' import Bold from '~/components/layout/Bold' import EtherscanLink from '~/components/EtherscanLink' @@ -40,8 +41,7 @@ type Props = { } type TransferDescProps = { - value: string, - symbol: string, + amount: string, recipient: string, } @@ -52,20 +52,18 @@ type DescriptionDescProps = { } type CustomDescProps = { - value: string, + amount: string, recipient: string, data: String, classes: Object, } -const TransferDescription = ({ value = '', symbol, recipient }: TransferDescProps) => ( +const TransferDescription = ({ amount = '', recipient }: TransferDescProps) => ( Send {' '} - {value} - {' '} - {symbol} + {amount} {' '} to: @@ -99,7 +97,7 @@ const SettingsDescription = ({ removedOwner, addedOwner, newThreshold }: Descrip ) const CustomDescription = ({ - data, value = 0, recipient, classes, + data, amount = 0, recipient, classes, }: CustomDescProps) => { const [showTxData, setShowTxData] = useState(false) return ( @@ -108,9 +106,7 @@ const CustomDescription = ({ Send {' '} - {value} - {' '} - ETH + {amount} {' '} to: @@ -156,18 +152,27 @@ const CustomDescription = ({ const TxDescription = ({ tx, classes }: Props) => { const { - recipient, value, modifySettingsTx, removedOwner, addedOwner, newThreshold, cancellationTx, customTx, creationTx, data, + recipient, + modifySettingsTx, + removedOwner, + addedOwner, + newThreshold, + cancellationTx, + customTx, + creationTx, + data, } = getTxData(tx) + const amount = getTxAmount(tx) return ( {modifySettingsTx && ( )} {customTx && ( - + )} {!cancellationTx && !modifySettingsTx && !customTx && !creationTx && ( - + )} )