Use submission instead of execution date to sort outgoing txs (#364)
This commit is contained in:
parent
2d282c511b
commit
15f2de005b
|
@ -24,7 +24,7 @@ type TxData = {
|
||||||
date: string,
|
date: string,
|
||||||
dateOrder?: number,
|
dateOrder?: number,
|
||||||
amount: number | string,
|
amount: number | string,
|
||||||
tx: Transaction,
|
tx: Transaction | IncomingTransaction,
|
||||||
status?: string,
|
status?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ const getIncomingTxTableData = (tx: IncomingTransaction): TransactionRow => ({
|
||||||
})
|
})
|
||||||
|
|
||||||
const getTransactionTableData = (tx: Transaction): TransactionRow => {
|
const getTransactionTableData = (tx: Transaction): TransactionRow => {
|
||||||
const txDate = tx.isExecuted ? tx.executionDate : tx.submissionDate
|
const txDate = tx.submissionDate
|
||||||
|
|
||||||
let txType = 'outgoing'
|
let txType = 'outgoing'
|
||||||
if (tx.modifySettingsTx) {
|
if (tx.modifySettingsTx) {
|
||||||
|
@ -80,9 +80,7 @@ const getTransactionTableData = (tx: Transaction): TransactionRow => {
|
||||||
return {
|
return {
|
||||||
[TX_TABLE_ID]: tx.blockNumber,
|
[TX_TABLE_ID]: tx.blockNumber,
|
||||||
[TX_TABLE_TYPE_ID]: <TxType txType={txType} />,
|
[TX_TABLE_TYPE_ID]: <TxType txType={txType} />,
|
||||||
[TX_TABLE_DATE_ID]: tx.isExecuted
|
[TX_TABLE_DATE_ID]: txDate ? formatDate(txDate) : '',
|
||||||
? tx.executionDate && formatDate(tx.executionDate)
|
|
||||||
: tx.submissionDate && formatDate(tx.submissionDate),
|
|
||||||
[buildOrderFieldFrom(TX_TABLE_DATE_ID)]: txDate ? getTime(parseISO(txDate)) : null,
|
[buildOrderFieldFrom(TX_TABLE_DATE_ID)]: txDate ? getTime(parseISO(txDate)) : null,
|
||||||
[TX_TABLE_AMOUNT_ID]: getTxAmount(tx),
|
[TX_TABLE_AMOUNT_ID]: getTxAmount(tx),
|
||||||
[TX_TABLE_STATUS_ID]: tx.status,
|
[TX_TABLE_STATUS_ID]: tx.status,
|
||||||
|
|
Loading…
Reference in New Issue