@orderly.network/hooks 0.0.94 → 0.0.95
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -666,7 +666,7 @@ var reduceItems = (depth, level, data, asks = false) => {
|
|
|
666
666
|
} else {
|
|
667
667
|
priceKey = new utils.Decimal(Math.floor(price / depth)).mul(depth).toNumber();
|
|
668
668
|
}
|
|
669
|
-
if (depth < 1 && depth > 0) {
|
|
669
|
+
if (depth < 1 && depth > 0 && priceKey.toString().indexOf(".") !== -1) {
|
|
670
670
|
const priceStr = price.toString();
|
|
671
671
|
const index = priceStr.indexOf(".");
|
|
672
672
|
const decimal = priceStr.slice(index + 1);
|