File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/wallet/src/services Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ import { newAndStoredMulticast } from './util/newAndStoredMulticast';
40
40
import chunk from 'lodash/chunk.js' ;
41
41
import sortBy from 'lodash/sortBy.js' ;
42
42
43
- const ONE_MONTH_BLOCK_TIME = 21_600 * 6 ;
43
+ const DAYS_IN_EPOCH = 5 ;
44
+ const BLOCKS_PER_EPOCH = 21_600 ;
45
+ const BLOCKS_PER_DAY = BLOCKS_PER_EPOCH / DAYS_IN_EPOCH ;
46
+ const BLOCKS_PER_WEEK = BLOCKS_PER_DAY * 7 ;
44
47
45
48
export interface TransactionsTrackerProps {
46
49
chainHistoryProvider : ChainHistoryProvider ;
@@ -232,7 +235,7 @@ const fetchInitialTransactions = async (
232
235
}
233
236
234
237
const highBlockNo = Cardano . BlockNo ( Math . max ( ...firstPassTxs . map ( ( tx ) => tx . blockHeader . blockNo ) ) ) ;
235
- const onMonthBack = Cardano . BlockNo ( Math . max ( highBlockNo - ONE_MONTH_BLOCK_TIME , 0 ) ) ;
238
+ const onMonthBack = Cardano . BlockNo ( Math . max ( highBlockNo - BLOCKS_PER_WEEK , 0 ) ) ;
236
239
237
240
return await allTransactionsByAddresses ( chainHistoryProvider , {
238
241
addresses,
You can’t perform that action at this time.
0 commit comments