@pear-protocol/hyperliquid-sdk 0.0.69 → 0.0.70-beta

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1389,20 +1389,20 @@ const useTokenSelectionMetadataStore = create((set) => ({
1389
1389
  });
1390
1390
  return totalFunding;
1391
1391
  })();
1392
- // Max leverage (minimum across all tokens)
1392
+ // Max leverage (maximum across all tokens)
1393
1393
  const maxLeverage = (() => {
1394
1394
  if (!perpMetaAssets)
1395
1395
  return 0;
1396
1396
  const allTokenSymbols = [...longTokens, ...shortTokens].map((t) => t.symbol);
1397
1397
  if (allTokenSymbols.length === 0)
1398
1398
  return 0;
1399
- let minLev = Infinity;
1399
+ let maxLev = 0;
1400
1400
  allTokenSymbols.forEach((symbol) => {
1401
1401
  const tokenUniverse = perpMetaAssets.find((u) => u.name === symbol);
1402
1402
  if (tokenUniverse === null || tokenUniverse === void 0 ? void 0 : tokenUniverse.maxLeverage)
1403
- minLev = Math.min(minLev, tokenUniverse.maxLeverage);
1403
+ maxLev = Math.max(maxLev, tokenUniverse.maxLeverage);
1404
1404
  });
1405
- return minLev === Infinity ? 0 : minLev;
1405
+ return maxLev;
1406
1406
  })();
1407
1407
  // Min margin (10 * total number of tokens)
1408
1408
  const minMargin = (() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/hyperliquid-sdk",
3
- "version": "0.0.69",
3
+ "version": "0.0.70-beta",
4
4
  "description": "React SDK for Pear Protocol Hyperliquid API integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",