@ape.swap/bonds-sdk 4.1.2-test.2 → 4.1.3-test.11
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
|
@@ -63344,7 +63344,7 @@ const stagingUrls = {
|
|
|
63344
63344
|
};
|
|
63345
63345
|
const useSDKConfig = (config) => {
|
|
63346
63346
|
const urls = process.env.NODE_ENV === 'production' ? defaultUrls : stagingUrls;
|
|
63347
|
-
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], hotBondChains: [types$1.ChainId.BSC, types$1.ChainId.MATIC], useHotBonds: true, connector: 'default', useTiers: false, useTGEBonds: false, showLowValueBonds: false, bondPartner: undefined, namingPreference: 'Bonus' }, config), { urls: Object.assign(Object.assign({}, urls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.2.0' });
|
|
63347
|
+
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], hotBondChains: [types$1.ChainId.BSC, types$1.ChainId.MATIC], useHotBonds: true, connector: 'default', useTiers: false, useTGEBonds: false, showLowValueBonds: false, bondPartner: undefined, namingPreference: 'Bonus', useCardsView: false }, config), { urls: Object.assign(Object.assign({}, urls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.2.0' });
|
|
63348
63348
|
const { data } = useQuery({
|
|
63349
63349
|
queryKey: [QUERY_KEYS.SDK_CONFIG],
|
|
63350
63350
|
queryFn: () => {
|
|
@@ -69412,9 +69412,9 @@ const NftImage = ({ userBill, showNFTImg, setShowNFTImg, }) => {
|
|
|
69412
69412
|
event.stopPropagation();
|
|
69413
69413
|
setIsOpenTraits(!isOpenTraits);
|
|
69414
69414
|
}, children: jsx$2(Flex, { sx: { flexDirection: 'column' }, children: attributes
|
|
69415
|
-
? attributes.map((a) => (jsxs(Flex, { sx: { background: 'white4', width: '100%', padding: '2px 8px', height: '22px' }, children: [
|
|
69416
|
-
: BILL_ATTRIBUTES.map((attrib) => {
|
|
69417
|
-
return (jsxs(Flex, { sx: { background: 'white4', width: '100%', padding: '2px 8px', height: '22px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, attrib));
|
|
69415
|
+
? attributes.map((a, index) => (jsxs(Flex, { sx: { background: 'white4', width: '100%', padding: '2px 8px', height: '22px' }, children: [jsxs(Text, { sx: { fontSize: '10px', fontWeight: 500, mr: '3px' }, 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}-${index}`)))
|
|
69416
|
+
: BILL_ATTRIBUTES.map((attrib, index) => {
|
|
69417
|
+
return (jsxs(Flex, { sx: { background: 'white4', width: '100%', padding: '2px 8px', height: '22px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, `${attrib}-${index}`));
|
|
69418
69418
|
}) }) })) })] }) }))] })) })] }));
|
|
69419
69419
|
};
|
|
69420
69420
|
|
|
@@ -76388,7 +76388,7 @@ const YourBondsModal = ({ userBill, onDismiss }) => {
|
|
|
76388
76388
|
p: '4px 10px',
|
|
76389
76389
|
background: 'white3',
|
|
76390
76390
|
borderRadius: '10px 10px 0px 0px',
|
|
76391
|
-
}, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Vesting Progress" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(Flex, { sx: { alignItems: 'center' }, children: isPendingCliff ? (jsxs(Fragment$1, { children: ["claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`] })) : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(userBill) }), style: {
|
|
76391
|
+
}, children: [jsxs(Flex, { sx: { alignItems: 'center', gap: '5px' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Vesting Progress" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(Flex, { sx: { alignItems: 'center' }, children: isPendingCliff ? (jsxs(Fragment$1, { children: ["claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`] })) : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(userBill) }), style: {
|
|
76392
76392
|
width: '100px',
|
|
76393
76393
|
flexDirection: 'column',
|
|
76394
76394
|
alignItems: 'center',
|
|
@@ -76401,7 +76401,7 @@ const YourBondsModal = ({ userBill, onDismiss }) => {
|
|
|
76401
76401
|
p: '4px 10px',
|
|
76402
76402
|
background: 'white4',
|
|
76403
76403
|
height: '26px',
|
|
76404
|
-
}, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Pending" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: payoutTokenSymbol, size: 18 }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 700, ml: '10px' }, children: formatNumberSI(pending(userBill), 4) }), jsxs(Text, { sx: {
|
|
76404
|
+
}, children: [jsxs(Flex, { sx: { alignItems: 'center', gap: '5px' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Pending" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: payoutTokenSymbol, size: 18 }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 700, ml: '10px' }, children: formatNumberSI(pending(userBill), 4) }), jsxs(Text, { sx: {
|
|
76405
76405
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
76406
76406
|
fontWeight: 400,
|
|
76407
76407
|
ml: '10px',
|
|
@@ -76413,7 +76413,7 @@ const YourBondsModal = ({ userBill, onDismiss }) => {
|
|
|
76413
76413
|
p: '4px 10px',
|
|
76414
76414
|
background: 'white3',
|
|
76415
76415
|
height: '26px',
|
|
76416
|
-
}, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Claimable" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: payoutTokenSymbol, size: 18 }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 700, ml: '10px' }, children: formatNumberSI(claimable(userBill), 4) }), jsxs(Text, { sx: {
|
|
76416
|
+
}, children: [jsxs(Flex, { sx: { alignItems: 'center', gap: '5px' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Claimable" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: payoutTokenSymbol, size: 18 }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 700, ml: '10px' }, children: formatNumberSI(claimable(userBill), 4) }), jsxs(Text, { sx: {
|
|
76417
76417
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
76418
76418
|
fontWeight: 400,
|
|
76419
76419
|
ml: '10px',
|
|
@@ -76426,7 +76426,7 @@ const YourBondsModal = ({ userBill, onDismiss }) => {
|
|
|
76426
76426
|
background: 'white4',
|
|
76427
76427
|
height: '26px',
|
|
76428
76428
|
borderRadius: '0px 0px 10px 10px',
|
|
76429
|
-
}, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Claimed" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.Claimed }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: payoutTokenSymbol, size: 18 }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 700, ml: '10px' }, children: formatNumberSI(claimed(userBill), 4) }), jsxs(Text, { sx: {
|
|
76429
|
+
}, children: [jsxs(Flex, { sx: { alignItems: 'center', gap: '5px' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Claimed" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.Claimed }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: payoutTokenSymbol, size: 18 }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 700, ml: '10px' }, children: formatNumberSI(claimed(userBill), 4) }), jsxs(Text, { sx: {
|
|
76430
76430
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
76431
76431
|
fontWeight: 400,
|
|
76432
76432
|
ml: '10px',
|
|
@@ -77160,8 +77160,8 @@ const YourBonds = ({ showOnly }) => {
|
|
|
77160
77160
|
return (jsxs(Flex$1, { className: "yourbonds table-container", children: [!showOnly && (jsx$2(YourBondsMenu, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleFilterOption, setInputValue: setInputValue, inputValue: inputValue, handleSort: handleSort })), !account && !solanaAccount ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: 'You are not connected.' }) })) : hasBonds && hasFetched ? (jsxs(Fragment$1, { children: [preTGEBondsToRender === null || preTGEBondsToRender === void 0 ? void 0 : preTGEBondsToRender.map((userBond, index) => (jsx$2(UserBondRowPreTGE, { userBond: userBond }, index))), bondsToRender.map((bond) => {
|
|
77161
77161
|
var _a;
|
|
77162
77162
|
if (((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.chainId) === types$1.ChainId.SOL)
|
|
77163
|
-
return jsx$2(UserBondRowSolana, { bill: bond }, `${bond.billNftAddress}-${bond.id}`);
|
|
77164
|
-
return jsx$2(UserBondRow, { bill: bond }, bond.id);
|
|
77163
|
+
return jsx$2(UserBondRowSolana, { bill: bond }, `${bond === null || bond === void 0 ? void 0 : bond.billNftAddress}-${bond.id}`);
|
|
77164
|
+
return jsx$2(UserBondRow, { bill: bond }, `${bond === null || bond === void 0 ? void 0 : bond.id}-${bond === null || bond === void 0 ? void 0 : bond.billNftAddress}`);
|
|
77165
77165
|
})] })) : inputValue !== '' || !chainFilterOption.includes('All Chains') ? (jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' })) : hasFetched && !hasBonds ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: `You do not own any ${account && solanaAccount ? 'EVM nor SOL' : account ? 'EVM' : 'SOL'} Bonds.` }) })) : (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(Spinner, { size: 100 }) })), jsxs(Flex$1, { sx: { width: '100%', flexDirection: ['column', 'column', 'column', 'row'], gap: '10px', my: '10px' }, children: [!solanaAccount && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToSolanaCard, {}) })), !account && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToEVMBanner, {}) }))] })] }));
|
|
77166
77166
|
};
|
|
77167
77167
|
|
|
@@ -78227,7 +78227,7 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
|
|
|
78227
78227
|
!!v.currentTarget.value && isNumber$1(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
|
|
78228
78228
|
? v.currentTarget.value
|
|
78229
78229
|
: v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
|
|
78230
|
-
}, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default', borderRadius: 'normal' }, 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: bondChainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, bondChainId), size: 28, chain: bondChainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, bondChainId) })] }), 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
|
|
78230
|
+
}, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default', borderRadius: 'normal' }, children: [jsxs(Flex$1, { sx: { alignItems: 'center', gap: '10px' }, 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: bondChainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, bondChainId), size: 28, chain: bondChainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, bondChainId) })] }), 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
|
|
78231
78231
|
? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
|
|
78232
78232
|
: '' }), jsxs(Flex$1, { children: [showBalance && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsx$2(Flex$1, { className: "balancerow max", children: showBalance && tokenBalance && tokenBalance !== '0' && handleValueBtn && (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" }) })) })] })] })] }));
|
|
78233
78233
|
};
|
|
@@ -81491,8 +81491,9 @@ const BonusContainer = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
|
|
|
81491
81491
|
return (jsx$2("div", { className: `discount-column`, children: jsx$2(BonusComponent, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip, tooltipPosition: isMobile ? tooltipPosition : 'bottomLeft' }) }));
|
|
81492
81492
|
};
|
|
81493
81493
|
|
|
81494
|
-
const BondRow = ({ bondAddress, bondChain, billArtCollection, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, }) => {
|
|
81494
|
+
const BondRow = ({ bondAddress, bondChain, billArtCollection, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, shortDescription, }) => {
|
|
81495
81495
|
var _a, _b, _c;
|
|
81496
|
+
const SDKConfig = useSDKConfig();
|
|
81496
81497
|
const locationPath = window.location.pathname.replace('/', '');
|
|
81497
81498
|
// Modal
|
|
81498
81499
|
const [openBuyModal] = useModal(jsx$2(ModalHandler, { bondAddress: bondAddress, bondChain: bondChain }), true, true, `buyBondModal-${bondAddress.toLowerCase()}-${bondChain}`);
|
|
@@ -81520,7 +81521,7 @@ const BondRow = ({ bondAddress, bondChain, billArtCollection, payoutToken, billT
|
|
|
81520
81521
|
});
|
|
81521
81522
|
};
|
|
81522
81523
|
return (jsxs("div", { className: "bond-row" // Insert special campaign styles here
|
|
81523
|
-
, onClick: handleOpenModal, sx: Object.assign({ borderRadius: 'normal' }, bondRowCampaignStyles[billArtCollection]), children: [jsx$2("div", { className: "token-info-container", sx: { width: ['
|
|
81524
|
+
, onClick: handleOpenModal, sx: Object.assign({ borderRadius: 'normal' }, bondRowCampaignStyles[billArtCollection]), children: [jsx$2("div", { className: "token-info-container", sx: { width: ['40%', '40%', '40%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag, billArtCollection: billArtCollection }) }), SDKConfig.useCardsView && shortDescription && (jsx$2("div", { className: "short-description", children: jsx$2(SafeHTMLComponent, { html: shortDescription }) })), jsxs("div", { className: "bond-info-columns", sx: { width: ['60%', '60%', '60%', '70%'] }, children: [!SDKConfig.useCardsView && jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'], width: '125px' } }), jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: vestingCliffString }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }), jsx$2("div", { className: "tokens-remaining-column", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: percentageAvailable }), style: {
|
|
81524
81525
|
width: '127px',
|
|
81525
81526
|
height: '25px',
|
|
81526
81527
|
flexDirection: 'column',
|
|
@@ -87331,7 +87332,7 @@ const BondRowsWithTitle = ({ chain, bonds, hideTitles, showHotBonds, showSolSkel
|
|
|
87331
87332
|
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;
|
|
87332
87333
|
if (bondFromMap.soldOut) {
|
|
87333
87334
|
const bond = bondFromMap;
|
|
87334
|
-
return (jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId], billArtCollection: (_b = bond.billArt) === null || _b === void 0 ? void 0 : _b.collection, bondChain: bond.chainId, payoutToken: bond.earnToken, billType: bond.billType, tag: (_c = bond.tags) === null || _c === void 0 ? void 0 : _c[0], bondSoldOut: true, percentageAvailable: 100, remainingTokensString: `${formatNumberSI(0, 0)} ${bond.earnToken.symbol} ($${formatNumberSI(0, 2)})`, vestingTermString: "-", projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit }, `${bond.contractAddress}-${bond.chainId}-${index}`));
|
|
87335
|
+
return (jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId], billArtCollection: (_b = bond.billArt) === null || _b === void 0 ? void 0 : _b.collection, bondChain: bond.chainId, payoutToken: bond.earnToken, billType: bond.billType, tag: (_c = bond.tags) === null || _c === void 0 ? void 0 : _c[0], bondSoldOut: true, percentageAvailable: 100, remainingTokensString: `${formatNumberSI(0, 0)} ${bond.earnToken.symbol} ($${formatNumberSI(0, 2)})`, vestingTermString: "-", projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, shortDescription: bond.shortDescription }, `${bond.contractAddress}-${bond.chainId}-${index}`));
|
|
87335
87336
|
}
|
|
87336
87337
|
if (bondFromMap.billType === 'fcfs') {
|
|
87337
87338
|
const bond = bondFromMap;
|
|
@@ -87354,13 +87355,13 @@ const BondRowsWithTitle = ({ chain, bonds, hideTitles, showHotBonds, showSolSkel
|
|
|
87354
87355
|
? '-'
|
|
87355
87356
|
: initialRelease === 100
|
|
87356
87357
|
? `0 D`
|
|
87357
|
-
: `${getTimePeriods((_y = bond.vestingTerm) !== null && _y !== void 0 ? _y : 0).months} Mo`, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bondSoldOut: saleHasFinished }, `${bond.contractAddress}-${bond.chainId}-${index}`));
|
|
87358
|
+
: `${getTimePeriods((_y = bond.vestingTerm) !== null && _y !== void 0 ? _y : 0).months} Mo`, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bondSoldOut: saleHasFinished, shortDescription: bond.shortDescription }, `${bond.contractAddress}-${bond.chainId}-${index}`));
|
|
87358
87359
|
}
|
|
87359
87360
|
else {
|
|
87360
87361
|
const bond = bondFromMap;
|
|
87361
87362
|
const bondAddress = (_z = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _z === void 0 ? void 0 : _z[bond === null || bond === void 0 ? void 0 : bond.chainId];
|
|
87362
87363
|
const remainingTokensString = getRemainingTokensString(bond);
|
|
87363
|
-
return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, billArtCollection: (_0 = bond.billArt) === null || _0 === void 0 ? void 0 : _0.collection, payoutToken: bond.earnToken, billType: bond.billType, tag: (_1 = bond.tags) === null || _1 === void 0 ? void 0 : _1[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bonus: namingPreference === 'Discount' ? `${(_2 = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _2 === void 0 ? void 0 : _2.toFixed(2)}%` : undefined }, `${bondAddress}-${bond.chainId}-${index}`));
|
|
87364
|
+
return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, billArtCollection: (_0 = bond.billArt) === null || _0 === void 0 ? void 0 : _0.collection, payoutToken: bond.earnToken, billType: bond.billType, tag: (_1 = bond.tags) === null || _1 === void 0 ? void 0 : _1[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bonus: namingPreference === 'Discount' ? `${(_2 = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _2 === void 0 ? void 0 : _2.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription }, `${bondAddress}-${bond.chainId}-${index}`));
|
|
87364
87365
|
}
|
|
87365
87366
|
}), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
|
|
87366
87367
|
};
|
|
@@ -87485,7 +87486,7 @@ const BondsMenu = ({ searchQuery, setSearchQuery, setChainFilterOption, chainFil
|
|
|
87485
87486
|
fontSize: '14px',
|
|
87486
87487
|
color: 'white',
|
|
87487
87488
|
width: ['calc(50vw - 25px)'],
|
|
87488
|
-
}, placeholder: 'Search...' }), jsx$2(FavIcon, { filterOption: filterOption, setFilterOption: setFilterOption })] }) }), jsxs("div", { className: "headers-container", children: [jsxs("div", { className: "discount-header", onClick: () => onSort('bonus'), children: [namingPreference.toUpperCase(), jsx$2(Flex$1, { sx: { ml: '5px', mb: '3px' }, children: jsx$2(Svg, { icon: "sort", width: 10, color: "textDisabledButton" }) })] }), jsxs("div", { className: "terms-header", onClick: () => onSort('terms'), children: ["TERMS", jsx$2(Flex$1, { sx: { ml: '5px', mb: '3px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "tokens-remaining-header", onClick: () => onSort('tokensRemaining'), children: ["TOKENS REMAINING", jsx$2(Flex$1, { sx: { ml: '5px', mb: '3px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsx$2("div", { className: "tooltip-header" })] })] })] }));
|
|
87489
|
+
}, placeholder: 'Search...' }), jsx$2(FavIcon, { filterOption: filterOption, setFilterOption: setFilterOption })] }) }), jsxs("div", { className: "headers-container", children: [jsx$2(Flex$1, { sx: { width: '125px' } }), jsxs("div", { className: "discount-header", onClick: () => onSort('bonus'), children: [namingPreference.toUpperCase(), jsx$2(Flex$1, { sx: { ml: '5px', mb: '3px' }, children: jsx$2(Svg, { icon: "sort", width: 10, color: "textDisabledButton" }) })] }), jsxs("div", { className: "terms-header", onClick: () => onSort('terms'), children: ["TERMS", jsx$2(Flex$1, { sx: { ml: '5px', mb: '3px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "tokens-remaining-header", onClick: () => onSort('tokensRemaining'), children: ["TOKENS REMAINING", jsx$2(Flex$1, { sx: { ml: '5px', mb: '3px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsx$2("div", { className: "tooltip-header" })] })] })] }));
|
|
87489
87490
|
};
|
|
87490
87491
|
|
|
87491
87492
|
const getUserApiStats = (account) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
@@ -87549,10 +87550,11 @@ const BuyAgainRow = () => {
|
|
|
87549
87550
|
position: 'relative',
|
|
87550
87551
|
overflow: 'hidden',
|
|
87551
87552
|
width: '100%',
|
|
87553
|
+
mb: '10px',
|
|
87552
87554
|
}, children: [jsx$2(Flex, { sx: {
|
|
87553
87555
|
p: '0 1px',
|
|
87554
87556
|
width: '100%',
|
|
87555
|
-
|
|
87557
|
+
pt: '5px',
|
|
87556
87558
|
background: 'primaryButton',
|
|
87557
87559
|
borderRadius: 'normal',
|
|
87558
87560
|
flexDirection: 'column',
|
|
@@ -87562,9 +87564,8 @@ const BuyAgainRow = () => {
|
|
|
87562
87564
|
fontSize: '12px',
|
|
87563
87565
|
fontWeight: 500,
|
|
87564
87566
|
pl: '26px',
|
|
87565
|
-
py: '2px',
|
|
87566
87567
|
color: 'primaryBright',
|
|
87567
|
-
height: '
|
|
87568
|
+
height: '91px',
|
|
87568
87569
|
}, children: "BUY AGAIN" }) }), jsx$2(Flex, { onClick: () => {
|
|
87569
87570
|
track({
|
|
87570
87571
|
event: 'buyAgainClick',
|
|
@@ -87573,7 +87574,7 @@ const BuyAgainRow = () => {
|
|
|
87573
87574
|
bond: bond.earnToken.symbol,
|
|
87574
87575
|
},
|
|
87575
87576
|
});
|
|
87576
|
-
}, sx: { position: 'absolute', top: '
|
|
87577
|
+
}, sx: { position: 'absolute', top: '25px', left: '1px', width: 'calc(100% - 2px)' }, children: jsx$2(BondRow, { bondAddress: (_b = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _b === void 0 ? void 0 : _b[bond === null || bond === void 0 ? void 0 : bond.chainId], bondChain: bond.chainId, billType: bond.billType, payoutToken: bond.earnToken, tag: (_c = bond.tags) === null || _c === void 0 ? void 0 : _c[0], bondSoldOut: isBondSoldOut(bond, SDKConfig.showLowValueBonds), trueBondPrices: bond === null || bond === void 0 ? void 0 : bond.trueBondPrices, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString }, `${bondAddress}-${bond.chainId}`) })] }) })) : null;
|
|
87577
87578
|
};
|
|
87578
87579
|
|
|
87579
87580
|
const LoadingSkeleton = () => {
|
|
@@ -6,6 +6,7 @@ export interface SDKPropsDTO {
|
|
|
6
6
|
useHotBonds?: boolean;
|
|
7
7
|
useTiers?: boolean;
|
|
8
8
|
useTGEBonds?: boolean;
|
|
9
|
+
useCardsView?: boolean;
|
|
9
10
|
showLowValueBonds?: boolean;
|
|
10
11
|
bondPartner?: string;
|
|
11
12
|
namingPreference?: 'Discount' | 'Bonus';
|
|
@@ -29,6 +30,7 @@ export interface SDKProps {
|
|
|
29
30
|
highestCompatibleVersion?: string;
|
|
30
31
|
evmAddress?: string;
|
|
31
32
|
solAddress?: string;
|
|
33
|
+
useCardsView?: boolean;
|
|
32
34
|
}
|
|
33
35
|
export declare const useSDKConfig: (config?: SDKPropsDTO) => SDKProps;
|
|
34
36
|
export type URLKeys = 'apiV2' | 'realTimeApi' | 'mainUrl' | 'priceApi';
|
package/dist/styles.css
CHANGED
|
@@ -791,6 +791,8 @@ span.flex-inline {
|
|
|
791
791
|
display: flex;
|
|
792
792
|
width: 50%;
|
|
793
793
|
justify-content: flex-end;
|
|
794
|
+
opacity: 0.6;
|
|
795
|
+
align-items: center;
|
|
794
796
|
}
|
|
795
797
|
@media screen and (min-width: 1000px) {
|
|
796
798
|
.bonds-menu .headers-container {
|
|
@@ -862,7 +864,7 @@ span.flex-inline {
|
|
|
862
864
|
.bonds-menu .your-bonds-table-headers {
|
|
863
865
|
display: none;
|
|
864
866
|
width: 130px;
|
|
865
|
-
align-items:
|
|
867
|
+
align-items: center;
|
|
866
868
|
justify-content: center;
|
|
867
869
|
cursor: pointer;
|
|
868
870
|
opacity: 0.6;
|