diff --git a/src/amm/amm.controllers.ts b/src/amm/amm.controllers.ts index 74f3d927ab..23c0d434b2 100644 --- a/src/amm/amm.controllers.ts +++ b/src/amm/amm.controllers.ts @@ -65,12 +65,7 @@ import { RefAMMish, Uniswapish, UniswapLPish, - ZigZagish, } from '../services/common-interfaces'; -import { - price as zigzagPrice, - trade as zigzagTrade, -} from '../connectors/zigzag/zigzag.controllers'; import { Algorand } from '../chains/algorand/algorand'; import { Tinyman } from '../connectors/tinyman/tinyman'; @@ -79,8 +74,8 @@ export async function price(req: PriceRequest): Promise { req.chain, req.network ); - const connector: Uniswapish | RefAMMish | Tinyman | ZigZagish = - await getConnector( + const connector: Uniswapish | RefAMMish | Tinyman = + await getConnector( req.chain, req.network, req.connector @@ -89,8 +84,6 @@ export async function price(req: PriceRequest): Promise { // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish if ('routerAbi' in connector) { return uniswapPrice(chain, connector, req); - } else if ('estimate' in connector) { - return zigzagPrice(chain, connector as any, req); } else if (connector instanceof Tinyman) { return tinymanPrice(chain as unknown as Algorand, connector, req); } else { @@ -103,8 +96,8 @@ export async function trade(req: TradeRequest): Promise { req.chain, req.network ); - const connector: Uniswapish | RefAMMish | Tinyman | ZigZagish = - await getConnector( + const connector: Uniswapish | RefAMMish | Tinyman = + await getConnector( req.chain, req.network, req.connector @@ -113,8 +106,6 @@ export async function trade(req: TradeRequest): Promise { // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish if ('routerAbi' in connector) { return uniswapTrade(chain, connector, req); - } else if ('estimate' in connector) { - return zigzagTrade(chain, connector as any, req); } else if (connector instanceof Tinyman) { return tinymanTrade(chain as unknown as Algorand, connector, req); } else { diff --git a/src/chains/ethereum/ethereum.ts b/src/chains/ethereum/ethereum.ts index 915d6dfddb..383299a613 100644 --- a/src/chains/ethereum/ethereum.ts +++ b/src/chains/ethereum/ethereum.ts @@ -13,7 +13,6 @@ import { UniswapConfig } from '../../connectors/uniswap/uniswap.config'; import { Perp } from '../../connectors/perp/perp'; import { SushiswapConfig } from '../../connectors/sushiswap/sushiswap.config'; import { OpenoceanConfig } from '../../connectors/openocean/openocean.config'; -import { ZigZagConfig } from '../../connectors/zigzag/zigzag.config'; // MKR does not match the ERC20 perfectly so we need to use a separate ABI. const MKR_ADDRESS = '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2'; @@ -197,8 +196,6 @@ export class Ethereum extends EthereumBase implements Ethereumish { spender = perp.perp.contracts.vault.address; } else if (reqSpender === 'openocean') { spender = OpenoceanConfig.config.routerAddress('ethereum', this._chain); - } else if (reqSpender === 'zigzag') { - spender = ZigZagConfig.config.contractAddress(this._chain); } else { spender = reqSpender; }