Skip to content

Commit

Permalink
fix(suite-common): groupTransactionsByDate fix
Browse files Browse the repository at this point in the history
(cherry picked from commit 71b89ca)
  • Loading branch information
marekrjpolak authored and matejkriz committed Oct 17, 2022
1 parent 4fecea6 commit 70eefcb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions suite-common/wallet-utils/src/transactionUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import BigNumber from 'bignumber.js';
import { fromWei } from 'web3-utils';
import { A } from '@mobily/ts-belt';

import {
Account,
Expand Down Expand Up @@ -44,8 +43,7 @@ export const groupTransactionsByDate = (
transactions: WalletAccountTransaction[],
): { [key: string]: WalletAccountTransaction[] } => {
const r: { [key: string]: WalletAccountTransaction[] } = {};
const sortedTxs = A.sort(transactions, (a, b) => sortByBlockHeight(a, b));
A.sort(sortedTxs, sortByBlockHeight).forEach(item => {
transactions.sort(sortByBlockHeight).forEach(item => {
let key = 'pending';
if (item.blockHeight && item.blockHeight > 0 && item.blockTime && item.blockTime > 0) {
const t = item.blockTime * 1000;
Expand Down

0 comments on commit 70eefcb

Please sign in to comment.