diff --git a/package.json b/package.json index b92b6e2..01262dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.20.74", + "version": "0.20.75-rc0", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/Unit/Exchange/generateSwapCalldata.ts b/src/Unit/Exchange/generateSwapCalldata.ts index 91f3fe6..fd7fe08 100644 --- a/src/Unit/Exchange/generateSwapCalldata.ts +++ b/src/Unit/Exchange/generateSwapCalldata.ts @@ -397,7 +397,7 @@ async function shouldUseExchangeBalance( let useExchangeBalance = true; let additionalTransferAmount = 0n; - if (exchangeBalance == 0n) { + if (walletBalance >= amount || exchangeBalance == 0n) { useExchangeBalance = false; additionalTransferAmount = amount; } else {