@orbs-network/twap 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/lib.js +3 -2
- package/package.json +1 -1
package/dist/src/lib.js
CHANGED
|
@@ -120,8 +120,9 @@ class TWAPLib {
|
|
|
120
120
|
return TokensValidation.valid;
|
|
121
121
|
}
|
|
122
122
|
validateOrderInputs(srcToken, dstToken, srcAmount, srcChunkAmount, dstMinChunkAmountOut, deadline, fillDelaySeconds, srcUsd) {
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
const tokensValidation = this.validateTokens(srcToken, dstToken);
|
|
124
|
+
if ((tokensValidation === TokensValidation.dstTokenZero && dstToken.address !== web3_candies_1.zeroAddress) ||
|
|
125
|
+
(tokensValidation !== TokensValidation.valid && tokensValidation !== TokensValidation.dstTokenZero))
|
|
125
126
|
return OrderInputValidation.invalidTokens;
|
|
126
127
|
if ((0, bignumber_js_1.default)(srcAmount).lte(0))
|
|
127
128
|
return OrderInputValidation.invalidSrcAmount;
|