diff --git a/src/Unit/Exchange/generateSwapCalldata.ts b/src/Unit/Exchange/generateSwapCalldata.ts index f5cacde..cefce17 100644 --- a/src/Unit/Exchange/generateSwapCalldata.ts +++ b/src/Unit/Exchange/generateSwapCalldata.ts @@ -357,7 +357,7 @@ async function shouldUseExchangeBalance( additionalTransferAmount = amount; } else { additionalTransferAmount = exchangeBalance >= amount ? 0n : amount - exchangeBalance; - if (additionalTransferAmount > exchangeAllowance) { + if (srcToken !== ZeroAddress && additionalTransferAmount > exchangeAllowance) { throw new Error( `Not enough allowance to make swap, allowance - ${exchangeAllowance} needed allowance - ${additionalTransferAmount}` );