@ape.swap/bonds-sdk 3.0.68 → 3.0.70
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 +6 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -79353,9 +79353,9 @@ const ParticipationSuccessful = ({ onDismiss, launchBond, inputAmount, }) => {
|
|
|
79353
79353
|
};
|
|
79354
79354
|
const day = finishDate.getDate();
|
|
79355
79355
|
const formattedFinishDate = `${month} ${getDayWithSuffix(day)} at 11 UTC.`;
|
|
79356
|
-
const initialRelease = userAllocation * (
|
|
79356
|
+
const initialRelease = userAllocation * (launchBond === null || launchBond === void 0 ? void 0 : launchBond.initialRelease);
|
|
79357
79357
|
const initialReleaseUsd = initialRelease * ((_c = launchBond === null || launchBond === void 0 ? void 0 : launchBond.initPrice) !== null && _c !== void 0 ? _c : 0);
|
|
79358
|
-
const vestedAmount = userAllocation * (1 - (launchBond === null || launchBond === void 0 ? void 0 : launchBond.initialRelease)
|
|
79358
|
+
const vestedAmount = userAllocation * (1 - (launchBond === null || launchBond === void 0 ? void 0 : launchBond.initialRelease));
|
|
79359
79359
|
const vestedAmountUsd = vestedAmount * ((_d = launchBond === null || launchBond === void 0 ? void 0 : launchBond.initPrice) !== null && _d !== void 0 ? _d : 0);
|
|
79360
79360
|
return (jsxs(Modal, { children: [jsx$2(ModalHeader, { hideDivider: true }), jsxs(Flex, { sx: { flexDirection: 'column' }, children: [jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center', mb: '15px' }, children: jsx$2(Text, { sx: { fontSize: '22px', fontWeight: 700 }, children: "Participation Details" }) }), jsxs(Flex, { sx: {
|
|
79361
79361
|
fontSize: '14px',
|
|
@@ -79364,7 +79364,7 @@ const ParticipationSuccessful = ({ onDismiss, launchBond, inputAmount, }) => {
|
|
|
79364
79364
|
}, children: [jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400 }, children: "Your Deposit" }), jsxs(Flex, { sx: { fontSize: '12px', fontWeight: 400 }, children: [getFirstNonZeroDigits(inputValue, 2), " ", launchBond === null || launchBond === void 0 ? void 0 : launchBond.token.symbol, jsxs(Flex, { sx: { color: 'textDisabledButton', ml: '5px' }, children: ["($", depositAmountUsd.toFixed(2), ")"] })] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between', mt: '5px' }, children: [jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400 }, children: "Your Allocation" }), jsxs(Flex, { sx: {
|
|
79365
79365
|
fontSize: '12px',
|
|
79366
79366
|
fontWeight: 500,
|
|
79367
|
-
}, children: [getFirstNonZeroDigits(userAllocation, 2), " ", launchBond === null || launchBond === void 0 ? void 0 : launchBond.earnToken.symbol, jsxs(Flex, { sx: { color: 'textDisabledButton', ml: '5px' }, children: ["($", userAllocationUsd.toFixed(2), ")"] })] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between', mt: '5px' }, children: [jsxs(Flex, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["Initial Release", jsx$2(TooltipBubble, { placement: 'bottomLeft', transformTip: 'translate(-6%, 0%)', width: "250px", body: jsx$2(Flex, { sx: { justifyContent: 'center' }, children: `You'll be able to claim an initial release of ${launchBond.initialRelease
|
|
79367
|
+
}, children: [getFirstNonZeroDigits(userAllocation, 2), " ", launchBond === null || launchBond === void 0 ? void 0 : launchBond.earnToken.symbol, jsxs(Flex, { sx: { color: 'textDisabledButton', ml: '5px' }, children: ["($", userAllocationUsd.toFixed(2), ")"] })] })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between', mt: '5px' }, children: [jsxs(Flex, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["Initial Release", jsx$2(TooltipBubble, { placement: 'bottomLeft', transformTip: 'translate(-6%, 0%)', width: "250px", body: jsx$2(Flex, { sx: { justifyContent: 'center' }, children: `You'll be able to claim an initial release of ${launchBond.initialRelease * 100}%
|
|
79368
79368
|
of your allocation on ${formattedFinishDate}` }), children: jsx$2(Flex, { sx: { alignItems: 'center', height: '100%', ml: '5px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { sx: {
|
|
79369
79369
|
fontSize: '12px',
|
|
79370
79370
|
fontWeight: 500,
|
|
@@ -79389,6 +79389,9 @@ const BuyAction = ({ launchBond, inputValue, selectedCurrency, soldout, }) => {
|
|
|
79389
79389
|
const { addToastError } = usePopups();
|
|
79390
79390
|
// Buy confirm modal
|
|
79391
79391
|
const [onOpenPurchaseModal] = useModal(jsx$2(ParticipationSuccessful, { launchBond: launchBond, inputAmount: inputValue }), true, true, `confirm buy modal`);
|
|
79392
|
+
useEffect(() => {
|
|
79393
|
+
onOpenPurchaseModal();
|
|
79394
|
+
}, []);
|
|
79392
79395
|
// Approve logic
|
|
79393
79396
|
const [approvalState, approveCallback] = useApproval(inputValue, selectedCurrency, launchBond === null || launchBond === void 0 ? void 0 : launchBond.contractAddress, account, chainId);
|
|
79394
79397
|
const handleApprove = () => {
|