mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
fix incorrect definition of useExchangeBalance
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user