Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo committed Dec 18, 2024
1 parent 69677c2 commit 10356cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/abacus-ts/selectors/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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,
Expand All @@ -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);
}
);

Expand Down

0 comments on commit 10356cf

Please sign in to comment.