@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.
- package/dist/index.js +2 -1
- 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
|
};
|