fix incorrect definition of useExchangeBalance

This commit is contained in:
lomonoshka
2023-11-30 14:59:40 +04:00
parent 4d2e006db0
commit 3c56cd0926
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@orionprotocol/sdk", "name": "@orionprotocol/sdk",
"version": "0.20.26-rc2", "version": "0.20.26-rc3",
"description": "Orion Protocol SDK", "description": "Orion Protocol SDK",
"main": "./lib/index.cjs", "main": "./lib/index.cjs",
"module": "./lib/index.js", "module": "./lib/index.js",

View File

@@ -170,7 +170,7 @@ export async function generateSwapCalldata({
true true
); );
const useExchangeBalance = const useExchangeBalance =
initiatorExchangeBalance !== 0n && (srcToken === ZeroAddress || amountNativeDecimals < initiatorWalletBalance); initiatorExchangeBalance !== 0n && (srcToken === ZeroAddress || initiatorWalletBalance < amountNativeDecimals);
if (useExchangeBalance) { if (useExchangeBalance) {
swapDescription.flags = 1n << 255n; swapDescription.flags = 1n << 255n;
} }