Skip to content

Commit 85afb20

Browse files
fix(extension): [LW-11284] pending state not showing after tx submission (#1417)
Co-authored-by: Michael Chappell <7581002+mchappell@users.noreply.github.com>
1 parent 0620a27 commit 85afb20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/browser-extension-wallet/src/stores/slices/wallet-activities-slice.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ const mapWalletActivities = memoize(
335335
)
336336
return 1;
337337

338+
// ensure pending tx's always appear on top, separated from the condition above for readability
339+
if (firstTx.status === ActivityStatus.PENDING && secondTx.status !== ActivityStatus.PENDING) return -1;
340+
if (secondTx.status === ActivityStatus.PENDING && firstTx.status !== ActivityStatus.PENDING) return 1;
341+
338342
// otherwise sort by date
339343
return (secondTx.date?.getTime() || 0) - (firstTx.date?.getTime() || 0);
340344
}),

0 commit comments

Comments
 (0)