mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 14:42:38 +03:00
test
This commit is contained in:
@@ -422,7 +422,7 @@ async function shouldUseExchangeBalance(
|
||||
amount: bigint,
|
||||
provider: JsonRpcProvider
|
||||
) {
|
||||
const { walletBalance, exchangeBalance } = await getTotalBalance(
|
||||
const { exchangeBalance } = await getTotalBalance(
|
||||
srcToken,
|
||||
initiatorAddress,
|
||||
exchangeContractAddress,
|
||||
@@ -435,13 +435,13 @@ async function shouldUseExchangeBalance(
|
||||
provider
|
||||
);
|
||||
|
||||
if (walletBalance + exchangeBalance < amount) {
|
||||
throw new Error(
|
||||
`Not enough balance to make swap, totalBalance - ${
|
||||
walletBalance + exchangeBalance
|
||||
} swapAmount - ${amount}`
|
||||
);
|
||||
}
|
||||
// if (walletBalance + exchangeBalance < amount) {
|
||||
// throw new Error(
|
||||
// `Not enough balance to make swap, totalBalance - ${
|
||||
// walletBalance + exchangeBalance
|
||||
// } swapAmount - ${amount}`
|
||||
// );
|
||||
// }
|
||||
let useExchangeBalance = true;
|
||||
let additionalTransferAmount = 0n;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user