Skip to content

Commit

Permalink
hide deprecated pools from pool list
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridel1e committed Aug 25, 2023
1 parent 1201861 commit dcd6a5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/network/cardano/api/positions/positions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {

import { Balance } from '../../../../common/models/Balance';
import { Position } from '../../../../common/models/Position';
import { ammPools$ } from '../ammPools/ammPools';
import { allAmmPools$ } from '../ammPools/ammPools';
import { lpBalance$ } from '../balance/lpBalance';
import { networkContext$ } from '../networkContext/networkContext';

export const positions$ = combineLatest([
ammPools$,
allAmmPools$,
lpBalance$.pipe(startWith(new Balance([]))),
networkContext$,
]).pipe(
Expand Down
9 changes: 7 additions & 2 deletions src/network/cardano/cardano.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Observable, of } from 'rxjs';
import { map, Observable, of } from 'rxjs';

import { applicationConfig } from '../../applicationConfig';
import { TxId } from '../../common/types';
import { Network, SupportedNetworks } from '../common/Network';
import { convertToConvenientNetworkAsset } from './api/adaRatio/adaRatio';
Expand Down Expand Up @@ -85,7 +86,11 @@ const makeCardanoNetwork = (
lpBalance$,
locks$: of([]),
positions$,
displayedAmmPools$: ammPools$,
displayedAmmPools$: ammPools$.pipe(
map((aps) =>
aps.filter((ap) => !applicationConfig.deprecatedPools.includes(ap.id)),
),
),
ammPools$,
getAddresses: getAddresses,
getUsedAddresses: getUsedAddresses,
Expand Down

0 comments on commit dcd6a5f

Please sign in to comment.