Skip to content

Commit 38a1253

Browse files
committed
remove rfq sources
1 parent a749fdf commit 38a1253

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

src/swapService/config/default.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const defaultRoutingConfig: ChainRoutingConfig = [
2323
"li-fi",
2424
"open-ocean",
2525
"uniswap",
26-
"0x",
2726
"oku",
2827
"magpie",
28+
"enso",
2929
],
3030
},
3131
},

src/swapService/config/mainnet.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ const mainnetRoutingConfig: ChainRoutingConfig = [
7171
"li-fi",
7272
"open-ocean",
7373
"magpie",
74-
"0x",
7574
],
7675
},
7776
},
@@ -86,13 +85,11 @@ const mainnetRoutingConfig: ChainRoutingConfig = [
8685
sourcesFilter: {
8786
includeSources: [
8887
"kyberswap",
89-
// "paraswap",
9088
"odos",
9189
"1inch",
9290
"li-fi",
9391
"open-ocean",
9492
"magpie",
95-
"0x",
9693
"enso",
9794
"pendle",
9895
],
@@ -125,13 +122,11 @@ const mainnetRoutingConfig: ChainRoutingConfig = [
125122
sourcesFilter: {
126123
includeSources: [
127124
"kyberswap",
128-
// "paraswap",
129125
"odos",
130126
"1inch",
131127
"li-fi",
132128
"open-ocean",
133129
"magpie",
134-
"0x",
135130
"enso",
136131
"pendle",
137132
],

src/swapService/runner.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ export async function runPipeline(
6767
amountOutMin: finalResult.quotes[0].amountOutMin,
6868
route: finalResult.quotes[0].route,
6969
})
70-
// console.log(
71-
// finalResult.quotes
72-
// .map((q) => q.route.map((r) => r.providerName).join(" "))
73-
// .join(", "),
74-
// )
70+
console.log(
71+
finalResult.quotes
72+
.map((q) => q.route.map((r) => r.providerName).join(" "))
73+
.join(", "),
74+
)
7575

7676
// console.log('finalResult.quotes: ', JSON.stringify(finalResult.quotes, null, 2));
7777
return finalResult.quotes

src/swapService/strategies/balmySDK/sources/lifiQuoteSource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export class CustomLiFiQuoteSource extends AlwaysValidConfigAndContextSource<
9090
fromAddress: takeFrom,
9191
toAddress: recipient ?? takeFrom,
9292
slippage: String(slippagePercentage / 100), // 1 = 100%
93+
denyExchanges: "kyberswap,1inch",
9394
...(config.referrer
9495
? {
9596
integrator: config.referrer.name,

src/swapService/strategies/balmySDK/sources/openOceanQuoteSource.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,28 @@ export class CustomOpenOceanQuoteSource extends AlwaysValidConfigAndContextSourc
154154
await response.text(),
155155
)
156156
}
157+
157158
const {
158-
data: { outAmount, minOutAmount, to, value, data /* estimatedGas */ },
159+
data: {
160+
outAmount,
161+
minOutAmount,
162+
to,
163+
value,
164+
data,
165+
rfqDeadline /* estimatedGas */,
166+
},
159167
} = await response.json()
160168

169+
if (Number(rfqDeadline) > 0) {
170+
failed(
171+
OPEN_OCEAN_METADATA,
172+
chainId,
173+
sellToken,
174+
buyToken,
175+
"RFQ not allowed",
176+
)
177+
}
178+
161179
return {
162180
sellAmount: order.sellAmount,
163181
maxSellAmount: order.sellAmount,

0 commit comments

Comments
 (0)