Skip to content

Commit

Permalink
fix(suite-native): add fallback to []
Browse files Browse the repository at this point in the history
  • Loading branch information
komret committed Jun 21, 2024
1 parent d3abb20 commit f20b346
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,14 @@ export const TransactionList = ({
// TODO: display pending transactions in the correct order
const [pendingTxs, confirmedTxs] = arrayPartition(transactions, isPending);
const accountTransactionsByMonth = groupTransactionsByDate(confirmedTxs, 'month');
accountTransactionsByMonth['pending'] = [
...accountTransactionsByMonth['no-blocktime'],
...pendingTxs,
];
if (pendingTxs.length || accountTransactionsByMonth['no-blocktime']) {
accountTransactionsByMonth['pending'] = [
...(accountTransactionsByMonth['no-blocktime'] ?? []),
...pendingTxs,
];
delete accountTransactionsByMonth['no-blocktime'];
}

const transactionMonthKeys = Object.keys(accountTransactionsByMonth) as MonthKey[];

if (tokenContract) {
Expand Down

0 comments on commit f20b346

Please sign in to comment.