mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
13/12 (#16948)
This commit is contained in:
parent
f6f691190d
commit
e70b6dc29e
@ -3,10 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import { getBlockExplorerLink } from '@metamask/etherscan-link';
|
||||
import {
|
||||
getEthConversionFromWeiHex,
|
||||
getValueFromWeiHex,
|
||||
} from '../../../helpers/utils/conversions.util';
|
||||
import { getValueFromWeiHex } from '../../../helpers/utils/conversions.util';
|
||||
import { formatDate, getURLHostName } from '../../../helpers/utils/util';
|
||||
import { EVENT } from '../../../../shared/constants/metametrics';
|
||||
import TransactionActivityLogIcon from './transaction-activity-log-icon';
|
||||
@ -90,21 +87,13 @@ export default class TransactionActivityLog extends PureComponent {
|
||||
renderActivity(activity, index) {
|
||||
const { conversionRate, nativeCurrency } = this.props;
|
||||
const { eventKey, value, timestamp } = activity;
|
||||
const ethValue =
|
||||
index === 0
|
||||
? `${getValueFromWeiHex({
|
||||
value,
|
||||
fromCurrency: 'ETH',
|
||||
toCurrency: 'ETH',
|
||||
conversionRate,
|
||||
numberOfDecimals: 6,
|
||||
})} ${nativeCurrency}`
|
||||
: getEthConversionFromWeiHex({
|
||||
value,
|
||||
fromCurrency: 'ETH',
|
||||
conversionRate,
|
||||
numberOfDecimals: 3,
|
||||
});
|
||||
const ethValue = `${getValueFromWeiHex({
|
||||
value,
|
||||
fromCurrency: 'ETH',
|
||||
toCurrency: 'ETH',
|
||||
conversionRate,
|
||||
numberOfDecimals: 6,
|
||||
})} ${nativeCurrency}`;
|
||||
const formattedTimestamp = formatDate(timestamp, "T 'on' M/d/y");
|
||||
const activityText = this.context.t(eventKey, [
|
||||
ethValue,
|
||||
|
Loading…
Reference in New Issue
Block a user