mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix useTransactionDisplayData unit tests (#10134)
New year, new problems. It's working as expected, but we had hard-coded some 2020 date values, and `formatDateWithYearContext` adds the year to its output formatted date if the date is not from the current year.
This commit is contained in:
parent
869124c4c9
commit
d55f579447
@ -30,7 +30,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_GROUP_CATEGORIES.SEND,
|
||||
subtitle: 'To: 0xffe5...1a97',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12',
|
||||
date: 'May 12, 2020',
|
||||
primaryCurrency: '-1 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0xffe5bc4e8f1f969934d773fa67da095d2e491a97',
|
||||
@ -44,7 +44,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_GROUP_CATEGORIES.SEND,
|
||||
subtitle: 'To: 0x0ccc...8848',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12',
|
||||
date: 'May 12, 2020',
|
||||
primaryCurrency: '-2 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0x0ccc8aeeaf5ce790f3b448325981a143fdef8848',
|
||||
@ -57,7 +57,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_GROUP_CATEGORIES.SEND,
|
||||
subtitle: 'To: 0xffe5...1a97',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12',
|
||||
date: 'May 12, 2020',
|
||||
primaryCurrency: '-2 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0xffe5bc4e8f1f969934d773fa67da095d2e491a97',
|
||||
@ -70,7 +70,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_GROUP_CATEGORIES.RECEIVE,
|
||||
subtitle: 'From: 0x31b9...4523',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12',
|
||||
date: 'May 12, 2020',
|
||||
primaryCurrency: '18.75 ETH',
|
||||
senderAddress: '0x31b98d14007bdee637298086988a0bbd31184523',
|
||||
recipientAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -83,7 +83,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_GROUP_CATEGORIES.RECEIVE,
|
||||
subtitle: 'From: 0x9eca...a149',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 8',
|
||||
date: 'May 8, 2020',
|
||||
primaryCurrency: '0 ETH',
|
||||
senderAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
recipientAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -96,7 +96,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_GROUP_CATEGORIES.RECEIVE,
|
||||
subtitle: 'From: 0xee01...febb',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 24',
|
||||
date: 'May 24, 2020',
|
||||
primaryCurrency: '1 ETH',
|
||||
senderAddress: '0xee014609ef9e09776ac5fe00bdbfef57bcdefebb',
|
||||
recipientAddress: '0x9eca64466f257793eaa52fcfff5066894b76a149',
|
||||
@ -109,7 +109,7 @@ const expectedResults = [
|
||||
category: TRANSACTION_CATEGORIES.SWAP,
|
||||
subtitle: '',
|
||||
subtitleContainsOrigin: false,
|
||||
date: 'May 12',
|
||||
date: 'May 12, 2020',
|
||||
primaryCurrency: '+1 ABC',
|
||||
senderAddress: '0xee014609ef9e09776ac5fe00bdbfef57bcdefebb',
|
||||
recipientAddress: '0xabca64466f257793eaa52fcfff5066894b76a149',
|
||||
|
Loading…
Reference in New Issue
Block a user