@goodaofi/bonds-sdk 3.0.165 → 3.0.166
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/main.js +9 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { forwardRef, useContext, useState, useLayoutEffect, useEffect, useCallback, useMemo, createContext as createContext$1, useRef, useId, useInsertionEffect as useInsertionEffect$1, Children, isValidElement, Fragment as Fragment$1, createElement as createElement$1, Component } from 'react';
|
|
3
3
|
import { useAccount, useWaitForTransactionReceipt, useChainId, useSwitchChain, useWriteContract, useSendTransaction } from 'wagmi';
|
|
4
|
-
import {
|
|
4
|
+
import { useQueryClient, useQuery, useMutation } from '@tanstack/react-query';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { ConnectButton as ConnectButton$1 } from '@rainbow-me/rainbowkit';
|
|
7
7
|
|
|
@@ -59178,6 +59178,7 @@ const stagingUrls = {
|
|
|
59178
59178
|
mainUrl: 'https://staging.ape.bond',
|
|
59179
59179
|
};
|
|
59180
59180
|
const useSDKConfig = (config) => {
|
|
59181
|
+
const queryClient = useQueryClient();
|
|
59181
59182
|
const urls = process.env.NODE_ENV === 'production' ? defaultUrls : stagingUrls;
|
|
59182
59183
|
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], hotBondChains: [main.ChainId.BSC, main.ChainId.MATIC], useHotBonds: true, useRainbowKit: false, useTiers: false, useTGEBonds: false, showLowValueBonds: false, bondPartner: undefined, namingPreference: 'Bonus', privatePartnerName: '' }, config), { urls: Object.assign(Object.assign({}, urls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.1.3' });
|
|
59183
59184
|
const { data } = useQuery({
|
|
@@ -59187,6 +59188,11 @@ const useSDKConfig = (config) => {
|
|
|
59187
59188
|
},
|
|
59188
59189
|
initialData,
|
|
59189
59190
|
});
|
|
59191
|
+
useEffect(() => {
|
|
59192
|
+
if (!config)
|
|
59193
|
+
return;
|
|
59194
|
+
queryClient.setQueryData([QUERY_KEYS.SDK_CONFIG], initialData);
|
|
59195
|
+
}, [queryClient, config, initialData]);
|
|
59190
59196
|
return data;
|
|
59191
59197
|
};
|
|
59192
59198
|
const useURLByEnvironment = (key) => {
|
|
@@ -81410,7 +81416,9 @@ const Bonds = () => {
|
|
|
81410
81416
|
sortedBonds,
|
|
81411
81417
|
searchQuery,
|
|
81412
81418
|
SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.useTiers,
|
|
81419
|
+
SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.bondPartner,
|
|
81413
81420
|
SDKConfig.highestCompatibleVersion,
|
|
81421
|
+
SDKConfig.showLowValueBonds,
|
|
81414
81422
|
topTags,
|
|
81415
81423
|
chainFilterOption,
|
|
81416
81424
|
favTokens,
|