@orderly.network/hooks 0.0.49 → 0.0.51
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 +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1111,10 +1111,16 @@ var usePositionStream = (symbol, options) => {
|
|
|
1111
1111
|
const total = totalCollateral.toNumber();
|
|
1112
1112
|
return formatedPositions[0].filter((item) => item.position_qty !== 0).map((item) => {
|
|
1113
1113
|
const info = symbolInfo == null ? void 0 : symbolInfo[item.symbol];
|
|
1114
|
+
console.log(
|
|
1115
|
+
"info -------",
|
|
1116
|
+
info("base"),
|
|
1117
|
+
accountInfo.imr_factor,
|
|
1118
|
+
accountInfo.imr_factor[info("base")]
|
|
1119
|
+
);
|
|
1114
1120
|
const MMR = positions.MMR({
|
|
1115
1121
|
baseMMR: info("base_mmr"),
|
|
1116
1122
|
baseIMR: info("base_imr"),
|
|
1117
|
-
IMRFactor: accountInfo.imr_factor[
|
|
1123
|
+
IMRFactor: accountInfo.imr_factor[info("base")],
|
|
1118
1124
|
positionNotional: item.notional,
|
|
1119
1125
|
IMR_factor_power: 4 / 5
|
|
1120
1126
|
});
|
|
@@ -2022,7 +2028,6 @@ var useDeposit = () => {
|
|
|
2022
2028
|
}), [state]);
|
|
2023
2029
|
const fetchAllowance = useCallback(() => __async(void 0, null, function* () {
|
|
2024
2030
|
const allowance2 = yield account5.assetsManager.getAllowance();
|
|
2025
|
-
console.log("----- refresh allowance -----", allowance2);
|
|
2026
2031
|
setAllowance(() => allowance2);
|
|
2027
2032
|
return allowance2;
|
|
2028
2033
|
}), []);
|