mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
fix test of useTransactionDisplayData for different timezone (#17063)
Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Fixes https://github.com/MetaMask/metamask-extension/issues/17062
This commit is contained in:
parent
61a7850afc
commit
58cd3deed5
@ -20,6 +20,7 @@ import {
|
||||
TransactionGroupCategory,
|
||||
TransactionStatus,
|
||||
} from '../../shared/constants/transaction';
|
||||
import { formatDateWithYearContext } from '../helpers/utils/util';
|
||||
import * as i18nhooks from './useI18nContext';
|
||||
import * as useTokenFiatAmountHooks from './useTokenFiatAmount';
|
||||
import { useTransactionDisplayData } from './useTransactionDisplayData';
|
||||
@ -30,7 +31,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.send,
|
||||
subtitle: 'To: 0xffe...1a97',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12, 2020',
|
||||
date: formatDateWithYearContext(1589314601567),
|
||||
primaryCurrency: '-1 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0xffe5bc4e8f1f969934d773fa67da095d2e491a97',
|
||||
@ -44,7 +45,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.send,
|
||||
subtitle: 'To: 0x0cc...8848',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12, 2020',
|
||||
date: formatDateWithYearContext(1589314355872),
|
||||
primaryCurrency: '-2 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0x0ccc8aeeaf5ce790f3b448325981a143fdef8848',
|
||||
@ -57,7 +58,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.send,
|
||||
subtitle: 'To: 0xffe...1a97',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12, 2020',
|
||||
date: formatDateWithYearContext(1589314345433),
|
||||
primaryCurrency: '-2 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0xffe5bc4e8f1f969934d773fa67da095d2e491a97',
|
||||
@ -70,7 +71,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.receive,
|
||||
subtitle: 'From: 0x31b...4523',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12, 2020',
|
||||
date: formatDateWithYearContext(1589314295000),
|
||||
primaryCurrency: '18.75 ETH',
|
||||
senderAddress: '0x31b98d14007bdee637298086988a0bbd31184523',
|
||||
recipientAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -83,7 +84,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.receive,
|
||||
subtitle: 'From: 0x9ec...a149',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 8, 2020',
|
||||
date: formatDateWithYearContext(1588972833000),
|
||||
primaryCurrency: '0 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -96,7 +97,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.receive,
|
||||
subtitle: 'From: 0xee0...febb',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 24, 2020',
|
||||
date: formatDateWithYearContext(1585087013000),
|
||||
primaryCurrency: '1 ETH',
|
||||
senderAddress: '0xee014609ef9e09776ac5fe00bdbfef57bcdefebb',
|
||||
recipientAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -109,7 +110,7 @@ const expectedResults = [
|
||||
category: TransactionType.swap,
|
||||
subtitle: '',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12, 2020',
|
||||
date: formatDateWithYearContext(1585088013000),
|
||||
primaryCurrency: '+1 ABC',
|
||||
senderAddress: '0xee014609ef9e09776ac5fe00bdbfef57bcdefebb',
|
||||
recipientAddress: '0xabca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -122,7 +123,7 @@ const expectedResults = [
|
||||
category: TransactionGroupCategory.interaction,
|
||||
subtitle: 'metamask.github.io',
|
||||
subtitleContainsOrigin: true,
|
||||
date: 'May 12, 2020',
|
||||
date: formatDateWithYearContext(1585088013000),
|
||||
primaryCurrency: '-0 ETH',
|
||||
senderAddress: '0xee014609ef9e09776ac5fe00bdbfef57bcdefebb',
|
||||
recipientAddress: undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user