From 27ca9aa88e799a781a03b727879985c501879d47 Mon Sep 17 00:00:00 2001 From: franz Date: Wed, 20 Dec 2023 14:51:22 +0100 Subject: [PATCH] remove unused cowswap fields --- modules/sor/constants.ts | 11 +++++------ modules/sor/sor.gql | 4 ---- modules/sor/sorV2/sorV2.service.ts | 4 ---- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/modules/sor/constants.ts b/modules/sor/constants.ts index 0fa69e5be..8c73cdc23 100644 --- a/modules/sor/constants.ts +++ b/modules/sor/constants.ts @@ -1,14 +1,14 @@ import { TokenAmount } from '@balancer/sdk'; import { GqlCowSwapApiResponse, GqlSorSwapType } from '../../schema'; -export const EMPTY_COWSWAP_RESPONSE = (assetIn: string, assetOut: string, amount: TokenAmount): GqlCowSwapApiResponse => { +export const EMPTY_COWSWAP_RESPONSE = ( + assetIn: string, + assetOut: string, + amount: TokenAmount, +): GqlCowSwapApiResponse => { return { - marketSp: '0', returnAmount: '0', - returnAmountConsideringFees: '0', - returnAmountFromSwaps: '0', swapAmount: amount.amount.toString(), - swapAmountForSwaps: '0', swaps: [], tokenAddresses: [], tokenIn: assetIn, @@ -352,4 +352,3 @@ export const poolsToIgnore = [ '0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004', '0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d', ]; - diff --git a/modules/sor/sor.gql b/modules/sor/sor.gql index 716cf02d2..9bee51655 100644 --- a/modules/sor/sor.gql +++ b/modules/sor/sor.gql @@ -25,13 +25,9 @@ type GqlCowSwapApiResponse { tokenAddresses: [String!]! swaps: [GqlSwap!]! swapAmount: String! - swapAmountForSwaps: String! returnAmount: String! - returnAmountFromSwaps: String! - returnAmountConsideringFees: String! tokenIn: String! tokenOut: String! - marketSp: String! } type GqlSwap { diff --git a/modules/sor/sorV2/sorV2.service.ts b/modules/sor/sorV2/sorV2.service.ts index 56caa5bb4..3f0ff71f7 100644 --- a/modules/sor/sorV2/sorV2.service.ts +++ b/modules/sor/sorV2/sorV2.service.ts @@ -267,12 +267,8 @@ class SwapResultV2 implements SwapResult { const swapAmount = swap.swapKind === SwapKind.GivenIn ? inputAmount.amount.toString() : outputAmount.amount.toString(); return { - marketSp: '', // CowSwap is not using this field, confirmed. returnAmount, - returnAmountConsideringFees: returnAmount, // CowSwap is not using this field, confirmed. - returnAmountFromSwaps: returnAmount, // CowSwap is not using this field, confirmed. swapAmount, - swapAmountForSwaps: swapAmount, // CowSwap is not using this field, confirmed. swaps, tokenAddresses: swap.assets, tokenIn: swap.inputAmount.token.address,