diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js b/src/routes/safe/components/TransactionsNew/TxsTable/columns.js index 6902b8b4..2a61828d 100644 --- a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js +++ b/src/routes/safe/components/TransactionsNew/TxsTable/columns.js @@ -1,5 +1,5 @@ // @flow -import { format, getTime } from 'date-fns' +import { format, getTime, parseISO } from 'date-fns' import { List } from 'immutable' import { type Transaction } from '~/routes/safe/store/models/transaction' import { type SortRow, buildOrderFieldFrom } from '~/components/Table/sorting' @@ -23,7 +23,7 @@ type TxData = { status?: string, } -export const formatDate = (date: Date): string => format(date, 'MMM D, YYYY - HH:mm:ss') +export const formatDate = (date: string): string => format(parseISO(date), 'MMM d, yyyy - HH:mm:ss') export const getTxAmount = (tx: Transaction) => { const web3 = getWeb3() @@ -56,7 +56,7 @@ export const getTxTableData = (transactions: List): List const extendedTokens = Map().withMutations((map) => { safeTokens.forEach((tokenAddress: string) => { const baseToken = tokensList.get(tokenAddress) - const tokenBalance = balances.find(tknBalance => tknBalance.address === tokenAddress) + const tokenBalance = balances.find((tknBalance) => tknBalance.address === tokenAddress) if (baseToken) { map.set(tokenAddress, baseToken.set('balance', tokenBalance ? tokenBalance.balance : '0')) @@ -116,7 +116,8 @@ const extendedTransactionsSelector: Selector transaction.nonce === tx.nonce && isAfter(transaction.submissionDate, tx.submissionDate), + (transaction) => transaction.nonce === tx.nonce + && isAfter(parseISO(transaction.submissionDate), parseISO(tx.submissionDate)), ) if (replacementTransaction) { extendedTx = tx.set('cancelled', true) diff --git a/src/routes/safe/store/actions/fetchTransactions.js b/src/routes/safe/store/actions/fetchTransactions.js index c5e1fbae..6f510aec 100644 --- a/src/routes/safe/store/actions/fetchTransactions.js +++ b/src/routes/safe/store/actions/fetchTransactions.js @@ -32,8 +32,8 @@ type TxServiceModel = { data: string, operation: number, nonce: number, - submissionDate: Date, - executionDate: Date, + submissionDate: string, + executionDate: string, confirmations: ConfirmationServiceModel[], isExecuted: boolean, } diff --git a/src/routes/safe/store/models/transaction.js b/src/routes/safe/store/models/transaction.js index 2f94bcc2..ec848046 100644 --- a/src/routes/safe/store/models/transaction.js +++ b/src/routes/safe/store/models/transaction.js @@ -13,8 +13,8 @@ export type TransactionProps = { recipient: string, data: string, isExecuted: boolean, - submissionDate: Date, - executionDate: Date, + submissionDate: string, + executionDate: string, symbol: string, modifySettingsTx: boolean, cancellationTx: boolean, diff --git a/src/theme/mui.js b/src/theme/mui.js index 1b03e453..ed61fe38 100644 --- a/src/theme/mui.js +++ b/src/theme/mui.js @@ -67,6 +67,9 @@ export default createMuiTheme({ }, outlinedPrimary: { border: `2px solid ${primary}`, + '&:hover': { + border: `2px solid ${primary}`, + }, }, sizeLarge: { padding: `${md} ${lg}`,