@ape.swap/bonds-sdk 5.0.4 → 5.0.7-test.0
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
CHANGED
|
@@ -46977,6 +46977,7 @@ const useSDKConfig = (config) => {
|
|
|
46977
46977
|
throw new Error('Just a hotfix for latest versions of react-query that make queryFn a required prop');
|
|
46978
46978
|
},
|
|
46979
46979
|
initialData,
|
|
46980
|
+
enabled: typeof window !== 'undefined',
|
|
46980
46981
|
});
|
|
46981
46982
|
return data;
|
|
46982
46983
|
};
|
|
@@ -47108,6 +47109,7 @@ function useTierPoints() {
|
|
|
47108
47109
|
queryFn: () => fetchUserPoints(account, SDKConfig.useTiers, apiUrl),
|
|
47109
47110
|
refetchInterval: 120000, // i.e. 2 mins
|
|
47110
47111
|
refetchOnWindowFocus: false,
|
|
47112
|
+
enabled: typeof window !== 'undefined',
|
|
47111
47113
|
});
|
|
47112
47114
|
}
|
|
47113
47115
|
|
|
@@ -47485,6 +47487,7 @@ function useBondsList() {
|
|
|
47485
47487
|
staleTime: Infinity,
|
|
47486
47488
|
refetchInterval: 300000, // 5 min
|
|
47487
47489
|
refetchOnWindowFocus: false,
|
|
47490
|
+
enabled: typeof window !== 'undefined',
|
|
47488
47491
|
});
|
|
47489
47492
|
}
|
|
47490
47493
|
const getBondsList = async (queryClient) => {
|
|
@@ -48741,6 +48744,7 @@ function useTokenPrices() {
|
|
|
48741
48744
|
refetchInterval: 30000, // 30 sec
|
|
48742
48745
|
refetchOnMount: false,
|
|
48743
48746
|
refetchOnWindowFocus: false,
|
|
48747
|
+
enabled: typeof window !== 'undefined',
|
|
48744
48748
|
});
|
|
48745
48749
|
}
|
|
48746
48750
|
const getTokenPrices = async (priceApi, apiv2) => {
|
|
@@ -49163,7 +49167,7 @@ function useUserBonds() {
|
|
|
49163
49167
|
return useQuery({
|
|
49164
49168
|
queryKey: [QUERY_KEYS.USER_BONDS, address, publicKey, (_b = (_a = Object.keys(tokenPrices !== null && tokenPrices !== void 0 ? tokenPrices : {})) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : null],
|
|
49165
49169
|
queryFn: () => getUserBonds(address, solanaAccount, bondList, queryClient),
|
|
49166
|
-
enabled: !!bondList && !!(address || solanaAccount) && !!tokenPrices,
|
|
49170
|
+
enabled: !!bondList && !!(address || solanaAccount) && !!tokenPrices && typeof window !== 'undefined',
|
|
49167
49171
|
refetchInterval: 120000,
|
|
49168
49172
|
refetchOnWindowFocus: false,
|
|
49169
49173
|
refetchOnMount: false,
|
|
@@ -49318,6 +49322,7 @@ function useChainFilterOption() {
|
|
|
49318
49322
|
queryKey: [`${QUERY_KEYS.CHAIN_FILTER_OPTION}`],
|
|
49319
49323
|
queryFn: () => cookie,
|
|
49320
49324
|
initialData: cookie,
|
|
49325
|
+
enabled: typeof window !== 'undefined',
|
|
49321
49326
|
});
|
|
49322
49327
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49323
49328
|
const urlParams = typeof window !== 'undefined' ? new URLSearchParams(window.location.search) : null;
|
|
@@ -52275,6 +52280,7 @@ const usePopups = () => {
|
|
|
52275
52280
|
throw new Error('Just a hotfix for latest versions of react-query that make queryFn a required prop');
|
|
52276
52281
|
},
|
|
52277
52282
|
initialData: [],
|
|
52283
|
+
enabled: typeof window !== 'undefined',
|
|
52278
52284
|
});
|
|
52279
52285
|
const queryClient = useQueryClient();
|
|
52280
52286
|
const addPopup = useCallback((newPopup) => {
|
|
@@ -53591,6 +53597,7 @@ function useFavoriteTokens() {
|
|
|
53591
53597
|
queryKey: [QUERY_KEYS.FAVORITE_TOKENS],
|
|
53592
53598
|
queryFn: () => cookie,
|
|
53593
53599
|
initialData: cookie,
|
|
53600
|
+
enabled: typeof window !== 'undefined',
|
|
53594
53601
|
});
|
|
53595
53602
|
const queryClient = useQueryClient();
|
|
53596
53603
|
const addFavToken = useCallback((newValue) => {
|
|
@@ -53781,6 +53788,7 @@ function useGetBondRecommendations(user, contract, limit = '3') {
|
|
|
53781
53788
|
staleTime: Infinity,
|
|
53782
53789
|
refetchOnWindowFocus: false,
|
|
53783
53790
|
refetchOnMount: false,
|
|
53791
|
+
enabled: typeof window !== 'undefined',
|
|
53784
53792
|
});
|
|
53785
53793
|
}
|
|
53786
53794
|
|
|
@@ -56192,6 +56200,7 @@ function useBondsListPreTGE() {
|
|
|
56192
56200
|
staleTime: Infinity,
|
|
56193
56201
|
refetchInterval: 300000, // 5 min
|
|
56194
56202
|
refetchOnWindowFocus: false,
|
|
56203
|
+
enabled: typeof window !== 'undefined',
|
|
56195
56204
|
});
|
|
56196
56205
|
}
|
|
56197
56206
|
const getPreTGEList = async (apiRealTimeURL, apiUrl) => {
|
|
@@ -59217,7 +59226,7 @@ function useBondsData() {
|
|
|
59217
59226
|
queryKey: [QUERY_KEYS.BONDS_DATA, bondList === null || bondList === void 0 ? void 0 : bondList.length, preTGEList === null || preTGEList === void 0 ? void 0 : preTGEList.length],
|
|
59218
59227
|
queryFn: () => calculateBondsData(queryClient),
|
|
59219
59228
|
refetchInterval: 25000, // i.e. 25 sec
|
|
59220
|
-
enabled: !!bondList && !!preTGEList,
|
|
59229
|
+
enabled: !!bondList && !!preTGEList && typeof window !== 'undefined',
|
|
59221
59230
|
refetchOnWindowFocus: true,
|
|
59222
59231
|
refetchOnMount: false,
|
|
59223
59232
|
refetchOnReconnect: true,
|
|
@@ -59700,8 +59709,8 @@ const styles$a = {
|
|
|
59700
59709
|
},
|
|
59701
59710
|
};
|
|
59702
59711
|
|
|
59703
|
-
const ButtonsRow = ({ projectLink, twitter, earnTokenContract, cgId }) => {
|
|
59704
|
-
const dexscreenerURL = earnTokenContract ? `https://dexscreener.com/search?q=${earnTokenContract}` : undefined;
|
|
59712
|
+
const ButtonsRow = ({ projectLink, twitter, earnTokenContract, cgId, dexscreener }) => {
|
|
59713
|
+
const dexscreenerURL = dexscreener || (earnTokenContract ? `https://dexscreener.com/search?q=${earnTokenContract}` : undefined);
|
|
59705
59714
|
const coingeckoURL = cgId ? `https://www.coingecko.com/en/coins/${cgId}` : undefined;
|
|
59706
59715
|
return (jsxs(Flex, { sx: { justifyContent: 'center' }, children: [jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: projectLink, target: "_blank", children: jsx$2(Svg, { icon: "URL", width: 18 }) }), jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: twitter, target: "_blank", children: jsx$2(Svg, { icon: "twitter", width: 18, color: "text" }) }), dexscreenerURL && (jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: dexscreenerURL, target: "_blank", children: jsx$2(Svg, { icon: "dexscreener", width: 18, color: "text" }) })), coingeckoURL && (jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: coingeckoURL, target: "_blank", children: jsx$2(Svg, { icon: "coingecko", width: 18, color: "text" }) }))] }));
|
|
59707
59716
|
};
|
|
@@ -59723,7 +59732,7 @@ const ExpandedViewButton = ({ handleNavigation, rightPos }) => {
|
|
|
59723
59732
|
}, onClick: handleNavigation, children: ["Project Info", jsx$2(Flex, { sx: { ml: '4px' }, children: jsx$2(Svg, { icon: "expand", width: 20, color: "white" }) })] }) }));
|
|
59724
59733
|
};
|
|
59725
59734
|
|
|
59726
|
-
const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, projectLink, twitter, chain, isSoldOut = false, billType, cgId, }) => {
|
|
59735
|
+
const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, projectLink, twitter, chain, isSoldOut = false, billType, cgId, dexscreener, }) => {
|
|
59727
59736
|
const config = useSDKConfig();
|
|
59728
59737
|
const explorerLink = BLOCK_EXPLORER[chain];
|
|
59729
59738
|
const urlPage = chain === main.ChainId.SOL ? 'account' : 'address';
|
|
@@ -59742,11 +59751,11 @@ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, pro
|
|
|
59742
59751
|
},
|
|
59743
59752
|
});
|
|
59744
59753
|
};
|
|
59745
|
-
return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, earnTokenContract: earnTokenContract, cgId: cgId }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && billType !== 'fcfs' && (jsx$2(Flex, { sx: { width: '100%', my: '5px', justifyContent: 'center', position: 'relative', height: '25px' }, children: jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation, rightPos: '-5px' }) })), jsx$2(Flex, { sx: { justifyContent: 'center' }, children: jsxs(Flex, { sx: { width: '144px', flexDirection: 'column' }, children: [jsx$2(Flex, { sx: styles$a.linkRow, children: tokenLink && (jsxs(Link, { href: tokenLink, sx: styles$a.link, target: "_blank", children: ["View Token Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: bondLink && (jsxs(Link, { href: bondLink, sx: styles$a.link, target: "_blank", children: ["View Bond Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: billType !== 'fcfs' && (jsxs(Link, { href: bondDashboard, sx: styles$a.link, target: "_blank", rel: "noopener noreferrer", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
|
|
59754
|
+
return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, earnTokenContract: earnTokenContract, cgId: cgId, dexscreener: dexscreener }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && billType !== 'fcfs' && (jsx$2(Flex, { sx: { width: '100%', my: '5px', justifyContent: 'center', position: 'relative', height: '25px' }, children: jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation, rightPos: '-5px' }) })), jsx$2(Flex, { sx: { justifyContent: 'center' }, children: jsxs(Flex, { sx: { width: '144px', flexDirection: 'column' }, children: [jsx$2(Flex, { sx: styles$a.linkRow, children: tokenLink && (jsxs(Link, { href: tokenLink, sx: styles$a.link, target: "_blank", children: ["View Token Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: bondLink && (jsxs(Link, { href: bondLink, sx: styles$a.link, target: "_blank", children: ["View Bond Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: billType !== 'fcfs' && (jsxs(Link, { href: bondDashboard, sx: styles$a.link, target: "_blank", rel: "noopener noreferrer", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
|
|
59746
59755
|
};
|
|
59747
59756
|
|
|
59748
59757
|
const UserBondRow = ({ bill }) => {
|
|
59749
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
59758
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
59750
59759
|
// Hooks
|
|
59751
59760
|
const userChainId = useChainId();
|
|
59752
59761
|
const SDKConfig = useSDKConfig();
|
|
@@ -59828,7 +59837,7 @@ const UserBondRow = ({ bill }) => {
|
|
|
59828
59837
|
}
|
|
59829
59838
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
59830
59839
|
}, [isConfirmed]);
|
|
59831
|
-
return (jsxs("div", { className: "your-bonds", onClick: onOpenPurchasedBond, children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_g = (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.earnToken) === null || _g === void 0 ? void 0 : _g.symbol, chain: (_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.chainId, tag: (_k = (_j = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _j === void 0 ? void 0 : _j.tags) === null || _k === void 0 ? void 0 : _k[0], vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.earnToken.symbol) || '', bondContract: (_o = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _o !== void 0 ? _o : '', projectLink: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.projectLink, twitter: (_q = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _q === void 0 ? void 0 : _q.twitter, chain: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.chainId, cgId: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
|
|
59840
|
+
return (jsxs("div", { className: "your-bonds", onClick: onOpenPurchasedBond, children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_g = (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.earnToken) === null || _g === void 0 ? void 0 : _g.symbol, chain: (_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.chainId, tag: (_k = (_j = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _j === void 0 ? void 0 : _j.tags) === null || _k === void 0 ? void 0 : _k[0], vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.earnToken.symbol) || '', bondContract: (_o = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _o !== void 0 ? _o : '', projectLink: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.projectLink, twitter: (_q = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _q === void 0 ? void 0 : _q.twitter, chain: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.chainId, cgId: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.cgId, dexscreener: (_t = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _t === void 0 ? void 0 : _t.dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
|
|
59832
59841
|
opacity: 0.8,
|
|
59833
59842
|
}, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [jsx$2(Flex$1, { sx: { width: '125px' }, children: jsx$2(ProfitCard, { userBond: bill }) }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Claimable" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(claimable(bill), 3), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(claimable(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Pending" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(pending(bill), 3), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(pending(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsx$2("div", { className: "your-bonds-content hide-mobile", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(bill) }), style: {
|
|
59834
59843
|
width: '127px',
|
|
@@ -59849,7 +59858,7 @@ const UserBondRow = ({ bill }) => {
|
|
|
59849
59858
|
};
|
|
59850
59859
|
|
|
59851
59860
|
const UserBondRowSolana = ({ bill }) => {
|
|
59852
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
59861
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
59853
59862
|
// Hooks
|
|
59854
59863
|
const SDKConfig = useSDKConfig();
|
|
59855
59864
|
const { setVisible } = useWalletModal();
|
|
@@ -59960,7 +59969,7 @@ const UserBondRowSolana = ({ bill }) => {
|
|
|
59960
59969
|
setLoadingTx(false);
|
|
59961
59970
|
}
|
|
59962
59971
|
};
|
|
59963
|
-
return (jsxs("div", { className: "your-bonds", onClick: () => onOpenPurchasedBond(), children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_e = bill.bond) === null || _e === void 0 ? void 0 : _e.earnToken.symbol, chain: (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.chainId, vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_g = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _g === void 0 ? void 0 : _g.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.earnToken.symbol) || '', bondContract: (_j = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _j !== void 0 ? _j : '', projectLink: (_k = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _k === void 0 ? void 0 : _k.projectLink, twitter: (_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.twitter, chain: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.chainId, cgId: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex, { sx: {
|
|
59972
|
+
return (jsxs("div", { className: "your-bonds", onClick: () => onOpenPurchasedBond(), children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_e = bill.bond) === null || _e === void 0 ? void 0 : _e.earnToken.symbol, chain: (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.chainId, vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_g = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _g === void 0 ? void 0 : _g.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.earnToken.symbol) || '', bondContract: (_j = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _j !== void 0 ? _j : '', projectLink: (_k = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _k === void 0 ? void 0 : _k.projectLink, twitter: (_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.twitter, chain: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.chainId, cgId: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.cgId, dexscreener: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex, { sx: {
|
|
59964
59973
|
opacity: 0.8,
|
|
59965
59974
|
}, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [jsx$2(Flex, { sx: { width: '125px' }, children: jsx$2(ProfitCard, { userBond: bill }) }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Claimable" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(claimable(bill), 4), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(claimable(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Pending" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(pending(bill), 4), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(pending(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsx$2("div", { className: "your-bonds-content hide-mobile", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(bill) }), style: {
|
|
59966
59975
|
width: '127px',
|
|
@@ -59973,7 +59982,7 @@ const UserBondRowSolana = ({ bill }) => {
|
|
|
59973
59982
|
: `Fully Vested.` }) }), jsx$2("div", { className: "your-bonds-column-button", children: !accountSolana ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || loadingTx, load: loadingTx, onClick: (event) => {
|
|
59974
59983
|
event.stopPropagation();
|
|
59975
59984
|
setVisible(true);
|
|
59976
|
-
}, fullWidth: true, children: ["Connect to ", NETWORK_LABEL[(
|
|
59985
|
+
}, fullWidth: true, children: ["Connect to ", NETWORK_LABEL[(_q = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _q === void 0 ? void 0 : _q.chainId]] })) : (jsx$2(Button, { className: "button", disabled: claimable(bill) === 0 || loadingTx || isPendingCliff, load: loadingTx, onClick: (event) => {
|
|
59977
59986
|
event.stopPropagation();
|
|
59978
59987
|
if (!loadingTx)
|
|
59979
59988
|
handleClaim();
|
|
@@ -59994,7 +60003,7 @@ function useUserBondsPreTGE() {
|
|
|
59994
60003
|
queryFn: () => fetchPreTGEUserBonds(chains, tokenPrices, preTGEList, address, apiUrl),
|
|
59995
60004
|
refetchInterval: 30000,
|
|
59996
60005
|
refetchOnWindowFocus: false,
|
|
59997
|
-
enabled: !!preTGEList && preTGEList.length > 0 && !!address && !!tokenPrices,
|
|
60006
|
+
enabled: !!preTGEList && preTGEList.length > 0 && !!address && !!tokenPrices && typeof window !== 'undefined',
|
|
59998
60007
|
});
|
|
59999
60008
|
}
|
|
60000
60009
|
const fetchPreTGEUserBonds = async (chains, tokenPrices, preTGEList, account, apiUrl) => {
|
|
@@ -62541,7 +62550,7 @@ function useUserTokensBalance(tokens, chainId) {
|
|
|
62541
62550
|
queryFn: () => getTokensBalance(accountToUse, tokens, chainId, apiUrl),
|
|
62542
62551
|
staleTime: 45000,
|
|
62543
62552
|
refetchOnWindowFocus: false,
|
|
62544
|
-
enabled: !!accountToUse,
|
|
62553
|
+
enabled: !!accountToUse && typeof window !== 'undefined',
|
|
62545
62554
|
});
|
|
62546
62555
|
}
|
|
62547
62556
|
const getTokensBalance = async (account, tokens, chainId, apiUrl) => {
|
|
@@ -63462,6 +63471,7 @@ function useAllowance(currency, spender, account, chainId) {
|
|
|
63462
63471
|
refetchInterval: 10000, // i.e. 10 sec
|
|
63463
63472
|
refetchOnWindowFocus: false,
|
|
63464
63473
|
retry: 1,
|
|
63474
|
+
enabled: typeof window !== 'undefined',
|
|
63465
63475
|
});
|
|
63466
63476
|
}
|
|
63467
63477
|
const getTokenAllowance = async (currency, spender, account, chainId) => {
|
|
@@ -63638,6 +63648,7 @@ const useSlippage = () => {
|
|
|
63638
63648
|
queryFn: () => {
|
|
63639
63649
|
throw new Error('Just a hotfix for latest versions of react-query that make queryFn a required prop');
|
|
63640
63650
|
},
|
|
63651
|
+
enabled: typeof window !== 'undefined',
|
|
63641
63652
|
});
|
|
63642
63653
|
// Handler to modify the setting within React Query's cache
|
|
63643
63654
|
const setSlippage = (newValue, chainId) => {
|
|
@@ -63797,7 +63808,7 @@ const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account, tierProof
|
|
|
63797
63808
|
queryKey: [QUERY_KEYS.ZAP_TOKEN_QUOTE, queryKey],
|
|
63798
63809
|
queryFn: fetchZapDetails,
|
|
63799
63810
|
refetchInterval: 60000, // i.e. 60 sec
|
|
63800
|
-
enabled: !!queryKey,
|
|
63811
|
+
enabled: !!queryKey && typeof window !== 'undefined',
|
|
63801
63812
|
retry: 1,
|
|
63802
63813
|
});
|
|
63803
63814
|
const zapError = !!error;
|
|
@@ -64419,7 +64430,13 @@ function useTierProofSignature(bondAddress, chainId, isUserRestricted) {
|
|
|
64419
64430
|
retry: 1,
|
|
64420
64431
|
refetchInterval: 1800000, // 30 mins
|
|
64421
64432
|
initialData: null,
|
|
64422
|
-
enabled: !!bondAddress &&
|
|
64433
|
+
enabled: !!bondAddress &&
|
|
64434
|
+
!!account &&
|
|
64435
|
+
!!apiAddress &&
|
|
64436
|
+
!!chainId &&
|
|
64437
|
+
SDKConfig.useTiers &&
|
|
64438
|
+
!isUserRestricted &&
|
|
64439
|
+
typeof window !== 'undefined',
|
|
64423
64440
|
});
|
|
64424
64441
|
}
|
|
64425
64442
|
const getTierProofSig = async (apiAddress, account, bondAddress, chainId) => {
|
|
@@ -66013,7 +66030,7 @@ slippage = 0.5) => {
|
|
|
66013
66030
|
queryKey: [QUERY_KEYS.ZAP_TOKEN_QUOTE, 'jupiter-solana', directQueryParams, preferDirectRoutes, slippage],
|
|
66014
66031
|
queryFn: fetchJupiterQuote,
|
|
66015
66032
|
refetchInterval: 60000,
|
|
66016
|
-
enabled: !!directQueryParams,
|
|
66033
|
+
enabled: !!directQueryParams && typeof window !== 'undefined',
|
|
66017
66034
|
retry: 1,
|
|
66018
66035
|
staleTime: 30000,
|
|
66019
66036
|
});
|
|
@@ -66816,6 +66833,7 @@ function useCurrencyBalance(currency, account, chainId) {
|
|
|
66816
66833
|
refetchInterval: 10000, // i.e. 10 sec
|
|
66817
66834
|
refetchOnWindowFocus: false,
|
|
66818
66835
|
retry: 1,
|
|
66836
|
+
enabled: typeof window !== 'undefined',
|
|
66819
66837
|
});
|
|
66820
66838
|
}
|
|
66821
66839
|
const getTokenBalance = async (currency, account, chainId) => {
|
|
@@ -67111,6 +67129,7 @@ function useHotBondContracts() {
|
|
|
67111
67129
|
refetchOnWindowFocus: false,
|
|
67112
67130
|
refetchOnMount: false,
|
|
67113
67131
|
retry: 1,
|
|
67132
|
+
enabled: typeof window !== 'undefined',
|
|
67114
67133
|
});
|
|
67115
67134
|
}
|
|
67116
67135
|
function useHotBonds() {
|
|
@@ -67121,7 +67140,11 @@ function useHotBonds() {
|
|
|
67121
67140
|
queryFn: () => getHotBonds(bondsData, hotBondContracts),
|
|
67122
67141
|
refetchOnWindowFocus: false,
|
|
67123
67142
|
refetchInterval: 30000,
|
|
67124
|
-
enabled: !!bondsData &&
|
|
67143
|
+
enabled: !!bondsData &&
|
|
67144
|
+
bondsData.length > 0 &&
|
|
67145
|
+
!!hotBondContracts &&
|
|
67146
|
+
hotBondContracts.length > 0 &&
|
|
67147
|
+
typeof window !== 'undefined',
|
|
67125
67148
|
retry: 0,
|
|
67126
67149
|
});
|
|
67127
67150
|
}
|
|
@@ -67226,7 +67249,7 @@ const BonusContainer = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
|
|
|
67226
67249
|
return (jsx$2("div", { className: `discount-column`, children: jsx$2(BonusComponent, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip, tooltipPosition: isMobile ? tooltipPosition : 'bottomLeft' }) }));
|
|
67227
67250
|
};
|
|
67228
67251
|
|
|
67229
|
-
const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, shortDescription, soldoutBondsCount, isOpen, cgId, }) => {
|
|
67252
|
+
const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, shortDescription, soldoutBondsCount, isOpen, cgId, dexscreener, }) => {
|
|
67230
67253
|
var _a, _b, _c;
|
|
67231
67254
|
const SDKConfig = useSDKConfig();
|
|
67232
67255
|
const locationPath = window.location.pathname.replace('/', '');
|
|
@@ -67262,7 +67285,7 @@ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billT
|
|
|
67262
67285
|
flexDirection: 'column',
|
|
67263
67286
|
justifyContent: 'center',
|
|
67264
67287
|
display: ['none', 'none', 'none', 'flex'],
|
|
67265
|
-
}, showTooltip: true, toolTip: remainingTokensString })) }), jsx$2("div", { className: "tooltip-column", children: soldoutBondsCount ? (jsxs(Flex, { sx: { gap: '5px', fontSize: '13px', fontWeight: 500, opacity: 0.5 }, children: ["(", soldoutBondsCount, ")", jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down', width: "8px" })] })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_b = (_a = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.address) === null || _a === void 0 ? void 0 : _a[bondChain]) !== null && _b !== void 0 ? _b : '', earnTokenSymbol: (_c = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol) !== null && _c !== void 0 ? _c : '', bondContract: bondAddress !== null && bondAddress !== void 0 ? bondAddress : '', projectLink: projectURL, twitter: twitterURL, chain: bondChain, isSoldOut: bondSoldOut, billType: billType, cgId: cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { className: "more-icon", sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) })) })] })] }, `${bondAddress}-${bondChain}`));
|
|
67288
|
+
}, showTooltip: true, toolTip: remainingTokensString })) }), jsx$2("div", { className: "tooltip-column", children: soldoutBondsCount ? (jsxs(Flex, { sx: { gap: '5px', fontSize: '13px', fontWeight: 500, opacity: 0.5 }, children: ["(", soldoutBondsCount, ")", jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down', width: "8px" })] })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_b = (_a = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.address) === null || _a === void 0 ? void 0 : _a[bondChain]) !== null && _b !== void 0 ? _b : '', earnTokenSymbol: (_c = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol) !== null && _c !== void 0 ? _c : '', bondContract: bondAddress !== null && bondAddress !== void 0 ? bondAddress : '', projectLink: projectURL, twitter: twitterURL, chain: bondChain, isSoldOut: bondSoldOut, billType: billType, cgId: cgId, dexscreener: dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { className: "more-icon", sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) })) })] })] }, `${bondAddress}-${bondChain}`));
|
|
67266
67289
|
};
|
|
67267
67290
|
|
|
67268
67291
|
const BuyAgainRow = () => {
|
|
@@ -67433,7 +67456,7 @@ const HotBondCard = ({ bond }) => {
|
|
|
67433
67456
|
},
|
|
67434
67457
|
});
|
|
67435
67458
|
};
|
|
67436
|
-
return (jsx$2(Flex, { sx: styles$7.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { tokenSymbol: bond.earnToken.symbol, chain: bond.chainId, tag: (_d = bond.tags) === null || _d === void 0 ? void 0 : _d[0], isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_g = (_f = (_e = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _g !== void 0 ? _g : '', earnTokenSymbol: (_j = (_h = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _h === void 0 ? void 0 : _h.symbol) !== null && _j !== void 0 ? _j : '', bondContract: (_l = (_k = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _k === void 0 ? void 0 : _k[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _l !== void 0 ? _l : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, chain: bond === null || bond === void 0 ? void 0 : bond.chainId, cgId: bond === null || bond === void 0 ? void 0 : bond.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Bonus" }), jsx$2(Flex, { className: `${getDiscountColor(bonus)}`, sx: { width: '100%', justifyContent: 'center' }, children: bonus !== undefined ? (bonus < 0 ? '0%' : `${bonus === null || bonus === void 0 ? void 0 : bonus.toFixed(2)}%`) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond, SDKConfig.useTiers) })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_m = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _m === void 0 ? void 0 : _m.days)
|
|
67459
|
+
return (jsx$2(Flex, { sx: styles$7.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { tokenSymbol: bond.earnToken.symbol, chain: bond.chainId, tag: (_d = bond.tags) === null || _d === void 0 ? void 0 : _d[0], isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_g = (_f = (_e = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _g !== void 0 ? _g : '', earnTokenSymbol: (_j = (_h = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _h === void 0 ? void 0 : _h.symbol) !== null && _j !== void 0 ? _j : '', bondContract: (_l = (_k = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _k === void 0 ? void 0 : _k[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _l !== void 0 ? _l : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, chain: bond === null || bond === void 0 ? void 0 : bond.chainId, cgId: bond === null || bond === void 0 ? void 0 : bond.cgId, dexscreener: bond === null || bond === void 0 ? void 0 : bond.dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Bonus" }), jsx$2(Flex, { className: `${getDiscountColor(bonus)}`, sx: { width: '100%', justifyContent: 'center' }, children: bonus !== undefined ? (bonus < 0 ? '0%' : `${bonus === null || bonus === void 0 ? void 0 : bonus.toFixed(2)}%`) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond, SDKConfig.useTiers) })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_m = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _m === void 0 ? void 0 : _m.days)
|
|
67437
67460
|
? `${(_o = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _o === void 0 ? void 0 : _o.days} D`
|
|
67438
67461
|
: '-' })] })] })] }) }));
|
|
67439
67462
|
};
|
|
@@ -72735,7 +72758,7 @@ const ActiveBondRows = ({ chain, bonds, hideTitles, showHotBonds }) => {
|
|
|
72735
72758
|
const bond = bondFromMap;
|
|
72736
72759
|
const bondAddress = (_u = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _u === void 0 ? void 0 : _u[bond === null || bond === void 0 ? void 0 : bond.chainId];
|
|
72737
72760
|
const remainingTokensString = getRemainingTokensString(bond);
|
|
72738
|
-
return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, marketingCampaign: bond.marketingCampaign, payoutToken: bond.earnToken, billType: bond.billType, tag: (_v = bond.tags) === null || _v === void 0 ? void 0 : _v[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, bonus: namingPreference === 'Discount' ? `${(_w = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _w === void 0 ? void 0 : _w.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription, cgId: bond.cgId }, `${bondAddress}-${bond.chainId}-${index}`));
|
|
72761
|
+
return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, marketingCampaign: bond.marketingCampaign, payoutToken: bond.earnToken, billType: bond.billType, tag: (_v = bond.tags) === null || _v === void 0 ? void 0 : _v[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, bonus: namingPreference === 'Discount' ? `${(_w = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _w === void 0 ? void 0 : _w.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription, cgId: bond.cgId, dexscreener: bond === null || bond === void 0 ? void 0 : bond.dexscreener }, `${bondAddress}-${bond.chainId}-${index}`));
|
|
72739
72762
|
}
|
|
72740
72763
|
}), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
|
|
72741
72764
|
};
|
|
@@ -88786,6 +88809,7 @@ function useGetBondApiStats(contractAddress) {
|
|
|
88786
88809
|
refetchOnWindowFocus: false,
|
|
88787
88810
|
refetchOnMount: false,
|
|
88788
88811
|
retry: 1,
|
|
88812
|
+
enabled: typeof window !== 'undefined',
|
|
88789
88813
|
});
|
|
88790
88814
|
}
|
|
88791
88815
|
|
|
@@ -89680,7 +89704,7 @@ function useHistoricalPrice(cgId) {
|
|
|
89680
89704
|
queryFn: () => getHistoricalPrice(cgId, queryClient),
|
|
89681
89705
|
refetchOnWindowFocus: false,
|
|
89682
89706
|
refetchInterval: 300000,
|
|
89683
|
-
enabled: !!cgId,
|
|
89707
|
+
enabled: !!cgId && typeof window !== 'undefined',
|
|
89684
89708
|
retry: 0,
|
|
89685
89709
|
});
|
|
89686
89710
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ape Bond SDK",
|
|
4
4
|
"author": "Ape Bond",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "5.0.
|
|
6
|
+
"version": "5.0.7-test.0",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"yalc": "^1.0.0-pre.53"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@ape.swap/apeswap-lists": "4.5.
|
|
84
|
+
"@ape.swap/apeswap-lists": "4.5.10",
|
|
85
85
|
"@emotion/react": "11.14.0",
|
|
86
86
|
"@jup-ag/api": "6.0.45",
|
|
87
87
|
"bignumber.js": "^9.1.2",
|