Skip to content

Commit

Permalink
chore: remove MM related code
Browse files Browse the repository at this point in the history
  • Loading branch information
chefjackson committed Sep 25, 2024
1 parent 93e66de commit 9c00939
Show file tree
Hide file tree
Showing 38 changed files with 43 additions and 3,030 deletions.
482 changes: 0 additions & 482 deletions apps/web/src/config/abi/mmLinkedPool.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/web/src/hooks/useGlobalSettingsEvaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { useGasPriceManager, useSubgraphHealthIndicatorManager, useUserUsernameV
import { useUserChart } from 'state/user/hooks/useUserChart'
import { useUserTokenRisk } from 'state/user/hooks/useUserTokenRisk'
import {
useMMLinkedPoolByDefault,
useUserSplitRouteEnable,
useUserStableSwapEnable,
useUserV2SwapEnable,
Expand Down Expand Up @@ -51,14 +50,12 @@ export function useGlobalSettingsEvaluation() {
const [v2Enable] = useUserV2SwapEnable()
const [v3Enable] = useUserV3SwapEnable()
const [split] = useUserSplitRouteEnable()
const [isMMLinkedPoolByDefault] = useMMLinkedPoolByDefault()
const [singleHopOnly] = useUserSingleHopOnly()
const [speedQuote] = useSpeedQuote()
useFeatureFlagEvaluation('global-settings-routing-stableswap', isStableSwapByDefault)
useFeatureFlagEvaluation('global-settings-routing-v2', v2Enable)
useFeatureFlagEvaluation('global-settings-routing-v3', v3Enable)
useFeatureFlagEvaluation('global-settings-routing-split', split)
useFeatureFlagEvaluation('global-settings-routing-mm', isMMLinkedPoolByDefault)
useFeatureFlagEvaluation('global-settings-routing-single-hop', singleHopOnly)
useFeatureFlagEvaluation('global-settings-speed-quote', speedQuote)

Expand Down
7 changes: 0 additions & 7 deletions apps/web/src/state/user/smartRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const userUseStableSwapAtom = atomWithStorageWithErrorCatch<boolean>('pcs:useSta
const userUseV2SwapAtom = atomWithStorageWithErrorCatch<boolean>('pcs:useV2Swap', true)
const userUseV3SwapAtom = atomWithStorageWithErrorCatch<boolean>('pcs:useV3Swap', true)
const userUserSplitRouteAtom = atomWithStorageWithErrorCatch<boolean>('pcs:useSplitRouting', true)
const userUseMMLinkedPoolAtom = atomWithStorageWithErrorCatch<boolean>('pcs:useMMlinkedPool', true)
const userUseXAtom = atomWithStorageWithErrorCatch<boolean | undefined>('pcs:useX', undefined)

export function useUserXEnable() {
Expand All @@ -29,10 +28,6 @@ export function useUserSplitRouteEnable() {
return useAtom(userUserSplitRouteAtom)
}

export function useMMLinkedPoolByDefault() {
return useAtom(userUseMMLinkedPoolAtom)
}

const derivedOnlyOneAMMSourceEnabledAtom = atom((get) => {
return [get(userUseStableSwapAtom), get(userUseV2SwapAtom), get(userUseV3SwapAtom)].filter(Boolean).length === 1
})
Expand All @@ -48,7 +43,6 @@ const derivedRoutingSettingChangedAtom = atom(
get(userUseV2SwapAtom),
get(userUseV3SwapAtom),
get(userUserSplitRouteAtom),
get(userUseMMLinkedPoolAtom),
!get(userSingleHopAtom),
].some((x) => x === false)
},
Expand All @@ -57,7 +51,6 @@ const derivedRoutingSettingChangedAtom = atom(
set(userUseV2SwapAtom, true)
set(userUseV3SwapAtom, true)
set(userUserSplitRouteAtom, true)
set(userUseMMLinkedPoolAtom, true)
set(userSingleHopAtom, false)
},
)
Expand Down
100 changes: 0 additions & 100 deletions apps/web/src/views/Swap/MMLinkPools/apis/index.ts

This file was deleted.

200 changes: 0 additions & 200 deletions apps/web/src/views/Swap/MMLinkPools/components/MMCommitButton.tsx

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9c00939

Please sign in to comment.