diff --git a/src/abacus-ts/selectors/account.ts b/src/abacus-ts/selectors/account.ts index df7d777f9..b819ff01d 100644 --- a/src/abacus-ts/selectors/account.ts +++ b/src/abacus-ts/selectors/account.ts @@ -40,6 +40,8 @@ import { selectRawValidatorHeightData, } from './base'; +const BACKUP_BLOCK_HEIGHT = { height: 0, time: '1971-01-01T00:00:00Z' }; + const selectRelevantMarketsList = createAppSelector( [selectRawParentSubaccountData], (parentSubaccount) => { @@ -98,7 +100,6 @@ export const selectParentSubaccountOpenPositions = createAppSelector( ); export const selectParentSubaccountOpenPositionsLoading = selectParentSubaccountSummaryLoading; -const baseTime = { height: 0, time: '1971-01-01T00:00:00Z' }; export const selectAccountOrders = createAppSelector( [ selectRawOrdersRestData, @@ -107,7 +108,7 @@ export const selectAccountOrders = createAppSelector( selectRawIndexerHeightData, ], (rest, live, indexerHeight, validatorHeight) => { - return calculateAllOrders(rest, live, validatorHeight ?? indexerHeight ?? baseTime); + return calculateAllOrders(rest, live, validatorHeight ?? indexerHeight ?? BACKUP_BLOCK_HEIGHT); } );