@ape.swap/bonds-sdk 2.1.0 → 2.1.1-test.2

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
@@ -18733,7 +18733,7 @@ const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
18733
18733
  display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'],
18734
18734
  justifyContent: isHotBond ? 'center' : 'flex-start',
18735
18735
  width: '100%',
18736
- }, children: ((_c = bill.tags) === null || _c === void 0 ? void 0 : _c[0]) && jsx$2(ListTag, { text: (_e = (_d = bill.tags) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.toUpperCase() }) })] }));
18736
+ }, children: ((_c = bill.tags) === null || _c === void 0 ? void 0 : _c[0]) && jsx$2(ListTag, { text: (_e = (_d = bill.tags) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.toUpperCase() }) }), jsx$2(Flex, { className: vestEnds ? '' : 'short-description-basepad', sx: { display: 'none' }, children: bill.shortDescription })] }));
18737
18737
  };
18738
18738
 
18739
18739
  const MINUTE_IN_SECONDS = 60;
@@ -70808,8 +70808,15 @@ const remove0xPrefix = (str) => {
70808
70808
  return str;
70809
70809
  };
70810
70810
 
70811
+ const daysLeftOnBasepadPool = () => {
70812
+ const finishPoolTimeSTamp = 1767225600; // 2026-1-1
70813
+ const currentTime = new Date().getTime() / 1000;
70814
+ const secondsUntil = finishPoolTimeSTamp - currentTime;
70815
+ return Math.ceil(secondsUntil / (60 * 60 * 24));
70816
+ };
70817
+
70811
70818
  const YourBondsModal = ({ onDismiss, userBill }) => {
70812
- 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;
70819
+ 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;
70813
70820
  // Hooks
70814
70821
  const chainId = useChainId();
70815
70822
  const { switchChain } = useSwitchChain();
@@ -70870,6 +70877,7 @@ const YourBondsModal = ({ onDismiss, userBill }) => {
70870
70877
  setImgLoaded(true);
70871
70878
  };
70872
70879
  const [onTransferBondModal] = useModal(jsx$2(TransferBondModal, { userBill: userBill }), true, true, `transferModal${userBill === null || userBill === void 0 ? void 0 : userBill.id}}`);
70880
+ console.log(userBill);
70873
70881
  return (jsx$2(Modal, { className: "modal", children: jsxs(Flex$1, { className: "yourbondsmodal-content", children: [jsx$2(Flex$1, { className: "yourbondsmodal-header", children: jsx$2(Flex$1, { className: "svg-close", onClick: onDismiss, children: jsx$2(Svg, { icon: "close" }) }) }), jsxs(Flex$1, { className: "yourbondsmodal table-container", children: [jsxs(Flex$1, { className: "yourbondsmodal bondimage", children: [(bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.image) && (jsx$2("img", { src: `${bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.image}?img-width=720`, onLoad: handleImageLoad, style: { zIndex: 2 } })), !imgLoaded && (jsx$2(Flex$1, { sx: {
70874
70882
  position: 'absolute',
70875
70883
  top: 'calc(50% - 24px)',
@@ -70881,23 +70889,32 @@ const YourBondsModal = ({ onDismiss, userBill }) => {
70881
70889
  return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
70882
70890
  }) }), 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: {
70883
70891
  borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
70884
- }, 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' })] }), jsx$2(AnimatePresence, { children: isOpenTraits && (jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' }, children: jsx$2(Flex$1, { sx: { flexDirection: 'column', gap: '1px' }, children: attributes
70892
+ }, 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' })] }), ((_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.billType) === 'staking' && (jsxs(Flex$1, { sx: {
70893
+ p: '5px 10px',
70894
+ width: '100%',
70895
+ background: '#8E568F',
70896
+ borderRadius: 'normal',
70897
+ mt: '10px',
70898
+ fontSize: '12px',
70899
+ fontWeight: 400,
70900
+ justifyContent: 'center',
70901
+ }, children: ["Tokens bought through this bond will go directly to the BPAD staking pool with a", ' ', daysLeftOnBasepadPool(), " days lock."] })), jsx$2(AnimatePresence, { children: isOpenTraits && (jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' }, children: jsx$2(Flex$1, { sx: { flexDirection: 'column', gap: '1px' }, children: attributes
70885
70902
  ? 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)))
70886
70903
  : BILL_ATTRIBUTES.map((attrib) => {
70887
70904
  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));
70888
- }) }) })) })] }), 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%, -5%)", 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: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: getPendingVesting((_q = userBill === null || userBill === void 0 ? void 0 : userBill.lastBlockTimestamp) !== null && _q !== void 0 ? _q : '', (_r = userBill === null || userBill === void 0 ? void 0 : userBill.vesting) !== null && _r !== void 0 ? _r : '') }) })] })] }), 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%, -5%)", 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: (_t = (_s = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _s === void 0 ? void 0 : _s.showcaseTokenName) !== null && _t !== void 0 ? _t : (_v = (_u = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _u === void 0 ? void 0 : _u.earnToken) === null || _v === void 0 ? void 0 : _v.symbol, size: 25, chain: (_w = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _w === void 0 ? void 0 : _w.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: {
70905
+ }) }) })) })] }), 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%, -5%)", 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: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: getPendingVesting((_r = userBill === null || userBill === void 0 ? void 0 : userBill.lastBlockTimestamp) !== null && _r !== void 0 ? _r : '', (_s = userBill === null || userBill === void 0 ? void 0 : userBill.vesting) !== null && _s !== void 0 ? _s : '') }) })] })] }), 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%, -5%)", 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(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
70889
70906
  fontSize: ['10px', '10px', '10px', '12px'],
70890
70907
  fontWeight: [500, 500, 500, 400],
70891
70908
  paddingLeft: '10px',
70892
- }, children: `($${(totalPending(userBill) * ((_x = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _x !== void 0 ? _x : 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%, -5%)", 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(claimable(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
70909
+ }, children: `($${(totalPending(userBill) * ((_y = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _y !== void 0 ? _y : 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%, -5%)", 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(parseFloat(claimable(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
70893
70910
  fontSize: ['10px', '10px', '10px', '12px'],
70894
70911
  fontWeight: [500, 500, 500, 400],
70895
70912
  paddingLeft: '10px',
70896
- }, children: `($${(claimable(userBill) * ((_3 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _3 !== void 0 ? _3 : 0)).toFixed(2)})` })] })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
70913
+ }, children: `($${(claimable(userBill) * ((_4 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _4 !== void 0 ? _4 : 0)).toFixed(2)})` })] })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
70897
70914
  var _a;
70898
70915
  event.stopPropagation();
70899
70916
  switchChain({ chainId: (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.chainId });
70900
- }, children: ["Switch to ", NETWORK_LABEL[(_4 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _4 === void 0 ? void 0 : _4.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load || !userBill, load: load, onClick: (event) => {
70917
+ }, 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, load: load, onClick: (event) => {
70901
70918
  event.stopPropagation();
70902
70919
  handleClaim(userBill === null || userBill === void 0 ? void 0 : userBill.id, userBill === null || userBill === void 0 ? void 0 : userBill.address);
70903
70920
  }, children: "Claim" })) }), jsx$2(Flex$1, { className: "button-container transfer", children: jsx$2(Button, { className: "transfer-button", variant: "secondary", onClick: onTransferBondModal, disabled: !userBill, children: "TRANSFER" }) })] })] })] }), jsx$2(Recommendations, { onDismiss: onDismiss, billAddress: userBill === null || userBill === void 0 ? void 0 : userBill.address })] }) }));
@@ -71135,6 +71152,8 @@ const fetchUserOwnedBills = (chainId, account, bonds) => __awaiter$9(void 0, voi
71135
71152
  const billsPendingRewardCall = [];
71136
71153
  const billDataCalls = [];
71137
71154
  const billVersions = [];
71155
+ const billNFTCalls = [];
71156
+ // console.log(bonds)
71138
71157
  billIds.forEach((idArray, index) => idArray[0].forEach((id) => id.gt(0) &&
71139
71158
  (billDataCalls.push({
71140
71159
  address: bonds[index].contractAddress[bonds[index].chainId],
@@ -71143,6 +71162,11 @@ const fetchUserOwnedBills = (chainId, account, bonds) => __awaiter$9(void 0, voi
71143
71162
  bond: bonds[index],
71144
71163
  }),
71145
71164
  billDataCalls.push({ address: bonds[index].contractAddress[bonds[index].chainId], name: 'billNft' }),
71165
+ billNFTCalls.push({
71166
+ address: bonds[index].billNnftAddress[bonds[index].chainId],
71167
+ name: 'vestedPayout',
71168
+ params: [id],
71169
+ }),
71146
71170
  billsPendingRewardCall.push({
71147
71171
  address: bonds[index].contractAddress[bonds[index].chainId],
71148
71172
  name: bonds[index].billVersion !== types.BillVersion.V1 ? 'claimablePayout' : 'pendingPayoutFor',
@@ -71152,6 +71176,7 @@ const fetchUserOwnedBills = (chainId, account, bonds) => __awaiter$9(void 0, voi
71152
71176
  billVersions.push(bonds[index].billVersion))));
71153
71177
  const billData = yield multicall(chainId, BOND_ABI, billDataCalls, true, 150);
71154
71178
  const pendingRewardsCall = yield multicall(chainId, BOND_ABI, billsPendingRewardCall);
71179
+ // const depositAmountCalls = await multicall(chainId, billAbi, billNFTCalls)
71155
71180
  const result = [];
71156
71181
  for (let i = 0; i < billsPendingRewardCall.length; i++) {
71157
71182
  const billDataPos = i === 0 ? 0 : i * 2;
@@ -71189,18 +71214,20 @@ function useUserBonds() {
71189
71214
  // First fetch the full list of bonds
71190
71215
  const { data: bondList } = useBondsList();
71191
71216
  const { address } = useAccount();
71217
+ const SDKConfig = useSDKConfig();
71218
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
71192
71219
  // Once the full list is fetched, fetch user's purchased bonds
71193
71220
  return useQuery({
71194
71221
  queryKey: [QUERY_KEYS.USER_BONDS, address],
71195
- queryFn: () => getUserBonds(address, bondList),
71222
+ queryFn: () => getUserBonds(address, bondList, chains),
71196
71223
  refetchOnWindowFocus: false,
71197
71224
  refetchInterval: 60000,
71198
71225
  enabled: !!bondList && !!address,
71199
71226
  });
71200
71227
  }
71201
- const getUserBonds = (account, bondList) => __awaiter$9(void 0, void 0, void 0, function* () {
71228
+ const getUserBonds = (account, bondList, chains) => __awaiter$9(void 0, void 0, void 0, function* () {
71202
71229
  try {
71203
- const results = yield Promise.allSettled(MAINNET_CHAINS.map((chain) => fetchUserOwnedBillsDataAsync(chain, account, bondList)));
71230
+ const results = yield Promise.allSettled(chains.map((chain) => fetchUserOwnedBillsDataAsync(chain, account, bondList)));
71204
71231
  // Filter out only fulfilled promises
71205
71232
  const fulfilledResults = results
71206
71233
  .filter((result) => result.status === 'fulfilled')
@@ -71321,7 +71348,12 @@ const MenuSelect = (_a) => {
71321
71348
  };
71322
71349
 
71323
71350
  const NetworkFilter = ({ chainFilterOption, setChainFilterOption, }) => {
71351
+ // Hooks
71352
+ const SDKConfig = useSDKConfig();
71353
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
71354
+ // State
71324
71355
  const [isOpen, setIsOpen] = useState(false);
71356
+ // Handlers
71325
71357
  const handleCheckbox = (newChain) => {
71326
71358
  const prevChainFilterOptions = chainFilterOption;
71327
71359
  let newChainFilterOption;
@@ -71365,12 +71397,12 @@ const NetworkFilter = ({ chainFilterOption, setChainFilterOption, }) => {
71365
71397
  top: '45px',
71366
71398
  right: '0px',
71367
71399
  width: '200px',
71368
- height: ['300px', '300px', '350px'],
71400
+ maxHeight: ['300px', '300px', '350px'],
71369
71401
  overflowY: 'scroll',
71370
71402
  borderRadius: 'normal',
71371
71403
  background: 'white2',
71372
71404
  zIndex: 1001,
71373
- }, children: ['All Chains', ...MAINNET_CHAINS].map((chainId) => {
71405
+ }, children: ['All Chains', ...chains].map((chainId) => {
71374
71406
  return (jsx$2(Flex, { sx: {
71375
71407
  borderRadius: 'normal',
71376
71408
  p: '5px 15px',
@@ -71513,6 +71545,8 @@ const YourBonds = () => {
71513
71545
 
71514
71546
  // This basically returns the 2 tags with the higher active bond count
71515
71547
  const useTopTags = (initialBondList) => {
71548
+ const SDKConfig = useSDKConfig();
71549
+ const chains = SDKConfig.chains;
71516
71550
  const bonds = initialBondList;
71517
71551
  const countTagsInBonds = (bonds) => {
71518
71552
  const tagCount = {};
@@ -71531,34 +71565,29 @@ const useTopTags = (initialBondList) => {
71531
71565
  });
71532
71566
  return tagCount;
71533
71567
  };
71534
- const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut);
71568
+ const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut && (chains === null || chains === void 0 ? void 0 : chains.includes(bond.chainId)));
71535
71569
  const countedTags = countTagsInBonds(activeBonds);
71536
71570
  const sortedTagsArray = Object.entries(countedTags).sort((a, b) => b[1] - a[1]);
71537
71571
  return sortedTagsArray.slice(0, 2).map((tagCountArray) => tagCountArray[0]);
71538
71572
  };
71539
71573
 
71540
71574
  const isBondSoldOut = (bill) => {
71541
- var _a;
71542
- const { tokensRemaining, discount, payoutTokenPrice } = bill;
71543
- if (bill.soldOut)
71544
- return true;
71545
- if (bill.inactive)
71546
- return true;
71547
- if (!tokensRemaining)
71548
- return false;
71549
- const thresholdToHide = new BigNumber$1(100).div(payoutTokenPrice !== null && payoutTokenPrice !== void 0 ? payoutTokenPrice : 0);
71550
- if (discount && discount > 50) {
71551
- // If discount is over 50% it will be hidden
71552
- // console.log('Soldout contract:', billAddress)
71553
- return true;
71554
- }
71555
- if (((_a = new BigNumber$1(tokensRemaining)) === null || _a === void 0 ? void 0 : _a.lte(thresholdToHide)) || discount === 100) {
71556
- // If there's less than 100 usd bond will be hidden
71557
- // console.log('Soldout contract: ', billAddress)
71558
- return true;
71559
- }
71560
- else
71561
- return false;
71575
+ return false;
71576
+ // const { tokensRemaining, discount, payoutTokenPrice } = bill
71577
+ // if (bill.soldOut) return true
71578
+ // if (bill.inactive) return true
71579
+ // if (!tokensRemaining) return false
71580
+ // const thresholdToHide = new BigNumber(100).div(payoutTokenPrice ?? 0)
71581
+ // if (discount && discount > 50) {
71582
+ // // If discount is over 50% it will be hidden
71583
+ // // console.log('Soldout contract:', billAddress)
71584
+ // return true
71585
+ // }
71586
+ // if (new BigNumber(tokensRemaining)?.lte(thresholdToHide) || discount === 100) {
71587
+ // // If there's less than 100 usd bond will be hidden
71588
+ // // console.log('Soldout contract: ', billAddress)
71589
+ // return true
71590
+ // } else return false
71562
71591
  };
71563
71592
  const sortBonds = (sortConfig, bonds) => {
71564
71593
  const bondsToSort = bonds !== null && bonds !== void 0 ? bonds : [];
@@ -72256,6 +72285,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, bondEarnToken, handleCurrencyS
72256
72285
 
72257
72286
  const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, bondEarnToken, modalVariant, }) => {
72258
72287
  var _a, _b;
72288
+ const { address: account } = useAccount();
72259
72289
  const tokenBalanceString = tokenBalance ? new BigNumber$1(tokenBalance).toPrecision(5) : 'loading';
72260
72290
  const splited = typeof selectedToken !== 'string' ? (_a = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.symbol) === null || _a === void 0 ? void 0 : _a.split('-') : undefined;
72261
72291
  const handleInputChange = (event) => {
@@ -72278,7 +72308,7 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId,
72278
72308
  : v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
72279
72309
  } }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default' }, children: [jsxs(Flex$1, { children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: chainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, chainId), size: 28, chain: chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, chainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { children: selectedTokenPrice && typedValue
72280
72310
  ? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
72281
- : '' }), jsxs(Flex$1, { children: [jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsxs(Flex$1, { className: "balancerow max", children: [tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant !== 'alt' && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })), tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant === 'alt' && (jsxs(Flex$1, { children: [jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 4).toString()), children: "25%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 2).toString()), children: "50%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) * 0.75).toString()), children: "75%" }), jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" })] }))] })] })] })] }));
72311
+ : '' }), jsxs(Flex$1, { children: [account && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsxs(Flex$1, { className: "balancerow max", children: [tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant !== 'alt' && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })), tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant === 'alt' && (jsxs(Flex$1, { children: [jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 4).toString()), children: "25%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 2).toString()), children: "50%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) * 0.75).toString()), children: "75%" }), jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" })] }))] })] })] })] }));
72282
72312
  };
72283
72313
 
72284
72314
  var NetworkNames;
@@ -72459,6 +72489,708 @@ const useSoulZapTokenQuote = (typedValue, inputCurrency, outputToken, chainId, a
72459
72489
  return [isLoading, response, estimateOutput, zapError];
72460
72490
  };
72461
72491
 
72492
+ var USDT_ETH_ABI = [
72493
+ {
72494
+ constant: true,
72495
+ inputs: [
72496
+ ],
72497
+ name: "name",
72498
+ outputs: [
72499
+ {
72500
+ name: "",
72501
+ type: "string"
72502
+ }
72503
+ ],
72504
+ payable: false,
72505
+ stateMutability: "view",
72506
+ type: "function"
72507
+ },
72508
+ {
72509
+ constant: false,
72510
+ inputs: [
72511
+ {
72512
+ name: "_upgradedAddress",
72513
+ type: "address"
72514
+ }
72515
+ ],
72516
+ name: "deprecate",
72517
+ outputs: [
72518
+ ],
72519
+ payable: false,
72520
+ stateMutability: "nonpayable",
72521
+ type: "function"
72522
+ },
72523
+ {
72524
+ constant: false,
72525
+ inputs: [
72526
+ {
72527
+ name: "_spender",
72528
+ type: "address"
72529
+ },
72530
+ {
72531
+ name: "_value",
72532
+ type: "uint256"
72533
+ }
72534
+ ],
72535
+ name: "approve",
72536
+ outputs: [
72537
+ ],
72538
+ payable: false,
72539
+ stateMutability: "nonpayable",
72540
+ type: "function"
72541
+ },
72542
+ {
72543
+ constant: true,
72544
+ inputs: [
72545
+ ],
72546
+ name: "deprecated",
72547
+ outputs: [
72548
+ {
72549
+ name: "",
72550
+ type: "bool"
72551
+ }
72552
+ ],
72553
+ payable: false,
72554
+ stateMutability: "view",
72555
+ type: "function"
72556
+ },
72557
+ {
72558
+ constant: false,
72559
+ inputs: [
72560
+ {
72561
+ name: "_evilUser",
72562
+ type: "address"
72563
+ }
72564
+ ],
72565
+ name: "addBlackList",
72566
+ outputs: [
72567
+ ],
72568
+ payable: false,
72569
+ stateMutability: "nonpayable",
72570
+ type: "function"
72571
+ },
72572
+ {
72573
+ constant: true,
72574
+ inputs: [
72575
+ ],
72576
+ name: "totalSupply",
72577
+ outputs: [
72578
+ {
72579
+ name: "",
72580
+ type: "uint256"
72581
+ }
72582
+ ],
72583
+ payable: false,
72584
+ stateMutability: "view",
72585
+ type: "function"
72586
+ },
72587
+ {
72588
+ constant: false,
72589
+ inputs: [
72590
+ {
72591
+ name: "_from",
72592
+ type: "address"
72593
+ },
72594
+ {
72595
+ name: "_to",
72596
+ type: "address"
72597
+ },
72598
+ {
72599
+ name: "_value",
72600
+ type: "uint256"
72601
+ }
72602
+ ],
72603
+ name: "transferFrom",
72604
+ outputs: [
72605
+ ],
72606
+ payable: false,
72607
+ stateMutability: "nonpayable",
72608
+ type: "function"
72609
+ },
72610
+ {
72611
+ constant: true,
72612
+ inputs: [
72613
+ ],
72614
+ name: "upgradedAddress",
72615
+ outputs: [
72616
+ {
72617
+ name: "",
72618
+ type: "address"
72619
+ }
72620
+ ],
72621
+ payable: false,
72622
+ stateMutability: "view",
72623
+ type: "function"
72624
+ },
72625
+ {
72626
+ constant: true,
72627
+ inputs: [
72628
+ {
72629
+ name: "",
72630
+ type: "address"
72631
+ }
72632
+ ],
72633
+ name: "balances",
72634
+ outputs: [
72635
+ {
72636
+ name: "",
72637
+ type: "uint256"
72638
+ }
72639
+ ],
72640
+ payable: false,
72641
+ stateMutability: "view",
72642
+ type: "function"
72643
+ },
72644
+ {
72645
+ constant: true,
72646
+ inputs: [
72647
+ ],
72648
+ name: "decimals",
72649
+ outputs: [
72650
+ {
72651
+ name: "",
72652
+ type: "uint256"
72653
+ }
72654
+ ],
72655
+ payable: false,
72656
+ stateMutability: "view",
72657
+ type: "function"
72658
+ },
72659
+ {
72660
+ constant: true,
72661
+ inputs: [
72662
+ ],
72663
+ name: "maximumFee",
72664
+ outputs: [
72665
+ {
72666
+ name: "",
72667
+ type: "uint256"
72668
+ }
72669
+ ],
72670
+ payable: false,
72671
+ stateMutability: "view",
72672
+ type: "function"
72673
+ },
72674
+ {
72675
+ constant: true,
72676
+ inputs: [
72677
+ ],
72678
+ name: "_totalSupply",
72679
+ outputs: [
72680
+ {
72681
+ name: "",
72682
+ type: "uint256"
72683
+ }
72684
+ ],
72685
+ payable: false,
72686
+ stateMutability: "view",
72687
+ type: "function"
72688
+ },
72689
+ {
72690
+ constant: false,
72691
+ inputs: [
72692
+ ],
72693
+ name: "unpause",
72694
+ outputs: [
72695
+ ],
72696
+ payable: false,
72697
+ stateMutability: "nonpayable",
72698
+ type: "function"
72699
+ },
72700
+ {
72701
+ constant: true,
72702
+ inputs: [
72703
+ {
72704
+ name: "_maker",
72705
+ type: "address"
72706
+ }
72707
+ ],
72708
+ name: "getBlackListStatus",
72709
+ outputs: [
72710
+ {
72711
+ name: "",
72712
+ type: "bool"
72713
+ }
72714
+ ],
72715
+ payable: false,
72716
+ stateMutability: "view",
72717
+ type: "function"
72718
+ },
72719
+ {
72720
+ constant: true,
72721
+ inputs: [
72722
+ {
72723
+ name: "",
72724
+ type: "address"
72725
+ },
72726
+ {
72727
+ name: "",
72728
+ type: "address"
72729
+ }
72730
+ ],
72731
+ name: "allowed",
72732
+ outputs: [
72733
+ {
72734
+ name: "",
72735
+ type: "uint256"
72736
+ }
72737
+ ],
72738
+ payable: false,
72739
+ stateMutability: "view",
72740
+ type: "function"
72741
+ },
72742
+ {
72743
+ constant: true,
72744
+ inputs: [
72745
+ ],
72746
+ name: "paused",
72747
+ outputs: [
72748
+ {
72749
+ name: "",
72750
+ type: "bool"
72751
+ }
72752
+ ],
72753
+ payable: false,
72754
+ stateMutability: "view",
72755
+ type: "function"
72756
+ },
72757
+ {
72758
+ constant: true,
72759
+ inputs: [
72760
+ {
72761
+ name: "who",
72762
+ type: "address"
72763
+ }
72764
+ ],
72765
+ name: "balanceOf",
72766
+ outputs: [
72767
+ {
72768
+ name: "",
72769
+ type: "uint256"
72770
+ }
72771
+ ],
72772
+ payable: false,
72773
+ stateMutability: "view",
72774
+ type: "function"
72775
+ },
72776
+ {
72777
+ constant: false,
72778
+ inputs: [
72779
+ ],
72780
+ name: "pause",
72781
+ outputs: [
72782
+ ],
72783
+ payable: false,
72784
+ stateMutability: "nonpayable",
72785
+ type: "function"
72786
+ },
72787
+ {
72788
+ constant: true,
72789
+ inputs: [
72790
+ ],
72791
+ name: "getOwner",
72792
+ outputs: [
72793
+ {
72794
+ name: "",
72795
+ type: "address"
72796
+ }
72797
+ ],
72798
+ payable: false,
72799
+ stateMutability: "view",
72800
+ type: "function"
72801
+ },
72802
+ {
72803
+ constant: true,
72804
+ inputs: [
72805
+ ],
72806
+ name: "owner",
72807
+ outputs: [
72808
+ {
72809
+ name: "",
72810
+ type: "address"
72811
+ }
72812
+ ],
72813
+ payable: false,
72814
+ stateMutability: "view",
72815
+ type: "function"
72816
+ },
72817
+ {
72818
+ constant: true,
72819
+ inputs: [
72820
+ ],
72821
+ name: "symbol",
72822
+ outputs: [
72823
+ {
72824
+ name: "",
72825
+ type: "string"
72826
+ }
72827
+ ],
72828
+ payable: false,
72829
+ stateMutability: "view",
72830
+ type: "function"
72831
+ },
72832
+ {
72833
+ constant: false,
72834
+ inputs: [
72835
+ {
72836
+ name: "_to",
72837
+ type: "address"
72838
+ },
72839
+ {
72840
+ name: "_value",
72841
+ type: "uint256"
72842
+ }
72843
+ ],
72844
+ name: "transfer",
72845
+ outputs: [
72846
+ ],
72847
+ payable: false,
72848
+ stateMutability: "nonpayable",
72849
+ type: "function"
72850
+ },
72851
+ {
72852
+ constant: false,
72853
+ inputs: [
72854
+ {
72855
+ name: "newBasisPoints",
72856
+ type: "uint256"
72857
+ },
72858
+ {
72859
+ name: "newMaxFee",
72860
+ type: "uint256"
72861
+ }
72862
+ ],
72863
+ name: "setParams",
72864
+ outputs: [
72865
+ ],
72866
+ payable: false,
72867
+ stateMutability: "nonpayable",
72868
+ type: "function"
72869
+ },
72870
+ {
72871
+ constant: false,
72872
+ inputs: [
72873
+ {
72874
+ name: "amount",
72875
+ type: "uint256"
72876
+ }
72877
+ ],
72878
+ name: "issue",
72879
+ outputs: [
72880
+ ],
72881
+ payable: false,
72882
+ stateMutability: "nonpayable",
72883
+ type: "function"
72884
+ },
72885
+ {
72886
+ constant: false,
72887
+ inputs: [
72888
+ {
72889
+ name: "amount",
72890
+ type: "uint256"
72891
+ }
72892
+ ],
72893
+ name: "redeem",
72894
+ outputs: [
72895
+ ],
72896
+ payable: false,
72897
+ stateMutability: "nonpayable",
72898
+ type: "function"
72899
+ },
72900
+ {
72901
+ constant: true,
72902
+ inputs: [
72903
+ {
72904
+ name: "_owner",
72905
+ type: "address"
72906
+ },
72907
+ {
72908
+ name: "_spender",
72909
+ type: "address"
72910
+ }
72911
+ ],
72912
+ name: "allowance",
72913
+ outputs: [
72914
+ {
72915
+ name: "remaining",
72916
+ type: "uint256"
72917
+ }
72918
+ ],
72919
+ payable: false,
72920
+ stateMutability: "view",
72921
+ type: "function"
72922
+ },
72923
+ {
72924
+ constant: true,
72925
+ inputs: [
72926
+ ],
72927
+ name: "basisPointsRate",
72928
+ outputs: [
72929
+ {
72930
+ name: "",
72931
+ type: "uint256"
72932
+ }
72933
+ ],
72934
+ payable: false,
72935
+ stateMutability: "view",
72936
+ type: "function"
72937
+ },
72938
+ {
72939
+ constant: true,
72940
+ inputs: [
72941
+ {
72942
+ name: "",
72943
+ type: "address"
72944
+ }
72945
+ ],
72946
+ name: "isBlackListed",
72947
+ outputs: [
72948
+ {
72949
+ name: "",
72950
+ type: "bool"
72951
+ }
72952
+ ],
72953
+ payable: false,
72954
+ stateMutability: "view",
72955
+ type: "function"
72956
+ },
72957
+ {
72958
+ constant: false,
72959
+ inputs: [
72960
+ {
72961
+ name: "_clearedUser",
72962
+ type: "address"
72963
+ }
72964
+ ],
72965
+ name: "removeBlackList",
72966
+ outputs: [
72967
+ ],
72968
+ payable: false,
72969
+ stateMutability: "nonpayable",
72970
+ type: "function"
72971
+ },
72972
+ {
72973
+ constant: true,
72974
+ inputs: [
72975
+ ],
72976
+ name: "MAX_UINT",
72977
+ outputs: [
72978
+ {
72979
+ name: "",
72980
+ type: "uint256"
72981
+ }
72982
+ ],
72983
+ payable: false,
72984
+ stateMutability: "view",
72985
+ type: "function"
72986
+ },
72987
+ {
72988
+ constant: false,
72989
+ inputs: [
72990
+ {
72991
+ name: "newOwner",
72992
+ type: "address"
72993
+ }
72994
+ ],
72995
+ name: "transferOwnership",
72996
+ outputs: [
72997
+ ],
72998
+ payable: false,
72999
+ stateMutability: "nonpayable",
73000
+ type: "function"
73001
+ },
73002
+ {
73003
+ constant: false,
73004
+ inputs: [
73005
+ {
73006
+ name: "_blackListedUser",
73007
+ type: "address"
73008
+ }
73009
+ ],
73010
+ name: "destroyBlackFunds",
73011
+ outputs: [
73012
+ ],
73013
+ payable: false,
73014
+ stateMutability: "nonpayable",
73015
+ type: "function"
73016
+ },
73017
+ {
73018
+ inputs: [
73019
+ {
73020
+ name: "_initialSupply",
73021
+ type: "uint256"
73022
+ },
73023
+ {
73024
+ name: "_name",
73025
+ type: "string"
73026
+ },
73027
+ {
73028
+ name: "_symbol",
73029
+ type: "string"
73030
+ },
73031
+ {
73032
+ name: "_decimals",
73033
+ type: "uint256"
73034
+ }
73035
+ ],
73036
+ payable: false,
73037
+ stateMutability: "nonpayable",
73038
+ type: "constructor"
73039
+ },
73040
+ {
73041
+ anonymous: false,
73042
+ inputs: [
73043
+ {
73044
+ indexed: false,
73045
+ name: "amount",
73046
+ type: "uint256"
73047
+ }
73048
+ ],
73049
+ name: "Issue",
73050
+ type: "event"
73051
+ },
73052
+ {
73053
+ anonymous: false,
73054
+ inputs: [
73055
+ {
73056
+ indexed: false,
73057
+ name: "amount",
73058
+ type: "uint256"
73059
+ }
73060
+ ],
73061
+ name: "Redeem",
73062
+ type: "event"
73063
+ },
73064
+ {
73065
+ anonymous: false,
73066
+ inputs: [
73067
+ {
73068
+ indexed: false,
73069
+ name: "newAddress",
73070
+ type: "address"
73071
+ }
73072
+ ],
73073
+ name: "Deprecate",
73074
+ type: "event"
73075
+ },
73076
+ {
73077
+ anonymous: false,
73078
+ inputs: [
73079
+ {
73080
+ indexed: false,
73081
+ name: "feeBasisPoints",
73082
+ type: "uint256"
73083
+ },
73084
+ {
73085
+ indexed: false,
73086
+ name: "maxFee",
73087
+ type: "uint256"
73088
+ }
73089
+ ],
73090
+ name: "Params",
73091
+ type: "event"
73092
+ },
73093
+ {
73094
+ anonymous: false,
73095
+ inputs: [
73096
+ {
73097
+ indexed: false,
73098
+ name: "_blackListedUser",
73099
+ type: "address"
73100
+ },
73101
+ {
73102
+ indexed: false,
73103
+ name: "_balance",
73104
+ type: "uint256"
73105
+ }
73106
+ ],
73107
+ name: "DestroyedBlackFunds",
73108
+ type: "event"
73109
+ },
73110
+ {
73111
+ anonymous: false,
73112
+ inputs: [
73113
+ {
73114
+ indexed: false,
73115
+ name: "_user",
73116
+ type: "address"
73117
+ }
73118
+ ],
73119
+ name: "AddedBlackList",
73120
+ type: "event"
73121
+ },
73122
+ {
73123
+ anonymous: false,
73124
+ inputs: [
73125
+ {
73126
+ indexed: false,
73127
+ name: "_user",
73128
+ type: "address"
73129
+ }
73130
+ ],
73131
+ name: "RemovedBlackList",
73132
+ type: "event"
73133
+ },
73134
+ {
73135
+ anonymous: false,
73136
+ inputs: [
73137
+ {
73138
+ indexed: true,
73139
+ name: "owner",
73140
+ type: "address"
73141
+ },
73142
+ {
73143
+ indexed: true,
73144
+ name: "spender",
73145
+ type: "address"
73146
+ },
73147
+ {
73148
+ indexed: false,
73149
+ name: "value",
73150
+ type: "uint256"
73151
+ }
73152
+ ],
73153
+ name: "Approval",
73154
+ type: "event"
73155
+ },
73156
+ {
73157
+ anonymous: false,
73158
+ inputs: [
73159
+ {
73160
+ indexed: true,
73161
+ name: "from",
73162
+ type: "address"
73163
+ },
73164
+ {
73165
+ indexed: true,
73166
+ name: "to",
73167
+ type: "address"
73168
+ },
73169
+ {
73170
+ indexed: false,
73171
+ name: "value",
73172
+ type: "uint256"
73173
+ }
73174
+ ],
73175
+ name: "Transfer",
73176
+ type: "event"
73177
+ },
73178
+ {
73179
+ anonymous: false,
73180
+ inputs: [
73181
+ ],
73182
+ name: "Pause",
73183
+ type: "event"
73184
+ },
73185
+ {
73186
+ anonymous: false,
73187
+ inputs: [
73188
+ ],
73189
+ name: "Unpause",
73190
+ type: "event"
73191
+ }
73192
+ ];
73193
+
72462
73194
  /**
72463
73195
  * useAllowance hook: fetches the amount approved by the user for a given token
72464
73196
  * useApproval hook: returns the approval state (not approved, pending or approved) and a function to approve on chain
@@ -72537,7 +73269,9 @@ const useApproval = (amount, currency, spender, account, chainId) => {
72537
73269
  setConfirmingTxOnWallet(true);
72538
73270
  const hash = yield writeContractAsync({
72539
73271
  address: tokenAddress,
72540
- abi: ERC_20_ABI,
73272
+ abi: (tokenAddress === null || tokenAddress === void 0 ? void 0 : tokenAddress.toLowerCase()) === '0xdAC17F958D2ee523a2206206994597C13D831ec7'.toLowerCase()
73273
+ ? USDT_ETH_ABI
73274
+ : ERC_20_ABI,
72541
73275
  functionName: 'approve',
72542
73276
  args: [spender, bigishAmount],
72543
73277
  });
@@ -73061,7 +73795,11 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
73061
73795
 
73062
73796
  const BondCards = ({ bondData }) => {
73063
73797
  var _a, _b, _c, _d, _e, _f, _g, _h;
73064
- return (jsxs("div", { className: "bonds-cards", children: [jsxs("div", { className: "bond-card-block", style: { color: getDiscountColor(bondData === null || bondData === void 0 ? void 0 : bondData.discount) }, children: [jsxs("div", { className: "bond-card-title", children: ["Discount", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2("div", { className: "bond-card-content", children: `${(_a = bondData === null || bondData === void 0 ? void 0 : bondData.discount) === null || _a === void 0 ? void 0 : _a.toFixed(2)}%` })] }), jsxs("div", { className: "bond-card-block hide-mobile", children: [jsxs("div", { className: "bond-card-title", children: ["ARR", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2("div", { className: "bond-card-content", children: `${((((_b = bondData === null || bondData === void 0 ? void 0 : bondData.discount) !== null && _b !== void 0 ? _b : 0) * 365) / vestingTime((_c = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _c !== void 0 ? _c : 0).days).toFixed(2)}%` })] }), jsxs("div", { className: "bond-card-block", children: [jsxs("div", { className: "bond-card-title", children: ["Terms", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2("div", { className: "bond-card-content", children: vestingTime((_d = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _d !== void 0 ? _d : 0).days ? `${vestingTime((_e = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _e !== void 0 ? _e : 0).days} D` : '-' })] }), jsxs("div", { className: "bond-card-block", children: [jsxs("div", { className: "bond-card-title", children: ["Max Buy", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.MaxBuy((_f = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _f === void 0 ? void 0 : _f.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs("div", { className: "bond-card-content", children: [jsx$2("div", { style: { paddingRight: '3px' }, children: jsx$2(TokenImage, { symbol: (_g = bondData.showcaseTokenName) !== null && _g !== void 0 ? _g : bondData.earnToken.symbol, size: 20 }) }), (_h = parseFloat(maxBuy(bondData).toFixed(0))) === null || _h === void 0 ? void 0 : _h.toLocaleString('en-US')] })] })] }));
73798
+ return (jsxs("div", { className: "bonds-cards", children: [jsxs("div", { className: "bond-card-block", style: { color: getDiscountColor(bondData === null || bondData === void 0 ? void 0 : bondData.discount) }, children: [jsxs("div", { className: "bond-card-title", children: ["Discount", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2("div", { className: "bond-card-content", children: `${(_a = bondData === null || bondData === void 0 ? void 0 : bondData.discount) === null || _a === void 0 ? void 0 : _a.toFixed(2)}%` })] }), bondData.type !== 'staking' && (jsxs("div", { className: "bond-card-block hide-mobile", children: [jsxs("div", { className: "bond-card-title", children: ["ARR", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2("div", { className: "bond-card-content", children: `${((((_b = bondData === null || bondData === void 0 ? void 0 : bondData.discount) !== null && _b !== void 0 ? _b : 0) * 365) / vestingTime((_c = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _c !== void 0 ? _c : 0).days).toFixed(2)}%` })] })), jsxs("div", { className: "bond-card-block", children: [jsxs("div", { className: "bond-card-title", children: ["Terms", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2("div", { className: "bond-card-content", children: bondData.type === 'staking'
73799
+ ? `${daysLeftOnBasepadPool()} D Lock`
73800
+ : vestingTime((_d = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _d !== void 0 ? _d : 0).days
73801
+ ? `${vestingTime((_e = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _e !== void 0 ? _e : 0).days} D`
73802
+ : '-' })] }), jsxs("div", { className: "bond-card-block", children: [jsxs("div", { className: "bond-card-title", children: ["Max Buy", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.MaxBuy((_f = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _f === void 0 ? void 0 : _f.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs("div", { className: "bond-card-content", children: [jsx$2("div", { style: { paddingRight: '3px' }, children: jsx$2(TokenImage, { symbol: (_g = bondData.showcaseTokenName) !== null && _g !== void 0 ? _g : bondData.earnToken.symbol, size: 20 }) }), (_h = parseFloat(maxBuy(bondData).toFixed(0))) === null || _h === void 0 ? void 0 : _h.toLocaleString('en-US')] })] })] }));
73065
73803
  };
73066
73804
 
73067
73805
  const Estimations = ({ bondData, inputValue, inputToken, estimatedOutput, inputTokenPrice, isZap, fetchingZapQuote, zapError, }) => {
@@ -73370,7 +74108,16 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
73370
74108
  window.open(`https://ape.bond/swap?outputcurrency=${bondData === null || bondData === void 0 ? void 0 : bondData.lpToken.address[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]}&outputChain=${bondData === null || bondData === void 0 ? void 0 : bondData.chainId}`, '_blank');
73371
74109
  }
73372
74110
  };
73373
- return (jsx$2(Modal, { className: "modal", onDismiss: onDismiss, children: modalVariant === 'standard' ? (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white', fontSize: '14px', mb: '10px' }, children: ["Dev mode - Current view: \"standard\"", jsx$2(Text, { onClick: () => setModalVariant('alt'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(BondCards, { bondData: bondData }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
74111
+ return (jsx$2(Modal, { className: "modal", onDismiss: onDismiss, children: modalVariant === 'standard' ? (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white', fontSize: '14px', mb: '10px' }, children: ["Dev mode - Current view: \"standard\"", jsx$2(Text, { onClick: () => setModalVariant('alt'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(BondCards, { bondData: bondData }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), bondData.type === 'staking' && (jsxs(Flex, { sx: {
74112
+ p: '5px 10px',
74113
+ width: '100%',
74114
+ background: '#8E568F',
74115
+ borderRadius: 'normal',
74116
+ mt: '10px',
74117
+ fontSize: '12px',
74118
+ fontWeight: 400,
74119
+ justifyContent: 'center',
74120
+ }, children: ["Tokens bought through this bond will go directly to the BPAD staking pool with a", ' ', daysLeftOnBasepadPool(), " days lock."] })), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
73374
74121
  event.stopPropagation();
73375
74122
  switchChain({ chainId: bondData.chainId });
73376
74123
  }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
@@ -73644,7 +74391,7 @@ const BondRow = ({ bond }) => {
73644
74391
  const tokens = new BigNumber$1(tokensRemaining);
73645
74392
  return tokens.times(payoutTokenPrice);
73646
74393
  };
73647
- return (jsxs("div", { className: "bond-row", onClick: handleOpenModal, children: [jsx$2("div", { className: "token-info-container bond-market", children: jsx$2(TokenInfoAndName, { bill: bond }) }), jsxs("div", { className: "bond-info-columns", children: [jsx$2("div", { className: `discount-column ${getDiscountColor(discount)}`, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' }), jsx$2("div", { className: "arr-column", children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' }), jsx$2("div", { className: "terms-column", children: ((_a = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _a === void 0 ? void 0 : _a.days) ? `${(_b = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _b === void 0 ? void 0 : _b.days} D` : '-' }), jsx$2("div", { className: "tokens-remaining-column", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bond) }), style: {
74394
+ return (jsxs("div", { className: "bond-row", onClick: handleOpenModal, children: [jsx$2("div", { className: "token-info-container", children: jsx$2(TokenInfoAndName, { bill: bond }) }), jsxs("div", { className: "bond-info-columns", children: [jsx$2("div", { className: `discount-column ${getDiscountColor(discount)}`, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' }), jsx$2("div", { className: "arr-column", children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' }), jsx$2("div", { className: "terms-column", children: ((_a = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _a === void 0 ? void 0 : _a.days) ? `${(_b = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _b === void 0 ? void 0 : _b.days} D` : '-' }), jsx$2("div", { className: "tokens-remaining-column", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bond) }), style: {
73648
74395
  width: '127px',
73649
74396
  height: '25px',
73650
74397
  flexDirection: 'column',
@@ -73712,7 +74459,7 @@ const getHotBonds = (bondData, hotBondContracts) => __awaiter$9(void 0, void 0,
73712
74459
  const HotBondCards = () => {
73713
74460
  var _a;
73714
74461
  const { data: hotBonds } = useHotBonds();
73715
- const filteredBonds = (_a = hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.sort((a, b) => { var _a, _b; return ((_a = b === null || b === void 0 ? void 0 : b.discount) !== null && _a !== void 0 ? _a : 0) - ((_b = a === null || a === void 0 ? void 0 : a.discount) !== null && _b !== void 0 ? _b : 0); })) === null || _a === void 0 ? void 0 : _a.filter((bond) => { var _a; return ((_a = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _a !== void 0 ? _a : 0) > 0; });
74462
+ const filteredBonds = (_a = hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.sort((a, b) => { var _a, _b; return ((_a = b === null || b === void 0 ? void 0 : b.discount) !== null && _a !== void 0 ? _a : 0) - ((_b = a === null || a === void 0 ? void 0 : a.discount) !== null && _b !== void 0 ? _b : 0); })) === null || _a === void 0 ? void 0 : _a.filter((bond) => (bond === null || bond === void 0 ? void 0 : bond.discount) > 0 && (bond === null || bond === void 0 ? void 0 : bond.discount) < 50);
73716
74463
  const [activeSlide, setActiveSlide] = useState(0);
73717
74464
  const { swiper, setSwiper } = useSwiper();
73718
74465
  const handleSlide = (event) => {
@@ -73756,7 +74503,7 @@ const BondRowsWithTitle = ({ chain, bonds, hideTitles, showHotBonds }) => {
73756
74503
  overflow: 'hidden',
73757
74504
  width: '100%',
73758
74505
  marginTop: '0px',
73759
- }, children: [billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map((bond, index) => {
74506
+ }, className: "bonds-card-container", children: [billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map((bond, index) => {
73760
74507
  var _a, _b;
73761
74508
  return (jsx$2(BondRow
73762
74509
  //@ts-ignore
@@ -73794,10 +74541,12 @@ function useUserApiStats() {
73794
74541
  const BuyAgainRow = () => {
73795
74542
  const { data: userData } = useUserApiStats();
73796
74543
  const { data: bills } = useBondsData();
74544
+ const SDKConfig = useSDKConfig();
74545
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
73797
74546
  const buyAgainBond = useMemo(() => {
73798
74547
  if (userData && (userData === null || userData === void 0 ? void 0 : userData.Sales.length) > 0) {
73799
74548
  const sortedPurchases = userData === null || userData === void 0 ? void 0 : userData.Sales.sort((a, b) => b.dollarValue - a.dollarValue);
73800
- const activeBills = bills === null || bills === void 0 ? void 0 : bills.filter((bill) => !isBondSoldOut(bill));
74549
+ const activeBills = bills === null || bills === void 0 ? void 0 : bills.filter((bill) => (chains === null || chains === void 0 ? void 0 : chains.includes(bill.chainId)));
73801
74550
  const highestActivePurchase = sortedPurchases === null || sortedPurchases === void 0 ? void 0 : sortedPurchases.find((purchase) => activeBills === null || activeBills === void 0 ? void 0 : activeBills.find((bill) => {
73802
74551
  var _a;
73803
74552
  if (purchase.contractAddress.toLowerCase() === ((_a = bill === null || bill === void 0 ? void 0 : bill.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()))
@@ -73805,7 +74554,7 @@ const BuyAgainRow = () => {
73805
74554
  }));
73806
74555
  return activeBills === null || activeBills === void 0 ? void 0 : activeBills.find((bill) => { var _a, _b; return ((_a = bill === null || bill === void 0 ? void 0 : bill.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = highestActivePurchase === null || highestActivePurchase === void 0 ? void 0 : highestActivePurchase.contractAddress) === null || _b === void 0 ? void 0 : _b.toLowerCase()); });
73807
74556
  }
73808
- }, [bills, userData === null || userData === void 0 ? void 0 : userData.Sales.length]);
74557
+ }, [bills, userData === null || userData === void 0 ? void 0 : userData.Sales.length, chains]);
73809
74558
  return buyAgainBond ? (jsx$2(AnimatePresence, { children: jsx$2(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
73810
74559
  position: 'relative',
73811
74560
  overflow: 'hidden',
@@ -73959,13 +74708,14 @@ const Bonds = () => {
73959
74708
  const [filterOption, setFilterOption] = useState('ALL');
73960
74709
  const sortedBonds = sortBonds(sortConfig, bondData);
73961
74710
  const topTags = useTopTags(sortedBonds);
74711
+ // remove favorites for seedify
73962
74712
  const filterOptions = SDKConfig.referenceId !== 'seedify' ? ['ALL', 'FAVORITES', ...topTags, 'SOLD OUT'] : ['ALL', ...topTags, 'SOLD OUT'];
73963
74713
  const billsToRender = useMemo(() => {
73964
74714
  let billsToReturn = filterOption === 'SOLD OUT' ? (allBonds !== null && allBonds !== void 0 ? allBonds : []) : (sortedBonds !== null && sortedBonds !== void 0 ? sortedBonds : []);
73965
74715
  if (searchQuery) {
73966
74716
  billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bill) => {
73967
74717
  var _a, _b;
73968
- return [`${(_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol.toUpperCase()}`, `${(_b = bill === null || bill === void 0 ? void 0 : bill.lpToken) === null || _b === void 0 ? void 0 : _b.symbol.toUpperCase()}`].includes(searchQuery.toUpperCase());
74718
+ return [`${(_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol.toUpperCase()}`, `${(_b = bill === null || bill === void 0 ? void 0 : bill.lpToken) === null || _b === void 0 ? void 0 : _b.symbol.toUpperCase()}`].some((property) => property === null || property === void 0 ? void 0 : property.includes(searchQuery.toUpperCase()));
73969
74719
  });
73970
74720
  }
73971
74721
  if (topTags.includes(filterOption)) {
@@ -73975,7 +74725,7 @@ const Bonds = () => {
73975
74725
  billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bill) => { var _a; return chainFilterOption === null || chainFilterOption === void 0 ? void 0 : chainFilterOption.includes((_a = bill === null || bill === void 0 ? void 0 : bill.chainId) === null || _a === void 0 ? void 0 : _a.toString()); });
73976
74726
  }
73977
74727
  if (filterOption !== 'SOLD OUT') {
73978
- billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bond) => !isBondSoldOut(bond));
74728
+ billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bond) => !isBondSoldOut());
73979
74729
  }
73980
74730
  if (filterOption === 'SOLD OUT') {
73981
74731
  billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bond) => !bond.soldOut);
@@ -73996,7 +74746,7 @@ const Bonds = () => {
73996
74746
  const handleChangeFilterOption = useCallback((newOption) => {
73997
74747
  setFilterOption(newOption);
73998
74748
  }, []);
73999
- return (jsxs(Flex$1, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
74749
+ return (jsxs(Flex$1, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), SDKConfig.useHotBonds && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
74000
74750
  width: '100%',
74001
74751
  height: '300px',
74002
74752
  background: 'white2',
@@ -74005,7 +74755,7 @@ const Bonds = () => {
74005
74755
  alignItems: 'center',
74006
74756
  flexDirection: 'column',
74007
74757
  mt: '10px',
74008
- }, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), jsx$2(RecommendationCards$1, {})] }));
74758
+ }, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), SDKConfig.useHotBonds && jsx$2(RecommendationCards$1, {})] }));
74009
74759
  };
74010
74760
 
74011
74761
  var BondsViewOptions;
@@ -2,4 +2,4 @@ import { UseQueryResult } from '@tanstack/react-query';
2
2
  import { BillsConfig } from '@ape.swap/apeswap-lists';
3
3
  import { UserBill } from '../../types/yourbonds';
4
4
  export default function useUserBonds(): UseQueryResult<UserBill[]>;
5
- export declare const getUserBonds: (account: string, bondList: BillsConfig[]) => Promise<UserBill[]>;
5
+ export declare const getUserBonds: (account: string, bondList: BillsConfig[], chains: number[]) => Promise<UserBill[]>;
package/dist/styles.css CHANGED
@@ -255,7 +255,7 @@
255
255
  padding-left: 10px;
256
256
  }
257
257
 
258
- .modaltable-container.description-container {
258
+ .description-container {
259
259
  display: flex;
260
260
  align-items: flex-start;
261
261
  font-weight: 400;
@@ -1745,8 +1745,8 @@ span.flex-inline {
1745
1745
  background-color: rgba(255, 255, 255, 0.1);
1746
1746
  backdrop-filter: blur(34px);
1747
1747
  border-radius: 10px;
1748
- justify-content: start;
1749
- align-items: start;
1748
+ justify-content: flex-start;
1749
+ align-items: flex-start;
1750
1750
  flex-direction: column;
1751
1751
  padding: 10px 8px 10px 8px;
1752
1752
  margin-top: -3px;
@@ -1754,7 +1754,7 @@ span.flex-inline {
1754
1754
 
1755
1755
  .sharebondimage-container-discount {
1756
1756
  display: flex;
1757
- justify-content: start;
1757
+ justify-content: flex-start;
1758
1758
  align-items: center;
1759
1759
  width: 100%;
1760
1760
  background-color: rgba(255, 255, 255, 0.05);
@@ -0,0 +1 @@
1
+ export declare const daysLeftOnBasepadPool: () => number;
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": "2.1.0",
6
+ "version": "2.1.1-test.2",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -56,7 +56,7 @@
56
56
  "yalc": "^1.0.0-pre.53"
57
57
  },
58
58
  "dependencies": {
59
- "@ape.swap/apeswap-lists": "3.70.1",
59
+ "@ape.swap/apeswap-lists": "3.71.0",
60
60
  "@emotion/react": "^11.11.4",
61
61
  "bignumber.js": "^9.1.2",
62
62
  "chart.js": "4.2.0",