@orderly.network/hooks 0.0.46 → 0.0.48
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 +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1114,7 +1114,7 @@ var usePositionStream = (symbol, options) => {
|
|
|
1114
1114
|
const MMR = positions.MMR({
|
|
1115
1115
|
baseMMR: info("base_mmr"),
|
|
1116
1116
|
baseIMR: info("base_imr"),
|
|
1117
|
-
IMRFactor: accountInfo.imr_factor[
|
|
1117
|
+
IMRFactor: accountInfo.imr_factor[item.symbol],
|
|
1118
1118
|
positionNotional: item.notional,
|
|
1119
1119
|
IMR_factor_power: 4 / 5
|
|
1120
1120
|
});
|
|
@@ -2035,7 +2035,9 @@ var useDeposit = () => {
|
|
|
2035
2035
|
const approve = useCallback(
|
|
2036
2036
|
(amount) => {
|
|
2037
2037
|
return account5.assetsManager.approve(amount).then((result) => {
|
|
2038
|
-
|
|
2038
|
+
if (typeof amount !== "undefined") {
|
|
2039
|
+
setAllowance((value) => new Decimal(value).add(amount).toString());
|
|
2040
|
+
}
|
|
2039
2041
|
return result;
|
|
2040
2042
|
});
|
|
2041
2043
|
},
|