@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.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -60,9 +60,9 @@ var __export = (target, all) => {
|
|
|
60
60
|
// src/version.ts
|
|
61
61
|
if (typeof window !== "undefined") {
|
|
62
62
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
63
|
-
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.0.
|
|
63
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.0.3";
|
|
64
64
|
}
|
|
65
|
-
var version_default = "2.0.
|
|
65
|
+
var version_default = "2.0.3";
|
|
66
66
|
var fetcher = (url, init2 = {}, queryOptions) => net.get(url, init2, queryOptions?.formatter);
|
|
67
67
|
var OrderlyContext = React.createContext({
|
|
68
68
|
// configStore: new MemoryConfigStore(),
|
|
@@ -6908,10 +6908,17 @@ function totalInputHandle(inputs) {
|
|
|
6908
6908
|
values2.total = total.toString();
|
|
6909
6909
|
}
|
|
6910
6910
|
const quantity = total.div(price);
|
|
6911
|
+
let order_quantity = quantity.toDecimalPlaces(Math.min(config.base_dp, quantity.dp())).toString();
|
|
6912
|
+
if (config.base_tick >= 1) {
|
|
6913
|
+
order_quantity = formatNumber(
|
|
6914
|
+
order_quantity,
|
|
6915
|
+
new utils.Decimal(config?.base_tick || "0").toNumber()
|
|
6916
|
+
);
|
|
6917
|
+
}
|
|
6911
6918
|
return [
|
|
6912
6919
|
{
|
|
6913
6920
|
...values2,
|
|
6914
|
-
order_quantity
|
|
6921
|
+
order_quantity
|
|
6915
6922
|
},
|
|
6916
6923
|
input,
|
|
6917
6924
|
value,
|