Skip to content

Commit

Permalink
fix: hack to prevent older bx/app versions from swapping on zora (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
welps authored Apr 1, 2024
1 parent c260f3c commit 3ff17c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/src/quotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const buildRainbowQuoteUrl = ({
const searchParams = new URLSearchParams({
buyToken: buyTokenAddress,
chainId: String(chainId),
enableZoraSwaps: String(true),
fromAddress,
sellToken: sellTokenAddress,
slippage: String(slippage),
Expand Down Expand Up @@ -344,7 +345,7 @@ export const fillQuote = async (
referrer?: string
): Promise<Transaction> => {
const instance = new Contract(
RAINBOW_ROUTER_CONTRACT_ADDRESS,
getRainbowRouterContractAddress(chainId),
RainbowRouterABI,
wallet
);
Expand Down Expand Up @@ -513,7 +514,7 @@ export const getQuoteExecutionDetails = (
provider: StaticJsonRpcProvider
): QuoteExecutionDetails => {
const instance = new Contract(
RAINBOW_ROUTER_CONTRACT_ADDRESS,
getRainbowRouterContractAddress(quote.chainId),
RainbowRouterABI,
provider
);
Expand Down
1 change: 1 addition & 0 deletions sdk/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface Quote {
swapType?: string;
tradeAmountUSD: number;
rewards?: Reward[];
chainId: number;
}
export interface Reward {
amount: number;
Expand Down

0 comments on commit 3ff17c2

Please sign in to comment.