@ape.swap/bonds-sdk 3.0.94 → 3.0.95
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 +4 -4
- package/dist/state/useSDKConfig.d.ts +3 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -58353,7 +58353,7 @@ const stagingUrls = {
|
|
|
58353
58353
|
};
|
|
58354
58354
|
const useSDKConfig = (config) => {
|
|
58355
58355
|
const urls = process.env.NODE_ENV === 'production' ? defaultUrls : stagingUrls;
|
|
58356
|
-
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], useHotBonds: true, useRainbowKit: false, useTiers: false, useTGEBonds: false, showLowValueBonds: false, bondPartner: undefined }, config), { urls: Object.assign(Object.assign({}, urls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.1.3' });
|
|
58356
|
+
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], hotBondChains: [types.ChainId.BSC, types.ChainId.MATIC], useHotBonds: true, useRainbowKit: false, useTiers: false, useTGEBonds: false, showLowValueBonds: false, bondPartner: undefined }, config), { urls: Object.assign(Object.assign({}, urls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.1.3' });
|
|
58357
58357
|
const { data } = useQuery({
|
|
58358
58358
|
queryKey: [QUERY_KEYS.SDK_CONFIG],
|
|
58359
58359
|
initialData,
|
|
@@ -78675,7 +78675,7 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
|
78675
78675
|
height: '30px',
|
|
78676
78676
|
mb: ['10px', '10px', '10px', '0px'],
|
|
78677
78677
|
justifyContent: ['space-between', 'space-between', 'space-between', 'flex-end'],
|
|
78678
|
-
}, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text" }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsx$2(Flex, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_b = bondData.showcaseTokenName) !== null && _b !== void 0 ? _b : bondData.earnToken.symbol, size: 50, chain: bondData.chainId }) }), jsxs(Flex, { className: "title-container bondname", children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_c = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _c === void 0 ? void 0 : _c[0] })] }), jsxs(Flex, { className: "title-container price-container", sx: { flexDirection: 'column', pl: '20px' }, children: [jsxs(Flex, { className: "price-container price", children: ["$", earnTokenPrice(bondData)] }), SDKConfig.useTiers ? (jsxs(Flex, { sx: {
|
|
78678
|
+
}, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text" }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsx$2(Flex, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_b = bondData.showcaseTokenName) !== null && _b !== void 0 ? _b : bondData.earnToken.symbol, size: 50, chain: bondData.chainId }) }), jsxs(Flex, { className: "title-container bondname", children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_c = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _c === void 0 ? void 0 : _c[0] })] }), jsxs(Flex, { className: "title-container price-container", sx: { flexDirection: 'column', pl: '20px' }, children: [jsxs(Flex, { className: "price-container price", children: ["$", earnTokenPrice(bondData)] }), SDKConfig.useTiers && bondData.billVersion === types.BillVersion.V4 ? (jsxs(Flex, { sx: {
|
|
78679
78679
|
p: '3px 6px',
|
|
78680
78680
|
border: '1px solid var(--theme-ui-colors-primaryButton)',
|
|
78681
78681
|
borderRadius: 'normal',
|
|
@@ -80193,8 +80193,8 @@ const BondRowsByChain = ({ bonds, hideTitles }) => {
|
|
|
80193
80193
|
return acc;
|
|
80194
80194
|
}, {});
|
|
80195
80195
|
return (jsx$2(Flex$1, { className: "bondrowsbychain", children: validatedChains === null || validatedChains === void 0 ? void 0 : validatedChains.map((chain) => {
|
|
80196
|
-
var _a;
|
|
80197
|
-
return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: (_a = groupedBonds[chain]) !== null && _a !== void 0 ? _a : [], showHotBonds: hideTitles ? false : SDKConfig.useHotBonds ?
|
|
80196
|
+
var _a, _b;
|
|
80197
|
+
return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: (_a = groupedBonds[chain]) !== null && _a !== void 0 ? _a : [], showHotBonds: hideTitles ? false : SDKConfig.useHotBonds ? (_b = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.hotBondChains) === null || _b === void 0 ? void 0 : _b.includes(chain) : false }, chain));
|
|
80198
80198
|
}) }));
|
|
80199
80199
|
};
|
|
80200
80200
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface SDKPropsDTO {
|
|
2
2
|
referenceId: string;
|
|
3
3
|
chains: number[];
|
|
4
|
+
hotBondChains?: number[];
|
|
4
5
|
useRainbowKit?: boolean;
|
|
5
6
|
useHotBonds?: boolean;
|
|
6
7
|
useTiers?: boolean;
|
|
@@ -14,6 +15,7 @@ export interface SDKPropsDTO {
|
|
|
14
15
|
export interface SDKProps {
|
|
15
16
|
referenceId: string;
|
|
16
17
|
chains: number[];
|
|
18
|
+
hotBondChains: number[];
|
|
17
19
|
useRainbowKit: boolean;
|
|
18
20
|
useHotBonds: boolean;
|
|
19
21
|
useTiers: boolean;
|
|
@@ -21,7 +23,7 @@ export interface SDKProps {
|
|
|
21
23
|
showLowValueBonds: boolean;
|
|
22
24
|
bondPartner?: string;
|
|
23
25
|
urls: Record<URLKeys, string>;
|
|
24
|
-
theme
|
|
26
|
+
theme?: any;
|
|
25
27
|
highestCompatibleVersion?: string;
|
|
26
28
|
}
|
|
27
29
|
export declare const useSDKConfig: (config?: SDKPropsDTO) => SDKProps;
|