Skip to content

Commit

Permalink
revert prefix change
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredvu committed Dec 19, 2024
1 parent fdc1228 commit 564d956
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/abacus-ts/selectors/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { getAssetFromMarketId } from '@/lib/assetUtils';
import { transformAssetsInfo } from '../calculators/assets';
import { selectRawAssetsData } from './base';

export const createSelectAllAssetsInfo = createSelector([selectRawAssetsData], (assets) =>
export const selectAllAssetsInfo = createSelector([selectRawAssetsData], (assets) =>
transformAssetsInfo(assets)
);

export const createSelectCurrentMarketAssetInfo = createSelector(
[getCurrentMarketId, createSelectAllAssetsInfo],
export const selectCurrentMarketAssetInfo = createSelector(
[getCurrentMarketId, selectAllAssetsInfo],
(currentMarket, assets) => {
const assetId = getAssetFromMarketId(currentMarket ?? '');
return assets?.[assetId];
Expand Down
6 changes: 3 additions & 3 deletions src/abacus-ts/selectors/markets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { createAppSelector } from '@/state/appTypes';
import { calculateAllMarkets } from '../calculators/markets';
import { selectRawMarketsData } from './base';

export const createSelectAllMarketsInfo = createAppSelector([selectRawMarketsData], (markets) =>
export const selectAllMarketsInfo = createAppSelector([selectRawMarketsData], (markets) =>
calculateAllMarkets(markets)
);

export const createSelectCurrentMarketInfo = createAppSelector(
[createSelectAllMarketsInfo, (state: RootState) => state.perpetuals.currentMarketId],
export const selectCurrentMarketInfo = createAppSelector(
[selectAllMarketsInfo, (state: RootState) => state.perpetuals.currentMarketId],
(markets, currentMarketId) => (currentMarketId ? markets?.[currentMarketId] : undefined)
);
8 changes: 4 additions & 4 deletions src/views/MarketDetails/CurrentMarketDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSelectCurrentMarketAssetInfo } from '@/abacus-ts/selectors/assets';
import { createSelectCurrentMarketInfo } from '@/abacus-ts/selectors/markets';
import { selectCurrentMarketAssetInfo } from '@/abacus-ts/selectors/assets';
import { selectCurrentMarketInfo } from '@/abacus-ts/selectors/markets';
import { IndexerPerpetualMarketType } from '@/types/indexer/indexerApiGen';
import BigNumber from 'bignumber.js';
import { shallowEqual } from 'react-redux';
Expand All @@ -22,8 +22,8 @@ import { MarketDetails } from './MarketDetails';

export const CurrentMarketDetails = () => {
const stringGetter = useStringGetter();
const currentMarketData = useAppSelector(createSelectCurrentMarketInfo, shallowEqual);
const asset = useAppSelector(createSelectCurrentMarketAssetInfo);
const currentMarketData = useAppSelector(selectCurrentMarketInfo, shallowEqual);
const asset = useAppSelector(selectCurrentMarketAssetInfo);

const {
displayableAsset,
Expand Down

0 comments on commit 564d956

Please sign in to comment.