File tree 2 files changed +16
-22
lines changed
apps/browser-extension-wallet/src/views/bitcoin-mode/features/activity/components
2 files changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -128,17 +128,14 @@ export const Activity = (): React.ReactElement => {
128
128
129
129
const walletAddress = addresses [ 0 ] . address ;
130
130
131
- const groups = [ ...recentTransactions , ...pendingTransaction ] . reduce (
132
- ( acc , transaction ) => {
133
- const dateKey = transaction . timestamp === 0 ? 'Pending' : formattedDate ( new Date ( transaction . timestamp * 1000 ) ) ;
134
- if ( ! acc [ dateKey ] ) {
135
- acc [ dateKey ] = [ ] ;
136
- }
137
- acc [ dateKey ] . push ( transaction ) ;
138
- return acc ;
139
- } ,
140
- { } as { [ date : string ] : Bitcoin . TransactionHistoryEntry [ ] }
141
- ) ;
131
+ const groups = [ ...recentTransactions , ...pendingTransaction ] . reduce ( ( acc , transaction ) => {
132
+ const dateKey = transaction . timestamp === 0 ? 'Pending' : formattedDate ( new Date ( transaction . timestamp * 1000 ) ) ;
133
+ if ( ! acc [ dateKey ] ) {
134
+ acc [ dateKey ] = [ ] ;
135
+ }
136
+ acc [ dateKey ] . push ( transaction ) ;
137
+ return acc ;
138
+ } , { } as { [ date : string ] : Bitcoin . TransactionHistoryEntry [ ] } ) ;
142
139
143
140
const sortedDates = Object . keys ( groups ) . sort ( ( a , b ) => {
144
141
if ( a === 'Pending' ) return - 1 ;
Original file line number Diff line number Diff line change @@ -121,17 +121,14 @@ export const ActivityLayout = (): React.ReactElement => {
121
121
122
122
const walletAddress = addresses [ 0 ] . address ;
123
123
124
- const groups = [ ...recentTransactions , ...pendingTransaction ] . reduce (
125
- ( acc , transaction ) => {
126
- const dateKey = transaction . timestamp === 0 ? 'Pending' : formattedDate ( new Date ( transaction . timestamp * 1000 ) ) ;
127
- if ( ! acc [ dateKey ] ) {
128
- acc [ dateKey ] = [ ] ;
129
- }
130
- acc [ dateKey ] . push ( transaction ) ;
131
- return acc ;
132
- } ,
133
- { } as { [ date : string ] : Bitcoin . TransactionHistoryEntry [ ] }
134
- ) ;
124
+ const groups = [ ...recentTransactions , ...pendingTransaction ] . reduce ( ( acc , transaction ) => {
125
+ const dateKey = transaction . timestamp === 0 ? 'Pending' : formattedDate ( new Date ( transaction . timestamp * 1000 ) ) ;
126
+ if ( ! acc [ dateKey ] ) {
127
+ acc [ dateKey ] = [ ] ;
128
+ }
129
+ acc [ dateKey ] . push ( transaction ) ;
130
+ return acc ;
131
+ } , { } as { [ date : string ] : Bitcoin . TransactionHistoryEntry [ ] } ) ;
135
132
136
133
const sortedDates = Object . keys ( groups ) . sort ( ( a , b ) => {
137
134
if ( a === 'Pending' ) return - 1 ;
You can’t perform that action at this time.
0 commit comments