Skip to content

Commit

Permalink
feat: show pending txs always on top
Browse files Browse the repository at this point in the history
  • Loading branch information
brusherru committed Jul 18, 2024
1 parent 05781ca commit b17af96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/store/useAccountData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ const getAccountRewards = (net: NetworkState, address: Bech32Address) =>
const getAccountTransactions = (net: NetworkState, address: Bech32Address) =>
(net.txIds?.[address] || [])
.map((txId) => net.transactions?.[txId])
.sort((a, b) => {
if (!a?.layer) return 1;
if (!b?.layer) return -1;
return a.layer - b.layer;
})
.filter(Boolean) as Transaction[];

// Store
Expand Down

0 comments on commit b17af96

Please sign in to comment.