Skip to content

Commit

Permalink
fix: zrx broken allowance checks (#8403)
Browse files Browse the repository at this point in the history
Co-authored-by: NeOMakinG <[email protected]>
  • Loading branch information
gomesalexandre and NeOMakinG authored Dec 18, 2024
1 parent e719f8c commit 81d34f5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { PERMIT2_CONTRACT } from '@shapeshiftoss/contracts'
import type { AssetsByIdPartial } from '@shapeshiftoss/types'
import type { Result } from '@sniptt/monads'
import { Err, Ok } from '@sniptt/monads'
Expand All @@ -11,6 +12,7 @@ import type {
TradeRate,
} from '../../../types'
import { SwapperName } from '../../../types'
import { isNativeEvmAsset } from '../../utils/helpers/helpers'
import { fetchZrxPrice } from '../utils/fetchFromZrx'
import {
assertValidTrade,
Expand Down Expand Up @@ -79,6 +81,7 @@ export async function getZrxTradeRate(
steps: [
{
estimatedExecutionTimeMs: undefined,
allowanceContract: isNativeEvmAsset(sellAsset.assetId) ? undefined : PERMIT2_CONTRACT,
buyAsset,
sellAsset,
accountNumber,
Expand Down

0 comments on commit 81d34f5

Please sign in to comment.