Skip to content

Commit 198cee0

Browse files
committed
remove feeamount
1 parent e03af4a commit 198cee0

File tree

4 files changed

+0
-11
lines changed

4 files changed

+0
-11
lines changed

src/components/transactions/Switch/SwitchActions.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,6 @@ export const SwitchActions = ({
702702
outputSymbol,
703703
quote: switchRates.order,
704704
appCode,
705-
feeAmount: switchRates.feeAmount,
706705
});
707706

708707
const response = await sendTx({
@@ -745,7 +744,6 @@ export const SwitchActions = ({
745744
inputSymbol,
746745
outputSymbol,
747746
appCode,
748-
feeAmount: switchRates.feeAmount,
749747
});
750748
setMainTxState({
751749
loading: false,

src/components/transactions/Switch/cowprotocol/cowprotocol.helpers.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export type CowProtocolActionParams = {
120120
slippageBps: number;
121121
smartSlippage: boolean;
122122
appCode?: string;
123-
feeAmount?: number;
124123
};
125124

126125
export const getPreSignTransaction = async ({
@@ -138,7 +137,6 @@ export const getPreSignTransaction = async ({
138137
inputSymbol,
139138
outputSymbol,
140139
appCode,
141-
feeAmount,
142140
}: CowProtocolActionParams) => {
143141
if (!isChainIdSupportedByCoWProtocol(chainId)) {
144142
throw new Error('Chain not supported.');
@@ -172,7 +170,6 @@ export const getPreSignTransaction = async ({
172170
appData: COW_APP_DATA(inputSymbol, outputSymbol, slippageBps, smartSlippage, appCode),
173171
additionalParams: {
174172
signingScheme: SigningScheme.PRESIGN,
175-
networkCostsAmount: feeAmount?.toString(),
176173
},
177174
}
178175
);
@@ -204,7 +201,6 @@ export const sendOrder = async ({
204201
outputSymbol,
205202
smartSlippage,
206203
appCode,
207-
feeAmount,
208204
}: CowProtocolActionParams) => {
209205
const signer = provider?.getSigner();
210206
const tradingSdk = new TradingSdk({
@@ -241,9 +237,6 @@ export const sendOrder = async ({
241237
},
242238
{
243239
appData: COW_APP_DATA(inputSymbol, outputSymbol, slippageBps, smartSlippage, appCode),
244-
additionalParams: {
245-
networkCostsAmount: feeAmount?.toString(),
246-
},
247240
}
248241
)
249242
.then((orderResult) => orderResult.orderId);

src/components/transactions/Switch/switch.types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export type CowProtocolRatesType = BaseSwitchRates & {
6363
destTokenPriceUsd: number;
6464
destSpot: string;
6565
destSpotInUsd: string;
66-
feeAmount: number;
6766
};
6867

6968
export const isParaswapRates = (rates?: SwitchRatesType): rates is ParaswapRatesType => {

src/hooks/switch/cowprotocol.rates.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ export async function getCowProtocolSellRates({
201201
destSpotInUsd: destSpotInUsd.toString(),
202202
destUSD: destAmountInUsd.toString(),
203203
destAmount: orderBookQuote.quoteResults.amountsAndCosts.afterPartnerFees.buyAmount.toString(),
204-
feeAmount: Number(orderBookQuote.quoteResults.quoteResponse.quote.feeAmount),
205204
destDecimals,
206205
provider: 'cowprotocol',
207206
order: orderBookQuote.quoteResults.orderToSign,

0 commit comments

Comments
 (0)