From 74ddb7b3bdc6309b352f31f623a50b5fac06d37e Mon Sep 17 00:00:00 2001 From: Sam Bugs Date: Mon, 20 Jan 2025 16:58:36 -0300 Subject: [PATCH] fix: changes to magpie --- .../quotes/quote-sources/magpie-quote-source.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/services/quotes/quote-sources/magpie-quote-source.ts b/src/services/quotes/quote-sources/magpie-quote-source.ts index 5b777916..0b4a108b 100644 --- a/src/services/quotes/quote-sources/magpie-quote-source.ts +++ b/src/services/quotes/quote-sources/magpie-quote-source.ts @@ -1,7 +1,7 @@ import qs from 'qs'; import { parseUnits } from 'viem'; import { Chains } from '@chains'; -import { Address, ChainId, TokenAddress } from '@types'; +import { ChainId, TokenAddress } from '@types'; import { AlwaysValidConfigAndContextSource } from './base/always-valid-source'; import { BuildTxParams, QuoteParams, QuoteSourceMetadata, SourceQuoteResponse, SourceQuoteTransaction } from './types'; import { addQuoteSlippage, calculateAllowanceTarget, failed } from './utils'; @@ -35,7 +35,7 @@ const MAGPIE_METADATA: QuoteSourceMetadata = { }; type MagpieSupport = { buyOrders: false; swapAndTransfer: true }; type MagpieConfig = { sourceAllowlist?: string[] }; -type MagpieData = { quoteId: string; takeFrom: Address; recipient: Address | undefined }; +type MagpieData = { quoteId: string }; export class MagpieQuoteSource extends AlwaysValidConfigAndContextSource { getMetadata() { return MAGPIE_METADATA; @@ -60,6 +60,9 @@ export class MagpieQuoteSource extends AlwaysValidConfigAndContextSource): Promise { const transactionQueryParams = { quoteId, - toAddress: recipient ?? takeFrom, - fromAddress: takeFrom, estimateGas: false, }; const transactionQueryString = qs.stringify(transactionQueryParams, { skipNulls: true, arrayFormat: 'comma' });