@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.
Files changed (2) hide show
  1. package/dist/main.js +9 -1
  2. 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 { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
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,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Goo Money Bond SDK",
4
4
  "author": "Goo Money",
5
5
  "license": "MIT",
6
- "version": "3.0.165",
6
+ "version": "3.0.166",
7
7
  "proxy": "https://realtime-api-pr-99.herokuapp.com",
8
8
  "module": "dist/main.js",
9
9
  "type": "module",