@ape.swap/bonds-sdk 4.0.2-test.4 → 4.0.2-test.6

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.d.ts CHANGED
@@ -9,4 +9,5 @@ import SingleBond from './views/SingleBond';
9
9
  import useTokenPrices from './state/tokenPrices/useTokenPrices';
10
10
  import { useSDKConfig } from './state/useSDKConfig';
11
11
  import { BLOCK_EXPLORER } from './config/constants/chains';
12
- export { Bonds, BuyBondModal, YourBonds, FullBondsView, ProjectView, generateImageFromTemplate, ChainId, SingleBond, useTokenPrices, useSDKConfig, BLOCK_EXPLORER, };
12
+ import useCurrencyBalance from './state/balance/useCurrencyBalance';
13
+ export { Bonds, BuyBondModal, YourBonds, FullBondsView, ProjectView, generateImageFromTemplate, ChainId, SingleBond, useTokenPrices, useSDKConfig, BLOCK_EXPLORER, useCurrencyBalance, };
package/dist/main.js CHANGED
@@ -63100,7 +63100,7 @@ const PUBLIC_RPC_URLS = {
63100
63100
  [types$1.ChainId.CROSSFI]: ['https://rpc.mainnet.ms'],
63101
63101
  [types$1.ChainId.MONAD_TESTNET]: ['https://testnet-rpc2.monad.xyz/52227f026fa8fac9e2014c58fbf5643369b3bfc6'],
63102
63102
  [types$1.ChainId.SONIC]: ['https://rpc.soniclabs.com'],
63103
- [types$1.ChainId.BERACHAIN]: ['https://rpc.berachain.com'],
63103
+ [types$1.ChainId.BERACHAIN]: ['https://rpc.berachain.com', 'https://berachain.drpc.org'],
63104
63104
  [types$1.ChainId.KATANA]: ['https://rpc-katana.t.conduit.xyz/NRcSLqEG4Hw55GzTSu6Sratq94kKtUGfH'],
63105
63105
  [types$1.ChainId.UNICHAIN]: ['https://unichain.drpc.org'],
63106
63106
  [types$1.ChainId.MEGAETH_TESTNET]: ['https://carrot.megaeth.com/rpc'],
@@ -63824,27 +63824,37 @@ const findHighestTrueBondPriceUserAgnostic = (bondData) => {
63824
63824
  };
63825
63825
 
63826
63826
  const claimable = (userBill) => {
63827
- var _a, _b, _c, _d;
63828
- return getBalanceNumber(new BigNumber$1(userBill.pendingRewards), (_d = (_c = (_b = (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 18);
63827
+ var _a, _b, _c, _d, _e, _f;
63828
+ return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.pendingRewards) !== null && _a !== void 0 ? _a : '0'), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
63829
63829
  };
63830
63830
  const claimableUSD = (userBill) => {
63831
- var _a, _b, _c, _d, _e, _f, _g;
63832
- const claimableTokens = getBalanceNumber(new BigNumber$1(userBill.pendingRewards), (_e = (_c = (_b = (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[(_d = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _d === void 0 ? void 0 : _d.chainId]) !== null && _e !== void 0 ? _e : 18);
63833
- return claimableTokens * parseFloat((_g = (_f = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _f === void 0 ? void 0 : _f.payoutTokenPrice) !== null && _g !== void 0 ? _g : '0');
63831
+ var _a, _b;
63832
+ const claimableTokens = claimable(userBill);
63833
+ return claimableTokens * parseFloat((_b = (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.payoutTokenPrice) !== null && _b !== void 0 ? _b : '0');
63834
63834
  };
63835
63835
  const earnTokenPrice = (bond) => {
63836
63836
  var _a;
63837
63837
  //TODO: remove this?
63838
63838
  return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
63839
63839
  };
63840
- const totalPending = (userBill) => {
63841
- var _a, _b, _c, _d, _e;
63842
- return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_e = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[userBill.bond.chainId]) !== null && _e !== void 0 ? _e : 18);
63840
+ // Amount of unvested (locked) tokens
63841
+ const pending = (userBill) => {
63842
+ var _a, _b, _c, _d, _e, _f;
63843
+ return (getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18) - claimable(userBill));
63843
63844
  };
63844
- const totalPendingUSD = (userBill) => {
63845
- var _a, _b, _c, _d, _e, _f, _g, _h;
63846
- const pendingTokens = getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
63847
- return pendingTokens * parseFloat((_h = (_g = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _g === void 0 ? void 0 : _g.payoutTokenPrice) !== null && _h !== void 0 ? _h : '0');
63845
+ const pendingUSD = (userBill) => {
63846
+ var _a, _b;
63847
+ const pendingTokens = pending(userBill);
63848
+ return pendingTokens * parseFloat((_b = (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.payoutTokenPrice) !== null && _b !== void 0 ? _b : '0');
63849
+ };
63850
+ const claimed = (userBill) => {
63851
+ var _a, _b, _c, _d, _e, _f;
63852
+ return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payoutClaimed) !== null && _a !== void 0 ? _a : '0'), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
63853
+ };
63854
+ const claimedUSD = (userBill) => {
63855
+ var _a, _b;
63856
+ const claimedTokens = claimed(userBill);
63857
+ return claimedTokens * parseFloat((_b = (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.payoutTokenPrice) !== null && _b !== void 0 ? _b : '0');
63848
63858
  };
63849
63859
  const vestingTimeRemaining = (userBill) => {
63850
63860
  var _a, _b;
@@ -66899,7 +66909,7 @@ const getAllTokenPrices = (chainId, tokens, apiUrl) => __awaiter$9(void 0, void
66899
66909
  const getBatchTokensExternal = (params) => __awaiter$9(void 0, void 0, void 0, function* () {
66900
66910
  const { chainId, tokens, apiUrl } = params;
66901
66911
  try {
66902
- const baseURL = 'https://price-api.ape.bond/prices';
66912
+ const baseURL = 'https://price-getter-api-staging-6de31092552d.herokuapp.com/prices';
66903
66913
  const tokensToCall = tokens.map((token) => token.address);
66904
66914
  if (tokensToCall.length === 0)
66905
66915
  return [];
@@ -76641,21 +76651,6 @@ const Recommendations = ({ onDismiss, billAddress }) => {
76641
76651
  } }, `${bond.billAddress}-${index}`)))) })] })) }));
76642
76652
  };
76643
76653
 
76644
- function useCurrencyPrice(currency, chainId) {
76645
- var _a;
76646
- const { data: tokenPrices } = useTokenPrices();
76647
- const token = currency === 'NATIVE' && chainId ? WNATIVE[chainId] : currency;
76648
- const tokenAddress = (_a = token === null || token === void 0 ? void 0 : token.address) === null || _a === void 0 ? void 0 : _a[chainId];
76649
- return useMemo(() => tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices.find((tokenPrice) => {
76650
- var _a;
76651
- return chainId &&
76652
- tokenPrice.chainId === chainId &&
76653
- ((_a = tokenPrice === null || tokenPrice === void 0 ? void 0 : tokenPrice.address) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (tokenAddress === null || tokenAddress === void 0 ? void 0 : tokenAddress.toLowerCase());
76654
- }),
76655
- /* eslint-disable react-hooks/exhaustive-deps */
76656
- [tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices.length, tokenAddress, chainId]);
76657
- }
76658
-
76659
76654
  const remove0xPrefix = (str) => {
76660
76655
  if (str && str.startsWith('0x')) {
76661
76656
  return str.slice(2);
@@ -76691,7 +76686,7 @@ const SafeHTMLComponent = ({ html }) => {
76691
76686
  };
76692
76687
 
76693
76688
  const YourBondsModal = ({ onDismiss, bill }) => {
76694
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
76689
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
76695
76690
  // Hooks
76696
76691
  const SDKConfig = useSDKConfig();
76697
76692
  const chainId = useChainId();
@@ -76756,22 +76751,8 @@ const YourBondsModal = ({ onDismiss, bill }) => {
76756
76751
  });
76757
76752
  }
76758
76753
  });
76759
- // Functions to calculate display values for modal
76760
- const totalPending = (userBill) => {
76761
- var _a, _b, _c, _d, _e, _f;
76762
- return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
76763
- };
76764
- const claimable = (userBill) => {
76765
- var _a, _b, _c, _d, _e, _f;
76766
- return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.pendingRewards) !== null && _a !== void 0 ? _a : '0'), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
76767
- };
76768
- const claimed = (userBill) => {
76769
- var _a, _b, _c, _d, _e, _f;
76770
- return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payoutClaimed) !== null && _a !== void 0 ? _a : '0'), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
76771
- };
76772
- const earnTokenPrice = useCurrencyPrice((_f = (_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.earnToken) !== null && _f !== void 0 ? _f : null, (_h = (_g = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _g === void 0 ? void 0 : _g.chainId) !== null && _h !== void 0 ? _h : null);
76773
76754
  const BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
76774
- const attributes = (_j = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.attributes) === null || _j === void 0 ? void 0 : _j.filter((attrib) => BILL_ATTRIBUTES.includes(attrib.trait_type));
76755
+ const attributes = (_e = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.attributes) === null || _e === void 0 ? void 0 : _e.filter((attrib) => BILL_ATTRIBUTES.includes(attrib.trait_type));
76775
76756
  const handleImageLoad = () => {
76776
76757
  setImgLoaded(true);
76777
76758
  };
@@ -76790,11 +76771,11 @@ const YourBondsModal = ({ onDismiss, bill }) => {
76790
76771
  justifyContent: 'center',
76791
76772
  alignItems: 'center',
76792
76773
  zIndex: 1,
76793
- }, children: jsx$2(Spinner, { width: 100 }) }))] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_l = (_k = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _k === void 0 ? void 0 : _k.showcaseTokenName) !== null && _l !== void 0 ? _l : (_o = (_m = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _m === void 0 ? void 0 : _m.earnToken) === null || _o === void 0 ? void 0 : _o.symbol, size: 40, chain: (_p = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _p === void 0 ? void 0 : _p.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.showcaseTokenName) !== null && _r !== void 0 ? _r : (_s = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _s === void 0 ? void 0 : _s.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_u = (_t = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _t === void 0 ? void 0 : _t.tags) === null || _u === void 0 ? void 0 : _u.slice(0, 1).map((tag) => {
76774
+ }, children: jsx$2(Spinner, { width: 100 }) }))] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_g = (_f = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _f === void 0 ? void 0 : _f.showcaseTokenName) !== null && _g !== void 0 ? _g : (_j = (_h = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _h === void 0 ? void 0 : _h.earnToken) === null || _j === void 0 ? void 0 : _j.symbol, size: 40, chain: (_k = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _k === void 0 ? void 0 : _k.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.showcaseTokenName) !== null && _m !== void 0 ? _m : (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_q = (_p = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _p === void 0 ? void 0 : _p.tags) === null || _q === void 0 ? void 0 : _q.slice(0, 1).map((tag) => {
76794
76775
  return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
76795
76776
  }) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill === null || userBill === void 0 ? void 0 : userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "attributes-container", children: [jsxs(Flex$1, { className: "attributes-header", sx: {
76796
76777
  borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
76797
- }, onClick: () => setIsOpenTraits(!isOpenTraits), children: [jsxs(Flex$1, { sx: { gap: '10px', alignItems: 'center' }, children: [jsx$2(Svg, { icon: "tag", direction: "down" }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' }, children: "Traits" })] }), jsx$2(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] }), ((_v = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _v === void 0 ? void 0 : _v.billType) === 'staking' && (jsxs(Flex$1, { sx: {
76778
+ }, onClick: () => setIsOpenTraits(!isOpenTraits), children: [jsxs(Flex$1, { sx: { gap: '10px', alignItems: 'center' }, children: [jsx$2(Svg, { icon: "tag", direction: "down" }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' }, children: "Traits" })] }), jsx$2(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] }), ((_r = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _r === void 0 ? void 0 : _r.billType) === 'staking' && (jsxs(Flex$1, { sx: {
76798
76779
  p: '5px 10px',
76799
76780
  width: '100%',
76800
76781
  background: '#8E568F',
@@ -76808,28 +76789,28 @@ const YourBondsModal = ({ onDismiss, bill }) => {
76808
76789
  ? attributes.map((a) => (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.trait_type }), jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.value })] }, a.value)))
76809
76790
  : BILL_ATTRIBUTES.map((attrib) => {
76810
76791
  return (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, attrib));
76811
- }) }) })) })] }), ((_w = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _w === void 0 ? void 0 : _w.deposit) && (jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "You Spent" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.YouSpent }), width: "270px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsx$2(Flex$1, { className: "yourbondinfo-block info", children: jsx$2(Flex$1, { className: "block-info text", children: jsxs(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: ["$", (_x = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _x === void 0 ? void 0 : _x.dollarValue.toFixed(2)] }) }) })] })), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_z = (_y = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _y === void 0 ? void 0 : _y.showcaseTokenName) !== null && _z !== void 0 ? _z : (_1 = (_0 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _0 === void 0 ? void 0 : _0.earnToken) === null || _1 === void 0 ? void 0 : _1.symbol, size: 25, chain: (_2 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _2 === void 0 ? void 0 : _2.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
76792
+ }) }) })) })] }), ((_s = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _s === void 0 ? void 0 : _s.deposit) && (jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "You Spent" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.YouSpent }), width: "270px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsx$2(Flex$1, { className: "yourbondinfo-block info", children: jsx$2(Flex$1, { className: "block-info text", children: jsxs(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: ["$", (_t = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _t === void 0 ? void 0 : _t.dollarValue.toFixed(2)] }) }) })] })), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_v = (_u = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _u === void 0 ? void 0 : _u.showcaseTokenName) !== null && _v !== void 0 ? _v : (_x = (_w = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _w === void 0 ? void 0 : _w.earnToken) === null || _x === void 0 ? void 0 : _x.symbol, size: 25, chain: (_y = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _y === void 0 ? void 0 : _y.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(pending(userBill), 4) }), jsx$2(Text, { sx: {
76812
76793
  fontSize: ['10px', '10px', '10px', '12px'],
76813
76794
  fontWeight: [500, 500, 500, 400],
76814
76795
  paddingLeft: '10px',
76815
- }, children: `($${(totalPending(userBill) * ((_3 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _3 !== void 0 ? _3 : 0)).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_5 = (_4 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _4 === void 0 ? void 0 : _4.showcaseTokenName) !== null && _5 !== void 0 ? _5 : (_7 = (_6 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _6 === void 0 ? void 0 : _6.earnToken) === null || _7 === void 0 ? void 0 : _7.symbol, size: 25, chain: (_8 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _8 === void 0 ? void 0 : _8.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
76796
+ }, children: `($${pendingUSD(userBill).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_0 = (_z = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _z === void 0 ? void 0 : _z.showcaseTokenName) !== null && _0 !== void 0 ? _0 : (_2 = (_1 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _1 === void 0 ? void 0 : _1.earnToken) === null || _2 === void 0 ? void 0 : _2.symbol, size: 25, chain: (_3 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _3 === void 0 ? void 0 : _3.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(claimable(userBill), 4) }), jsx$2(Text, { sx: {
76816
76797
  fontSize: ['10px', '10px', '10px', '12px'],
76817
76798
  fontWeight: [500, 500, 500, 400],
76818
76799
  paddingLeft: '10px',
76819
- }, children: `($${(claimable(userBill) * ((_9 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _9 !== void 0 ? _9 : 0)).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimed" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimed }), width: "250px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_11 = (_10 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _10 === void 0 ? void 0 : _10.showcaseTokenName) !== null && _11 !== void 0 ? _11 : (_13 = (_12 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _12 === void 0 ? void 0 : _12.earnToken) === null || _13 === void 0 ? void 0 : _13.symbol, size: 25, chain: (_14 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _14 === void 0 ? void 0 : _14.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimed(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
76800
+ }, children: `($${claimableUSD(userBill).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimed" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimed }), width: "250px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_5 = (_4 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _4 === void 0 ? void 0 : _4.showcaseTokenName) !== null && _5 !== void 0 ? _5 : (_7 = (_6 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _6 === void 0 ? void 0 : _6.earnToken) === null || _7 === void 0 ? void 0 : _7.symbol, size: 25, chain: (_8 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _8 === void 0 ? void 0 : _8.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(claimed(userBill), 4) }), jsx$2(Text, { sx: {
76820
76801
  fontSize: ['10px', '10px', '10px', '12px'],
76821
76802
  fontWeight: [500, 500, 500, 400],
76822
76803
  paddingLeft: '10px',
76823
- }, children: `($${(claimed(userBill) * ((_15 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _15 !== void 0 ? _15 : 0)).toFixed(2)})` })] })] })] })] }), ((_16 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _16 === void 0 ? void 0 : _16.warningCard) && (jsx$2(Flex$1, { sx: {
76804
+ }, children: `($${claimedUSD(userBill).toFixed(2)})` })] })] })] })] }), ((_9 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _9 === void 0 ? void 0 : _9.warningCard) && (jsx$2(Flex$1, { sx: {
76824
76805
  width: '100%',
76825
76806
  background: '#DE62F366',
76826
76807
  justifyContent: 'center',
76827
76808
  borderRadius: 'normal',
76828
- }, children: jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, p: '2px 10px' }, children: jsx$2(SafeHTMLComponent, { html: (_17 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _17 === void 0 ? void 0 : _17.warningCard }) }) })), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && !!((_18 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _18 === void 0 ? void 0 : _18.chainId) && chainId !== ((_19 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _19 === void 0 ? void 0 : _19.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
76809
+ }, children: jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, p: '2px 10px' }, children: jsx$2(SafeHTMLComponent, { html: (_10 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _10 === void 0 ? void 0 : _10.warningCard }) }) })), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && !!((_11 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _11 === void 0 ? void 0 : _11.chainId) && chainId !== ((_12 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _12 === void 0 ? void 0 : _12.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
76829
76810
  var _a;
76830
76811
  event.stopPropagation();
76831
76812
  switchChain({ chainId: (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.chainId });
76832
- }, children: ["Switch to ", NETWORK_LABEL[(_20 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _20 === void 0 ? void 0 : _20.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load || !userBill || isPendingCliff, load: load, onClick: (event) => {
76813
+ }, children: ["Switch to ", NETWORK_LABEL[(_13 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _13 === void 0 ? void 0 : _13.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load || !userBill || isPendingCliff, load: load, onClick: (event) => {
76833
76814
  event.stopPropagation();
76834
76815
  handleClaim(userBill === null || userBill === void 0 ? void 0 : userBill.id, userBill === null || userBill === void 0 ? void 0 : userBill.address);
76835
76816
  }, children: isPendingCliff
@@ -76990,7 +76971,7 @@ const UserBondRow = ({ bill }) => {
76990
76971
  }, [isConfirmed]);
76991
76972
  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: `Ends in ${getPendingVestingString(bill)}`, 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, audit: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.audit, chain: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
76992
76973
  opacity: 0.8,
76993
- }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [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(totalPending(bill), 3), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(totalPending(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsx$2("div", { className: "your-bonds-content hide-mobile", children: vestingTimeRemainingString(bill) }), jsx$2("div", { className: "your-bonds-column-button", children: userChainId !== ((_t = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _t === void 0 ? void 0 : _t.chainId) ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || load, load: load, onClick: (event) => {
76974
+ }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [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: vestingTimeRemainingString(bill) }), jsx$2("div", { className: "your-bonds-column-button", children: userChainId !== ((_t = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _t === void 0 ? void 0 : _t.chainId) ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || load, load: load, onClick: (event) => {
76994
76975
  var _a;
76995
76976
  event.stopPropagation();
76996
76977
  // Add your claim logic here
@@ -77013,7 +76994,7 @@ const COMMON_PDA_PROGRAM = new PublicKey(buffer.Buffer.from([
77013
76994
  ]));
77014
76995
  const CLAIM_DISCRIMINATOR = buffer.Buffer.from([62, 198, 214, 193, 213, 159, 108, 210]);
77015
76996
  const YourBondsModalSolana = ({ onDismiss, userBill }) => {
77016
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
76997
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
77017
76998
  // Hooks
77018
76999
  const SDKConfig = useSDKConfig();
77019
77000
  const { publicKey: accountSolana, signTransaction } = useSOLAccount();
@@ -77137,15 +77118,6 @@ const YourBondsModalSolana = ({ onDismiss, userBill }) => {
77137
77118
  setLoadingTx(false);
77138
77119
  }
77139
77120
  });
77140
- // Functions to calculate display values for modal
77141
- const totalPending = (userBill) => {
77142
- var _a, _b, _c, _d, _e, _f;
77143
- return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
77144
- };
77145
- const claimable = (userBill) => {
77146
- var _a, _b, _c, _d, _e, _f;
77147
- return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.pendingRewards) !== null && _a !== void 0 ? _a : '0'), (_f = (_d = (_c = (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken) === null || _c === void 0 ? void 0 : _c.decimals) === null || _d === void 0 ? void 0 : _d[(_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.chainId]) !== null && _f !== void 0 ? _f : 18);
77148
- };
77149
77121
  const handleImageLoad = () => {
77150
77122
  setImgLoaded(true);
77151
77123
  };
@@ -77159,23 +77131,23 @@ const YourBondsModalSolana = ({ onDismiss, userBill }) => {
77159
77131
  zIndex: 1,
77160
77132
  }, children: jsx$2(Spinner, { width: 100 }) }))] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_g = (_f = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _f === void 0 ? void 0 : _f.showcaseTokenName) !== null && _g !== void 0 ? _g : (_j = (_h = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _h === void 0 ? void 0 : _h.earnToken) === null || _j === void 0 ? void 0 : _j.symbol, size: 40, chain: (_k = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _k === void 0 ? void 0 : _k.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.showcaseTokenName) !== null && _m !== void 0 ? _m : (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_q = (_p = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _p === void 0 ? void 0 : _p.tags) === null || _q === void 0 ? void 0 : _q.slice(0, 1).map((tag) => {
77161
77133
  return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
77162
- }) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["ID # ", (_r = userBill === null || userBill === void 0 ? void 0 : userBill.id) === null || _r === void 0 ? void 0 : _r.slice(0, 3), "...", (_s = userBill === null || userBill === void 0 ? void 0 : userBill.id) === null || _s === void 0 ? void 0 : _s.slice(userBill.id.length - 3, userBill.id.length)] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_u = (_t = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _t === void 0 ? void 0 : _t.showcaseTokenName) !== null && _u !== void 0 ? _u : (_w = (_v = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _v === void 0 ? void 0 : _v.earnToken) === null || _w === void 0 ? void 0 : _w.symbol, size: 25, chain: (_x = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _x === void 0 ? void 0 : _x.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(totalPending(userBill), 4) }), jsx$2(Text, { sx: {
77134
+ }) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["ID # ", (_r = userBill === null || userBill === void 0 ? void 0 : userBill.id) === null || _r === void 0 ? void 0 : _r.slice(0, 3), "...", (_s = userBill === null || userBill === void 0 ? void 0 : userBill.id) === null || _s === void 0 ? void 0 : _s.slice(userBill.id.length - 3, userBill.id.length)] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_u = (_t = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _t === void 0 ? void 0 : _t.showcaseTokenName) !== null && _u !== void 0 ? _u : (_w = (_v = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _v === void 0 ? void 0 : _v.earnToken) === null || _w === void 0 ? void 0 : _w.symbol, size: 25, chain: (_x = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _x === void 0 ? void 0 : _x.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(pending(userBill), 4) }), jsx$2(Text, { sx: {
77163
77135
  fontSize: ['10px', '10px', '10px', '12px'],
77164
77136
  fontWeight: [500, 500, 500, 400],
77165
77137
  paddingLeft: '10px',
77166
- }, children: `($${(totalPending(userBill) * parseFloat((_z = (_y = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _y === void 0 ? void 0 : _y.payoutTokenPrice) !== null && _z !== void 0 ? _z : '0')).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_1 = (_0 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _0 === void 0 ? void 0 : _0.showcaseTokenName) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _2 === void 0 ? void 0 : _2.earnToken) === null || _3 === void 0 ? void 0 : _3.symbol, size: 25, chain: (_4 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _4 === void 0 ? void 0 : _4.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(claimable(userBill), 4) }), jsx$2(Text, { sx: {
77138
+ }, children: `($${pendingUSD(userBill).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_z = (_y = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _y === void 0 ? void 0 : _y.showcaseTokenName) !== null && _z !== void 0 ? _z : (_1 = (_0 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _0 === void 0 ? void 0 : _0.earnToken) === null || _1 === void 0 ? void 0 : _1.symbol, size: 25, chain: (_2 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _2 === void 0 ? void 0 : _2.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(claimable(userBill), 4) }), jsx$2(Text, { sx: {
77167
77139
  fontSize: ['10px', '10px', '10px', '12px'],
77168
77140
  fontWeight: [500, 500, 500, 400],
77169
77141
  paddingLeft: '10px',
77170
- }, children: `($${(claimable(userBill) * parseFloat((_6 = (_5 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _5 === void 0 ? void 0 : _5.payoutTokenPrice) !== null && _6 !== void 0 ? _6 : '0')).toFixed(2)})` })] })] })] })] }), ((_7 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _7 === void 0 ? void 0 : _7.warningCard) && (jsx$2(Flex$1, { sx: {
77142
+ }, children: `($${claimableUSD(userBill).toFixed(2)})` })] })] })] })] }), ((_3 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _3 === void 0 ? void 0 : _3.warningCard) && (jsx$2(Flex$1, { sx: {
77171
77143
  width: '100%',
77172
77144
  background: '#DE62F366',
77173
77145
  justifyContent: 'center',
77174
77146
  borderRadius: 'normal',
77175
- }, children: jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, p: '2px 10px' }, children: jsx$2(SafeHTMLComponent, { html: (_8 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _8 === void 0 ? void 0 : _8.warningCard }) }) })), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && !accountSolana ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
77147
+ }, children: jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, p: '2px 10px' }, children: jsx$2(SafeHTMLComponent, { html: (_4 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _4 === void 0 ? void 0 : _4.warningCard }) }) })), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && !accountSolana ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
77176
77148
  event.stopPropagation();
77177
77149
  setVisible(true);
77178
- }, children: ["Switch to ", NETWORK_LABEL[(_9 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _9 === void 0 ? void 0 : _9.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load || !userBill || isPendingCliff, load: load, onClick: (event) => {
77150
+ }, children: ["Switch to ", NETWORK_LABEL[(_5 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _5 === void 0 ? void 0 : _5.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load || !userBill || isPendingCliff, load: load, onClick: (event) => {
77179
77151
  event.stopPropagation();
77180
77152
  handleClaim();
77181
77153
  }, children: isPendingCliff
@@ -77303,7 +77275,7 @@ const UserBondRowSolana = ({ bill }) => {
77303
77275
  const cliffCountdown = getTimePeriods(lastBlockTimestamp + (vestingCliff !== null && vestingCliff !== void 0 ? vestingCliff : 0) - currentTime, true);
77304
77276
  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: `Ends in ${getPendingVestingString(bill)}`, 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, audit: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.audit, chain: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
77305
77277
  opacity: 0.8,
77306
- }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [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(totalPending(bill), 4), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(totalPending(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsx$2("div", { className: "your-bonds-content hide-mobile", children: vestingTimeRemainingString(bill) }), jsx$2("div", { className: "your-bonds-column-button", children: !accountSolana ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || load, load: load, onClick: (event) => {
77278
+ }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [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: vestingTimeRemainingString(bill) }), jsx$2("div", { className: "your-bonds-column-button", children: !accountSolana ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || load, load: load, onClick: (event) => {
77307
77279
  event.stopPropagation();
77308
77280
  setVisible(true);
77309
77281
  }, fullWidth: true, children: ["Connect to ", NETWORK_LABEL[(_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.chainId]] })) : (jsx$2(Button, { className: "button", disabled: claimable(bill) === 0 || load || isPendingCliff, load: load, onClick: (event) => {
@@ -80020,8 +79992,8 @@ const YourBonds = ({ showOnly }) => {
80020
79992
  bValue = claimableUSD(b);
80021
79993
  }
80022
79994
  else if (sortConfig.key === 'pending') {
80023
- aValue = totalPendingUSD(a);
80024
- bValue = totalPendingUSD(b);
79995
+ aValue = pendingUSD(a);
79996
+ bValue = pendingUSD(b);
80025
79997
  }
80026
79998
  else if (sortConfig.key === 'terms') {
80027
79999
  const aRemainingTime = vestingTimeRemaining(a).days * 24 * 3600 +
@@ -83575,6 +83547,21 @@ const getLpType = (protocol) => {
83575
83547
  : null;
83576
83548
  };
83577
83549
 
83550
+ function useCurrencyPrice(currency, chainId) {
83551
+ var _a;
83552
+ const { data: tokenPrices } = useTokenPrices();
83553
+ const token = currency === 'NATIVE' && chainId ? WNATIVE[chainId] : currency;
83554
+ const tokenAddress = (_a = token === null || token === void 0 ? void 0 : token.address) === null || _a === void 0 ? void 0 : _a[chainId];
83555
+ return useMemo(() => tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices.find((tokenPrice) => {
83556
+ var _a;
83557
+ return chainId &&
83558
+ tokenPrice.chainId === chainId &&
83559
+ ((_a = tokenPrice === null || tokenPrice === void 0 ? void 0 : tokenPrice.address) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (tokenAddress === null || tokenAddress === void 0 ? void 0 : tokenAddress.toLowerCase());
83560
+ }),
83561
+ /* eslint-disable react-hooks/exhaustive-deps */
83562
+ [tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices.length, tokenAddress, chainId]);
83563
+ }
83564
+
83578
83565
  const useSlippage = () => {
83579
83566
  const queryClient = useQueryClient();
83580
83567
  const { data: slippage } = useQuery({
@@ -104848,4 +104835,4 @@ const SingleBondWithProviders = (props) => {
104848
104835
  };
104849
104836
 
104850
104837
  var ChainId = types$1.ChainId;
104851
- export { BLOCK_EXPLORER, BondsWithProviders as Bonds, BuyBondModalWithProviders as BuyBondModal, ChainId, FullBondsViewWithProviders as FullBondsView, ProjectViewWithProviders as ProjectView, SingleBondWithProviders as SingleBond, YourBondsWithProviders as YourBonds, generateImageFromTemplate, useSDKConfig, useTokenPrices };
104838
+ export { BLOCK_EXPLORER, BondsWithProviders as Bonds, BuyBondModalWithProviders as BuyBondModal, ChainId, FullBondsViewWithProviders as FullBondsView, ProjectViewWithProviders as ProjectView, SingleBondWithProviders as SingleBond, YourBondsWithProviders as YourBonds, generateImageFromTemplate, useCurrencyBalance, useSDKConfig, useTokenPrices };
@@ -1,11 +1,13 @@
1
1
  import { UserBill } from '../types/yourbonds';
2
2
  import { BondsData } from '../types/bonds';
3
3
  import { BillsConfig, LaunchBondTiers } from '@ape.swap/apeswap-lists';
4
- export declare const claimable: (userBill: UserBill) => number;
5
- export declare const claimableUSD: (userBill: UserBill) => number;
4
+ export declare const claimable: (userBill?: UserBill) => number;
5
+ export declare const claimableUSD: (userBill?: UserBill) => number;
6
6
  export declare const earnTokenPrice: (bond: BondsData) => string;
7
- export declare const totalPending: (userBill: UserBill) => number;
8
- export declare const totalPendingUSD: (userBill: UserBill) => number;
7
+ export declare const pending: (userBill?: UserBill) => number;
8
+ export declare const pendingUSD: (userBill?: UserBill) => number;
9
+ export declare const claimed: (userBill?: UserBill) => number;
10
+ export declare const claimedUSD: (userBill?: UserBill) => number;
9
11
  export declare const vestingTimeRemaining: (userBill: UserBill) => import("./getTimePeriods").TimeLeft;
10
12
  export declare const vestingTimeRemainingString: (userBill?: UserBill) => string;
11
13
  export declare const getPendingVestingString: (bond?: UserBill) => string;
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": "4.0.2-test.4",
6
+ "version": "4.0.2-test.6",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -1,19 +0,0 @@
1
- import { PublicKey } from '@solana/web3.js';
2
- declare const useSOLAccount: () => {
3
- publicKey: PublicKey | null;
4
- autoConnect: boolean;
5
- wallets: import("@solana/wallet-adapter-react").Wallet[];
6
- wallet: import("@solana/wallet-adapter-react").Wallet | null;
7
- connecting: boolean;
8
- connected: boolean;
9
- disconnecting: boolean;
10
- select(walletName: import("@solana/wallet-adapter-base").WalletName | null): void;
11
- connect(): Promise<void>;
12
- disconnect(): Promise<void>;
13
- sendTransaction: import("@solana/wallet-adapter-base").WalletAdapterProps["sendTransaction"];
14
- signTransaction: import("@solana/wallet-adapter-base").SignerWalletAdapterProps["signTransaction"] | undefined;
15
- signAllTransactions: import("@solana/wallet-adapter-base").SignerWalletAdapterProps["signAllTransactions"] | undefined;
16
- signMessage: import("@solana/wallet-adapter-base").MessageSignerWalletAdapterProps["signMessage"] | undefined;
17
- signIn: import("@solana/wallet-adapter-base").SignInMessageSignerWalletAdapterProps["signIn"] | undefined;
18
- };
19
- export default useSOLAccount;