@pear-protocol/symmio-client 0.2.43 → 0.2.45
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/react/index.mjs
CHANGED
|
@@ -671,7 +671,7 @@ function clearCachedToken(address, chainId) {
|
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
async function fetchAccessTokenEntry(walletClient, signerAddress, accountAddress, chainId, domain) {
|
|
674
|
-
const resolvedDomain = domain ?? (typeof window !== "undefined" ? window.location.
|
|
674
|
+
const resolvedDomain = domain ?? (typeof window !== "undefined" ? window.location.hostname : "localhost");
|
|
675
675
|
const hedgerLoginUrl = new URL("login", getHedgerBaseUrl(chainId)).href;
|
|
676
676
|
const nonce = await getNonce(chainId, accountAddress);
|
|
677
677
|
const { message, issuedAt, expirationTime } = createSiweMessage({
|
|
@@ -723,7 +723,7 @@ var symmKeys = {
|
|
|
723
723
|
twapOrders: (address, chainId) => ["symm", "twapOrders", address, chainId],
|
|
724
724
|
triggerOrders: (params) => ["symm", "triggerOrders", params],
|
|
725
725
|
triggerConfig: (orderId) => ["symm", "triggerConfig", orderId],
|
|
726
|
-
markets: (chainId, search) => ["symm", "markets", chainId, search],
|
|
726
|
+
markets: (chainId, search, pageSize) => ["symm", "markets", chainId, search, pageSize],
|
|
727
727
|
hedgerMarketById: (id, chainId) => ["symm", "hedgerMarketById", id, chainId],
|
|
728
728
|
hedgerMarketBySymbol: (symbol, chainId) => ["symm", "hedgerMarketBySymbol", symbol, chainId],
|
|
729
729
|
lockedParams: (marketName, leverage, chainId) => ["symm", "lockedParams", marketName, leverage, chainId],
|
|
@@ -25688,15 +25688,16 @@ function useSymmMarkets(params) {
|
|
|
25688
25688
|
const { symmCoreClient, chainId: ctxChainId } = useSymmContext();
|
|
25689
25689
|
const chainId = params?.chainId ?? ctxChainId;
|
|
25690
25690
|
const searchText = params?.searchText;
|
|
25691
|
+
const pageSize = String(params?.pageSize ?? 100);
|
|
25691
25692
|
const internalEnabled = !!symmCoreClient;
|
|
25692
25693
|
return useQuery({
|
|
25693
25694
|
...params?.query,
|
|
25694
|
-
queryKey: symmKeys.markets(chainId, searchText),
|
|
25695
|
+
queryKey: symmKeys.markets(chainId, searchText, pageSize),
|
|
25695
25696
|
queryFn: () => {
|
|
25696
25697
|
if (searchText) {
|
|
25697
25698
|
return symmCoreClient.markets.search(searchText, { chainId });
|
|
25698
25699
|
}
|
|
25699
|
-
return symmCoreClient.markets.list({ pageSize
|
|
25700
|
+
return symmCoreClient.markets.list({ pageSize, chainId });
|
|
25700
25701
|
},
|
|
25701
25702
|
enabled: internalEnabled && (params?.query?.enabled ?? true)
|
|
25702
25703
|
});
|