@orbs-network/twap 1.7.3 → 1.7.4
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 +1 -1
- package/package.json +1 -1
package/dist/src/lib.js
CHANGED
|
@@ -138,7 +138,7 @@ class TWAPLib {
|
|
|
138
138
|
const smallestChunkSize = (0, bignumber_js_1.default)(srcAmount).mod(srcChunkAmount).gt(0)
|
|
139
139
|
? (0, bignumber_js_1.default)(srcAmount).mod(srcChunkAmount)
|
|
140
140
|
: (0, bignumber_js_1.default)(srcChunkAmount);
|
|
141
|
-
if (smallestChunkSize.times(srcUsd).lt(this.config.minChunkSizeUsd))
|
|
141
|
+
if (smallestChunkSize.times(srcUsd).lt((0, bignumber_js_1.default)(this.config.minChunkSizeUsd).times((0, bignumber_js_1.default)(10).pow(srcToken.decimals))))
|
|
142
142
|
return OrderInputValidation.invalidSmallestSrcChunkUsd;
|
|
143
143
|
return OrderInputValidation.valid;
|
|
144
144
|
}
|