@ape.swap/bonds-sdk 2.1.1 → 2.2.1-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +15 -10
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -41434,8 +41434,8 @@ const useModal = (modal, closeOnOverlayClick = true, updateOnPropsChange = false
|
|
|
41434
41434
|
};
|
|
41435
41435
|
|
|
41436
41436
|
const TooltipText = {
|
|
41437
|
-
Discount: "This is the percentage
|
|
41438
|
-
ARR: 'This is the Annualized Rate of Return you would receive considering the current
|
|
41437
|
+
Discount: "This is the percentage bonus relative to the token's current market price.",
|
|
41438
|
+
ARR: 'This is the Annualized Rate of Return you would receive considering the current bonus, adjusted for APR.',
|
|
41439
41439
|
Terms: 'This is the amount of days it will take for all tokens in the Bond to fully vest.',
|
|
41440
41440
|
TokensRemaining: 'This is the amount of remaining tokens for sale in this Bond.',
|
|
41441
41441
|
MaxBuy: (payoutToken) => `This is the maximum amount of ${payoutToken} you can currently purchase through this Bond.`,
|
|
@@ -43029,7 +43029,7 @@ const CardRecommendation = ({ cardIndex, bond, handleBuyBondClick, }) => {
|
|
|
43029
43029
|
alignItems: 'center',
|
|
43030
43030
|
padding: '0px 7px',
|
|
43031
43031
|
borderRadius: '5px 5px 0px 0px',
|
|
43032
|
-
}, children: [jsx$2("div", { className: "yourbondinfo-block header", children: "
|
|
43032
|
+
}, children: [jsx$2("div", { className: "yourbondinfo-block header", children: "Bonus" }), jsxs(Text, { sx: { color: 'success' }, children: [bond.discount.toFixed(2), "%"] })] }), jsxs(Flex, { sx: {
|
|
43033
43033
|
background: 'white4',
|
|
43034
43034
|
justifyContent: 'space-between',
|
|
43035
43035
|
alignItems: 'center',
|
|
@@ -71641,7 +71641,11 @@ function useBondsData() {
|
|
|
71641
71641
|
const getBondsData = (realTimeApiURL, tokenPrices, bondList) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
71642
71642
|
try {
|
|
71643
71643
|
const response = yield axios.get(realTimeApiURL);
|
|
71644
|
-
|
|
71644
|
+
const bonds = response.data.bonds.map((bond) => {
|
|
71645
|
+
const bonus = bond.discount && (bond.discount > 0 ? (bond.discount / (100 - bond.discount)) * 100 : 0);
|
|
71646
|
+
return Object.assign(Object.assign({}, bond), { discount: bonus });
|
|
71647
|
+
});
|
|
71648
|
+
return bonds;
|
|
71645
71649
|
}
|
|
71646
71650
|
catch (_a) {
|
|
71647
71651
|
const billData = [];
|
|
@@ -71712,13 +71716,14 @@ const cleanBillsData = (billIds, chunkedBills, tokenPrices, chainId, bills) => {
|
|
|
71712
71716
|
const [, vestingTerm, , maxPayout] = terms;
|
|
71713
71717
|
const priceUsd = lpPrice && trueBillPrice && getBalanceNumber(trueBillPrice === null || trueBillPrice === void 0 ? void 0 : trueBillPrice.toString()) * lpPrice;
|
|
71714
71718
|
const discount = earnTokenPrice && priceUsd && ((earnTokenPrice - priceUsd) / earnTokenPrice) * 100;
|
|
71719
|
+
const bonus = discount && (discount > 0 ? (discount / (100 - discount)) * 100 : 0);
|
|
71715
71720
|
const tokensRemaining = new BigNumber$1(maxTotalPayout !== null && maxTotalPayout !== void 0 ? maxTotalPayout : '0')
|
|
71716
71721
|
.minus(new BigNumber$1(totalPayoutGiven))
|
|
71717
71722
|
.div(new BigNumber$1(10).pow((_c = bill === null || bill === void 0 ? void 0 : bill.earnToken.decimals[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _c !== void 0 ? _c : 18))
|
|
71718
71723
|
.toString();
|
|
71719
71724
|
//I've added a ts ignore here due to some props marked as optional in the list repo which are actually not optional
|
|
71720
71725
|
//@ts-ignore
|
|
71721
|
-
const cleanedData = Object.assign(Object.assign({}, bill), { type: (_d = bill === null || bill === void 0 ? void 0 : bill.billType) !== null && _d !== void 0 ? _d : '', billAddress: (_e = bill === null || bill === void 0 ? void 0 : bill.contractAddress[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _e !== void 0 ? _e : '', billNftAddress: (_f = bill === null || bill === void 0 ? void 0 : bill.billNnftAddress[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _f !== void 0 ? _f : '', showcaseTokenName: (_j = (_h = (_g = bill === null || bill === void 0 ? void 0 : bill.showcaseToken) === null || _g === void 0 ? void 0 : _g.symbol) !== null && _h !== void 0 ? _h : bill === null || bill === void 0 ? void 0 : bill.earnToken.symbol) !== null && _j !== void 0 ? _j : '', discount:
|
|
71726
|
+
const cleanedData = Object.assign(Object.assign({}, bill), { type: (_d = bill === null || bill === void 0 ? void 0 : bill.billType) !== null && _d !== void 0 ? _d : '', billAddress: (_e = bill === null || bill === void 0 ? void 0 : bill.contractAddress[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _e !== void 0 ? _e : '', billNftAddress: (_f = bill === null || bill === void 0 ? void 0 : bill.billNnftAddress[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _f !== void 0 ? _f : '', showcaseTokenName: (_j = (_h = (_g = bill === null || bill === void 0 ? void 0 : bill.showcaseToken) === null || _g === void 0 ? void 0 : _g.symbol) !== null && _h !== void 0 ? _h : bill === null || bill === void 0 ? void 0 : bill.earnToken.symbol) !== null && _j !== void 0 ? _j : '', discount: bonus, principalTokenPrice: (_k = lpPrice === null || lpPrice === void 0 ? void 0 : lpPrice.toString()) !== null && _k !== void 0 ? _k : '0', payoutTokenPrice: (_l = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.toString()) !== null && _l !== void 0 ? _l : '0', tokensRemaining, maxTotalPayout: maxTotalPayout === null || maxTotalPayout === void 0 ? void 0 : maxTotalPayout.toString(), trueBillPrice: trueBillPrice === null || trueBillPrice === void 0 ? void 0 : trueBillPrice.toString(), maxPayout: maxPayout === null || maxPayout === void 0 ? void 0 : maxPayout.toString(), totalPayoutGiven: totalPayoutGiven === null || totalPayoutGiven === void 0 ? void 0 : totalPayoutGiven.toString(), vestingTerm: vestingTerm.toNumber() });
|
|
71722
71727
|
return cleanedData;
|
|
71723
71728
|
});
|
|
71724
71729
|
return data;
|
|
@@ -73775,7 +73780,7 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
|
73775
73780
|
|
|
73776
73781
|
const BondCards = ({ bondData }) => {
|
|
73777
73782
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
73778
|
-
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: ["
|
|
73783
|
+
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: ["Bonus", 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')] })] })] }));
|
|
73779
73784
|
};
|
|
73780
73785
|
|
|
73781
73786
|
const Estimations = ({ bondData, inputValue, inputToken, estimatedOutput, inputTokenPrice, isZap, fetchingZapQuote, zapError, }) => {
|
|
@@ -74386,7 +74391,7 @@ const HotBondCard = ({ bond }) => {
|
|
|
74386
74391
|
},
|
|
74387
74392
|
});
|
|
74388
74393
|
};
|
|
74389
|
-
return (jsx$2(Flex, { sx: styles$a.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { bill: bond, isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_c = (_b = (_a = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _c !== void 0 ? _c : '', earnTokenSymbol: (_e = (_d = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _d === void 0 ? void 0 : _d.symbol) !== null && _e !== void 0 ? _e : '', bondContract: (_f = bond === null || bond === void 0 ? void 0 : bond.billAddress) !== null && _f !== void 0 ? _f : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "
|
|
74394
|
+
return (jsx$2(Flex, { sx: styles$a.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { bill: bond, isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_c = (_b = (_a = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _c !== void 0 ? _c : '', earnTokenSymbol: (_e = (_d = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _d === void 0 ? void 0 : _d.symbol) !== null && _e !== void 0 ? _e : '', bondContract: (_f = bond === null || bond === void 0 ? void 0 : bond.billAddress) !== null && _f !== void 0 ? _f : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Bonus" }), jsx$2(Flex, { className: `${getDiscountColor(discount)}`, sx: { width: '100%', justifyContent: 'center' }, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_g = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _g === void 0 ? void 0 : _g.days) ? `${(_h = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _h === void 0 ? void 0 : _h.days} D` : '-' })] })] })] }) }));
|
|
74390
74395
|
};
|
|
74391
74396
|
|
|
74392
74397
|
function useHotBondContracts() {
|
|
@@ -74576,7 +74581,7 @@ const styles$7 = {
|
|
|
74576
74581
|
const SmallRecommendationCard = ({ recommendation }) => {
|
|
74577
74582
|
var _a;
|
|
74578
74583
|
const vestingTime = getTimePeriods((_a = recommendation.vestingTerm) !== null && _a !== void 0 ? _a : 0, true);
|
|
74579
|
-
return (jsxs(Flex, { sx: styles$7.smallCardContainer, onClick: () => window.open(`${window.location.origin}/bonds?bondAddress=${recommendation.contractAddress}&bondChain=${recommendation.chainId}`, '_self'), children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: recommendation.payoutTokenName, size: 32, chain: recommendation.chainId }), jsxs(Flex, { sx: { mx: '10px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { fontSize: '14px', px: '6px' }, children: recommendation.payoutTokenName }), jsxs(Flex, { sx: styles$7.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$7.subTitle, children: "
|
|
74584
|
+
return (jsxs(Flex, { sx: styles$7.smallCardContainer, onClick: () => window.open(`${window.location.origin}/bonds?bondAddress=${recommendation.contractAddress}&bondChain=${recommendation.chainId}`, '_self'), children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: recommendation.payoutTokenName, size: 32, chain: recommendation.chainId }), jsxs(Flex, { sx: { mx: '10px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { fontSize: '14px', px: '6px' }, children: recommendation.payoutTokenName }), jsxs(Flex, { sx: styles$7.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$7.subTitle, children: "Bonus" }), jsxs(Flex, { sx: { fontSize: '12px', color: recommendation.discount > 0 ? 'success' : 'error', ml: '6px' }, children: [recommendation.discount.toFixed(2), "%"] })] })] }));
|
|
74580
74585
|
};
|
|
74581
74586
|
|
|
74582
74587
|
const RecommendationCards$1 = () => {
|
|
@@ -74650,7 +74655,7 @@ const BondsMenu = ({ searchQuery, setSearchQuery, setChainFilterOption, chainFil
|
|
|
74650
74655
|
height: '30px',
|
|
74651
74656
|
fontSize: '14px',
|
|
74652
74657
|
color: 'white',
|
|
74653
|
-
}, placeholder: 'Search...' }), jsx$2(FavIcon, { filterOption: filterOption, setFilterOption: setFilterOption })] }) }), jsxs("div", { className: "headers-container", children: [jsxs("div", { className: "discount-header", onClick: () => onSort('discount'), children: ["
|
|
74658
|
+
}, placeholder: 'Search...' }), jsx$2(FavIcon, { filterOption: filterOption, setFilterOption: setFilterOption })] }) }), jsxs("div", { className: "headers-container", children: [jsxs("div", { className: "discount-header", onClick: () => onSort('discount'), children: ["BONUS", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: 10, color: "textDisabledButton" }) })] }), jsxs("div", { className: "arr-header", onClick: () => onSort('arr'), children: ["ARR", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "terms-header", onClick: () => onSort('terms'), children: ["TERMS", jsx$2(Flex$1, { sx: { ml: '5px' }, 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' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsx$2("div", { className: "tooltip-header" })] })] })] }));
|
|
74654
74659
|
};
|
|
74655
74660
|
|
|
74656
74661
|
const Bonds = () => {
|
|
@@ -90390,7 +90395,7 @@ const TopSaleCard = ({ sale, position }) => {
|
|
|
90390
90395
|
['60px', '60px', '60px', '200px'],
|
|
90391
90396
|
['60px', '60px', '60px', '200px'],
|
|
90392
90397
|
];
|
|
90393
|
-
return (jsxs(Flex, { sx: Object.assign(Object.assign({}, styles$1.topSaleCardContainer), { border: borderColor[position - 1] }), children: [jsxs(Flex, { sx: { width: ['100%', '100%', '100%', '180px'], flexDirection: 'column' }, children: [jsxs(Flex, { children: [jsx$2(Flex, { sx: styles$1.positionNumber, children: position }), jsxs(Flex, { sx: { flexDirection: 'column', ml: '10px' }, children: [jsx$2(Flex, { sx: { fontSize: '10px', color: 'textDisabledButton' }, children: "Buyer" }), jsxs(Flex, { sx: { fontSize: '12px', lineHeight: '13px', position: 'relative' }, children: [buyer === null || buyer === void 0 ? void 0 : buyer.slice(0, 4), "...", buyer === null || buyer === void 0 ? void 0 : buyer.slice((buyer === null || buyer === void 0 ? void 0 : buyer.length) - 4, buyer === null || buyer === void 0 ? void 0 : buyer.length), isUserTheBuyer && jsx$2(Flex, { sx: styles$1.youCard, children: "You" })] })] })] }), jsxs(Flex, { sx: { mt: '20px', width: '100%', fontSize: '12px', fontWeight: 400, flexDirection: 'column' }, children: [jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "Deposit Amount:" }), jsxs(Flex, { children: ["$", sale === null || sale === void 0 ? void 0 : sale.dollarValue.toFixed(2)] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "Payout Amount:" }), jsxs(Flex, { children: ["$", receivedUsdAmount === null || receivedUsdAmount === void 0 ? void 0 : receivedUsdAmount.toFixed(2)] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "
|
|
90398
|
+
return (jsxs(Flex, { sx: Object.assign(Object.assign({}, styles$1.topSaleCardContainer), { border: borderColor[position - 1] }), children: [jsxs(Flex, { sx: { width: ['100%', '100%', '100%', '180px'], flexDirection: 'column' }, children: [jsxs(Flex, { children: [jsx$2(Flex, { sx: styles$1.positionNumber, children: position }), jsxs(Flex, { sx: { flexDirection: 'column', ml: '10px' }, children: [jsx$2(Flex, { sx: { fontSize: '10px', color: 'textDisabledButton' }, children: "Buyer" }), jsxs(Flex, { sx: { fontSize: '12px', lineHeight: '13px', position: 'relative' }, children: [buyer === null || buyer === void 0 ? void 0 : buyer.slice(0, 4), "...", buyer === null || buyer === void 0 ? void 0 : buyer.slice((buyer === null || buyer === void 0 ? void 0 : buyer.length) - 4, buyer === null || buyer === void 0 ? void 0 : buyer.length), isUserTheBuyer && jsx$2(Flex, { sx: styles$1.youCard, children: "You" })] })] })] }), jsxs(Flex, { sx: { mt: '20px', width: '100%', fontSize: '12px', fontWeight: 400, flexDirection: 'column' }, children: [jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "Deposit Amount:" }), jsxs(Flex, { children: ["$", sale === null || sale === void 0 ? void 0 : sale.dollarValue.toFixed(2)] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "Payout Amount:" }), jsxs(Flex, { children: ["$", receivedUsdAmount === null || receivedUsdAmount === void 0 ? void 0 : receivedUsdAmount.toFixed(2)] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "Bonus:" }), jsxs(Flex, { sx: { color: discount > 0 ? 'success' : 'error' }, children: [discount === null || discount === void 0 ? void 0 : discount.toFixed(2), "%"] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { children: "Date:" }), jsx$2(Flex, { children: formatUTCDate(new Date(((_d = sale === null || sale === void 0 ? void 0 : sale.createdAt) !== null && _d !== void 0 ? _d : 0) * 1000)) })] })] })] }), jsx$2("img", { src: `https://ape.bond/images/singleBondPage/${position}.png`, alt: "ads", sx: Object.assign({ width: size[position - 1], height: size[position - 1] }, styles$1.medals) }), jsx$2(Flex, { sx: {
|
|
90394
90399
|
position: 'absolute',
|
|
90395
90400
|
width: '50%',
|
|
90396
90401
|
right: '0px',
|