@ape.swap/bonds-sdk 4.5.0-test.1 → 4.5.0-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 +14 -15
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -21905,7 +21905,7 @@ const SoulZapTokenManager = {
|
|
|
21905
21905
|
};
|
|
21906
21906
|
const ACF_TO_ABOND = '0xEce2b9C3704632Ce760271B0b84E3A4A698Ca962';
|
|
21907
21907
|
const LENS_CONTRACT = {
|
|
21908
|
-
[main.ChainId.BSC]: '
|
|
21908
|
+
[main.ChainId.BSC]: '0x0e9CE7c69F8e4d732D2b8a15570BAa1446B72127',
|
|
21909
21909
|
};
|
|
21910
21910
|
|
|
21911
21911
|
var bn$1 = {exports: {}};
|
|
@@ -63159,7 +63159,7 @@ const defaultUrls = {
|
|
|
63159
63159
|
// Staging URLS.
|
|
63160
63160
|
const stagingUrls = {
|
|
63161
63161
|
apiV2: 'https://staging-api.ape.bond',
|
|
63162
|
-
realTimeApi: 'https://realtime-api-
|
|
63162
|
+
realTimeApi: 'https://realtime-api-pr-130.herokuapp.com',
|
|
63163
63163
|
mainUrl: 'https://staging.ape.bond',
|
|
63164
63164
|
priceApi: 'https://price-api.ape.bond',
|
|
63165
63165
|
};
|
|
@@ -78816,7 +78816,7 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
|
78816
78816
|
fontWeight: 700,
|
|
78817
78817
|
}, children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_d = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _d === void 0 ? void 0 : _d[0] })] }), jsxs(Flex, { className: "title-container price-container", sx: { flexDirection: 'column', pl: ['10px', '10px', '10px', '20px'] }, children: [jsxs(Flex, { className: "price-container price", sx: { fontSize: ['12px', '12px', '12px', '14px'] }, children: ["$", earnTokenPrice(bondData)] }), SDKConfig.useTiers && bondData.billVersion === main.BillVersion.V4 ? (jsxs(Flex, { sx: {
|
|
78818
78818
|
p: '3px 6px',
|
|
78819
|
-
border: '1px solid #
|
|
78819
|
+
border: '1px solid #9960C5',
|
|
78820
78820
|
borderRadius: 'normal',
|
|
78821
78821
|
background: 'transparent',
|
|
78822
78822
|
position: 'relative',
|
|
@@ -78828,8 +78828,8 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
|
78828
78828
|
top: 0,
|
|
78829
78829
|
left: 0,
|
|
78830
78830
|
zIndex: 1,
|
|
78831
|
-
background: '#
|
|
78832
|
-
opacity: 0.
|
|
78831
|
+
background: '#9960C5',
|
|
78832
|
+
opacity: 0.2,
|
|
78833
78833
|
} }), jsxs(Flex, { sx: { width: '100%', zIndex: 2, alignItems: 'center' }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/mythical.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { fontSize: ['12px', '12px', '12px', '14px'], mr: '3px' }, children: "Up to" }), jsxs(Flex, { sx: {
|
|
78834
78834
|
color: bonusWithFee && bonusWithFee > 0 ? 'success' : 'error',
|
|
78835
78835
|
fontSize: ['12px', '12px', '12px', '14px'],
|
|
@@ -78905,7 +78905,7 @@ const BonusComponent = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
|
|
|
78905
78905
|
const baseTrueBondPrice = findHighestTrueBondPrice('0', trueBondPrices);
|
|
78906
78906
|
return (jsx$2(Flex, { children: trueBondPrices && (trueBondPrices === null || trueBondPrices === void 0 ? void 0 : trueBondPrices.length) > 1 && SDKConfig.useTiers ? (jsx$2(Flex, { sx: { alignItems: 'center', minWidth: '20px' }, children: (highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) && (highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) > 0 ? (jsx$2(TooltipBubble, { width: "280px", placement: tooltipPosition, transformTip: tooltipPosition === 'bottomLeft' ? 'translate(0%, 0%)' : 'translate(0%, 0%)', body: jsx$2(BonusTable, { trueBondPrices: trueBondPrices, minTier: minTier }), children: jsxs(Flex, { sx: {
|
|
78907
78907
|
p: '3px 6px',
|
|
78908
|
-
border: '1px solid #
|
|
78908
|
+
border: '1px solid #9960C5',
|
|
78909
78909
|
borderRadius: 'normal',
|
|
78910
78910
|
background: 'transparent',
|
|
78911
78911
|
position: 'relative',
|
|
@@ -78919,8 +78919,8 @@ const BonusComponent = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
|
|
|
78919
78919
|
top: 0,
|
|
78920
78920
|
left: 0,
|
|
78921
78921
|
zIndex: 1,
|
|
78922
|
-
background: '#
|
|
78923
|
-
opacity: 0.
|
|
78922
|
+
background: '#9960C5',
|
|
78923
|
+
opacity: 0.2,
|
|
78924
78924
|
} }), jsxs(Flex, { sx: { width: '100%', zIndex: 2, alignItems: 'center', justifyContent: 'center' }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/mythical.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { fontSize: ['12px', '12px', '14px', '14px'], mr: '3px' }, children: "Up to" }), jsxs(Flex, { sx: {
|
|
78925
78925
|
color: (highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) && (highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) > 0
|
|
78926
78926
|
? 'success'
|
|
@@ -78996,11 +78996,10 @@ const Estimations = ({ depositAmount, bondData, youSpendString, isZap, fetchingZ
|
|
|
78996
78996
|
const estimatedOutputUSD = estimatedOutputAmount * parseFloat((_a = bondData === null || bondData === void 0 ? void 0 : bondData.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0');
|
|
78997
78997
|
const noTierAmount = getRawBonus$1(bondData, depositAmount, '0');
|
|
78998
78998
|
const boostAmount = parseFloat(getRawBonus$1(bondData, depositAmount, userPoints !== null && userPoints !== void 0 ? userPoints : '0')) - parseFloat(noTierAmount);
|
|
78999
|
-
console.log('estimatedOutputAmount', estimatedOutputAmount);
|
|
79000
78999
|
return (jsxs(Flex, { className: "modaltable-container text-container", children: [jsxs(Flex, { className: "text-container row", children: [jsx$2(Flex, { className: "row-container spend", children: "You Spend:" }), jsx$2(Flex, { className: "row-container spend-val", children: youSpendString })] }), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: [!!userTier && !!userPoints && SDKConfig.useTiers && bondData.billVersion === main.BillVersion.V4
|
|
79001
79000
|
? 'Base Bonus:'
|
|
79002
79001
|
: 'Bonus:', jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Premium }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val ${getBonusColor(bonusString)}`, children: ["$ ", formatNumberSI(bonusString)] }))] }), (trueBondPrice === null || trueBondPrice === void 0 ? void 0 : trueBondPrice.points) !== '0' && userTier && userPoints && SDKConfig.useTiers && (jsxs(Flex, { className: "text-container row", sx: {
|
|
79003
|
-
border: '1px solid
|
|
79002
|
+
border: '1px solid #9960C5',
|
|
79004
79003
|
borderRadius: 'normal',
|
|
79005
79004
|
mx: '-8px',
|
|
79006
79005
|
px: '8px',
|
|
@@ -79012,8 +79011,8 @@ const Estimations = ({ depositAmount, bondData, youSpendString, isZap, fetchingZ
|
|
|
79012
79011
|
top: 0,
|
|
79013
79012
|
left: 0,
|
|
79014
79013
|
zIndex: 0,
|
|
79015
|
-
background: '
|
|
79016
|
-
opacity: 0.
|
|
79014
|
+
background: '#9960C5',
|
|
79015
|
+
opacity: 0.2,
|
|
79017
79016
|
borderRadius: 'normal',
|
|
79018
79017
|
} }), jsxs(Flex, { className: "row-container premium", sx: { zIndex: 1 }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/${tierName === null || tierName === void 0 ? void 0 : tierName.toLowerCase()}.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { color: 'success', mr: '3px', fontWeight: 700 }, children: `+${(_b = trueBondPrice === null || trueBondPrice === void 0 ? void 0 : trueBondPrice.boost) !== null && _b !== void 0 ? _b : 0}%` }), "Boost:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Boost }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val premium-positive`, children: ["$ ", formatNumberSI(boostAmount)] }))] })), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container get", children: ["You Get (over ", vestingTime((_c = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _c !== void 0 ? _c : 0).days, " days):"] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: "row-container get-val", children: [formatNumberSI(estimatedOutputAmount, 4), " ", bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, " = $", ' ', formatNumberSI(estimatedOutputUSD, 2)] }))] })] }));
|
|
79019
79018
|
};
|
|
@@ -79136,7 +79135,7 @@ const GetUpToComponent = ({ bond, depositAmount }) => {
|
|
|
79136
79135
|
fontWeight: 400,
|
|
79137
79136
|
flexDirection: 'column',
|
|
79138
79137
|
}, children: [jsxs(Flex, { onClick: () => setIsOpen(!isOpen), sx: {
|
|
79139
|
-
border: '1px solid
|
|
79138
|
+
border: '1px solid #9960C5',
|
|
79140
79139
|
borderRadius: 'normal',
|
|
79141
79140
|
position: 'relative',
|
|
79142
79141
|
overflow: 'hidden',
|
|
@@ -79152,8 +79151,8 @@ const GetUpToComponent = ({ bond, depositAmount }) => {
|
|
|
79152
79151
|
top: 0,
|
|
79153
79152
|
left: 0,
|
|
79154
79153
|
zIndex: 0,
|
|
79155
|
-
background: '
|
|
79156
|
-
opacity: 0.
|
|
79154
|
+
background: '#9960C5',
|
|
79155
|
+
opacity: 0.2,
|
|
79157
79156
|
} }), jsxs(Flex, { sx: { alignItems: 'center', display: ['ruby', 'ruby', 'ruby', 'flex'] }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/legend.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), "Get up to", jsx$2(Flex, { sx: { color: 'success', mx: '3px', fontWeight: 700 }, children: `+${(_a = trueBondPrice === null || trueBondPrice === void 0 ? void 0 : trueBondPrice.boost) !== null && _a !== void 0 ? _a : 0}%` }), "Boost By locking ABOND"] }), !!depositAmount && parseFloat(depositAmount) !== 0 && (jsxs(Flex, { sx: { color: 'success', fontWeight: 700, minWidth: '65px', justifyContent: 'flex-end' }, children: ["$ ", formatUSDNumber(boostAmount.toString()), jsx$2(Flex, { sx: { ml: '4px' }, children: jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down' }) })] }))] }), jsx$2(AnimatePresence, { children: isOpen && (jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%', marginTop: '5px' }, children: jsx$2(BonusTable, { trueBondPrices: bond === null || bond === void 0 ? void 0 : bond.trueBondPrices, minTier: bond.minTier, hideTitle: true }) })) })] })));
|
|
79158
79157
|
};
|
|
79159
79158
|
|