@pear-protocol/hyperliquid-sdk 0.1.3 → 0.1.4

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 +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1453,8 +1453,9 @@ const getAssetByName = (tokenMetadata, symbol) => {
1453
1453
  * Hook to access webData
1454
1454
  */
1455
1455
  const useMarket = () => {
1456
+ const supportedMarkets = ['USDT', 'USDT0', 'USDC', 'USDH'];
1456
1457
  const tokenMetadata = useHyperliquidData((state) => state.tokenMetadata);
1457
- const allTokenMetadata = useMemo(() => Object.values(tokenMetadata).filter((metadata) => Boolean(metadata)), [tokenMetadata]);
1458
+ const allTokenMetadata = useMemo(() => Object.values(tokenMetadata).filter((metadata) => Boolean(metadata)).filter((token) => { var _a; return supportedMarkets.includes((_a = token.collateralToken) !== null && _a !== void 0 ? _a : ''); }), [tokenMetadata]);
1458
1459
  const getAssetByName$1 = useCallback((symbol) => getAssetByName(tokenMetadata, symbol), [tokenMetadata]);
1459
1460
  return { allTokenMetadata, getAssetByName: getAssetByName$1 };
1460
1461
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/hyperliquid-sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "React SDK for Pear Protocol Hyperliquid API integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",