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 classnames from 'classnames';
|
||||||
|
|
||||||
import { getBlockExplorerLink } from '@metamask/etherscan-link';
|
import { getBlockExplorerLink } from '@metamask/etherscan-link';
|
||||||
import {
|
import { getValueFromWeiHex } from '../../../helpers/utils/conversions.util';
|
||||||
getEthConversionFromWeiHex,
|
|
||||||
getValueFromWeiHex,
|
|
||||||
} from '../../../helpers/utils/conversions.util';
|
|
||||||
import { formatDate, getURLHostName } from '../../../helpers/utils/util';
|
import { formatDate, getURLHostName } from '../../../helpers/utils/util';
|
||||||
import { EVENT } from '../../../../shared/constants/metametrics';
|
import { EVENT } from '../../../../shared/constants/metametrics';
|
||||||
import TransactionActivityLogIcon from './transaction-activity-log-icon';
|
import TransactionActivityLogIcon from './transaction-activity-log-icon';
|
||||||
@ -90,21 +87,13 @@ export default class TransactionActivityLog extends PureComponent {
|
|||||||
renderActivity(activity, index) {
|
renderActivity(activity, index) {
|
||||||
const { conversionRate, nativeCurrency } = this.props;
|
const { conversionRate, nativeCurrency } = this.props;
|
||||||
const { eventKey, value, timestamp } = activity;
|
const { eventKey, value, timestamp } = activity;
|
||||||
const ethValue =
|
const ethValue = `${getValueFromWeiHex({
|
||||||
index === 0
|
value,
|
||||||
? `${getValueFromWeiHex({
|
fromCurrency: 'ETH',
|
||||||
value,
|
toCurrency: 'ETH',
|
||||||
fromCurrency: 'ETH',
|
conversionRate,
|
||||||
toCurrency: 'ETH',
|
numberOfDecimals: 6,
|
||||||
conversionRate,
|
})} ${nativeCurrency}`;
|
||||||
numberOfDecimals: 6,
|
|
||||||
})} ${nativeCurrency}`
|
|
||||||
: getEthConversionFromWeiHex({
|
|
||||||
value,
|
|
||||||
fromCurrency: 'ETH',
|
|
||||||
conversionRate,
|
|
||||||
numberOfDecimals: 3,
|
|
||||||
});
|
|
||||||
const formattedTimestamp = formatDate(timestamp, "T 'on' M/d/y");
|
const formattedTimestamp = formatDate(timestamp, "T 'on' M/d/y");
|
||||||
const activityText = this.context.t(eventKey, [
|
const activityText = this.context.t(eventKey, [
|
||||||
ethValue,
|
ethValue,
|
||||||
|
Loading…
Reference in New Issue
Block a user