@orderly.network/hooks 2.0.2 → 2.0.3
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -33,9 +33,9 @@ var __export = (target, all) => {
|
|
|
33
33
|
// src/version.ts
|
|
34
34
|
if (typeof window !== "undefined") {
|
|
35
35
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
36
|
-
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.0.
|
|
36
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.0.3";
|
|
37
37
|
}
|
|
38
|
-
var version_default = "2.0.
|
|
38
|
+
var version_default = "2.0.3";
|
|
39
39
|
var fetcher = (url, init2 = {}, queryOptions) => get(url, init2, queryOptions?.formatter);
|
|
40
40
|
var OrderlyContext = createContext({
|
|
41
41
|
// configStore: new MemoryConfigStore(),
|
|
@@ -6881,10 +6881,17 @@ function totalInputHandle(inputs) {
|
|
|
6881
6881
|
values2.total = total.toString();
|
|
6882
6882
|
}
|
|
6883
6883
|
const quantity = total.div(price);
|
|
6884
|
+
let order_quantity = quantity.toDecimalPlaces(Math.min(config.base_dp, quantity.dp())).toString();
|
|
6885
|
+
if (config.base_tick >= 1) {
|
|
6886
|
+
order_quantity = formatNumber(
|
|
6887
|
+
order_quantity,
|
|
6888
|
+
new Decimal(config?.base_tick || "0").toNumber()
|
|
6889
|
+
);
|
|
6890
|
+
}
|
|
6884
6891
|
return [
|
|
6885
6892
|
{
|
|
6886
6893
|
...values2,
|
|
6887
|
-
order_quantity
|
|
6894
|
+
order_quantity
|
|
6888
6895
|
},
|
|
6889
6896
|
input,
|
|
6890
6897
|
value,
|