mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
Merge branch 'main' into get-referral-data
This commit is contained in:
@@ -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}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user