@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 CHANGED
@@ -1120,10 +1120,16 @@ var usePositionStream = (symbol, options) => {
1120
1120
  const total = totalCollateral.toNumber();
1121
1121
  return formatedPositions[0].filter((item) => item.position_qty !== 0).map((item) => {
1122
1122
  const info = symbolInfo == null ? void 0 : symbolInfo[item.symbol];
1123
+ console.log(
1124
+ "info -------",
1125
+ info("base"),
1126
+ accountInfo.imr_factor,
1127
+ accountInfo.imr_factor[info("base")]
1128
+ );
1123
1129
  const MMR = futures.positions.MMR({
1124
1130
  baseMMR: info("base_mmr"),
1125
1131
  baseIMR: info("base_imr"),
1126
- IMRFactor: accountInfo.imr_factor[item.symbol],
1132
+ IMRFactor: accountInfo.imr_factor[info("base")],
1127
1133
  positionNotional: item.notional,
1128
1134
  IMR_factor_power: 4 / 5
1129
1135
  });
@@ -2031,7 +2037,6 @@ var useDeposit = () => {
2031
2037
  }), [state]);
2032
2038
  const fetchAllowance = React2.useCallback(() => __async(void 0, null, function* () {
2033
2039
  const allowance2 = yield account5.assetsManager.getAllowance();
2034
- console.log("----- refresh allowance -----", allowance2);
2035
2040
  setAllowance(() => allowance2);
2036
2041
  return allowance2;
2037
2042
  }), []);