@ape.swap/bonds-sdk 2.5.2-test2 → 2.5.2-test4

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
@@ -74218,13 +74218,16 @@ const RestrictedRegionModal = ({ onDismiss }) => {
74218
74218
  return (jsxs(Modal, { className: "modal", title: "Notice", sx: { maxWidth: '200px' }, children: [jsxs(Flex, { sx: { my: '20px' }, children: ["Unfortunately, this bond is restricted for your region: ", geoData === null || geoData === void 0 ? void 0 : geoData.countryCode, "."] }), jsx$2(Button, { fullWidth: true, onClick: onDismiss, children: "Close" })] }));
74219
74219
  };
74220
74220
 
74221
- const WarningModal = ({ onAcknowledge }) => {
74221
+ const NoBonusModal = ({ onAcknowledge }) => {
74222
74222
  const [isOpen, setIsOpen] = useState(true);
74223
74223
  const handleAcknowledge = () => {
74224
74224
  onAcknowledge();
74225
74225
  setIsOpen(false);
74226
74226
  };
74227
- return (isOpen && (jsxs(Modal, { className: "nobonus-modal", title: "Warning", onClose: handleAcknowledge, children: [jsx$2("p", { children: "You will not receive any bonus tokens when buying this Bond." }), jsx$2("p", { children: "Please acknowledge to proceed." }), jsx$2(Button, { onClick: handleAcknowledge, className: "nobonus-button", sx: { width: '100%', justifyContent: 'center' }, children: "Acknowledge" })] })));
74227
+ const handleCancel = () => {
74228
+ setIsOpen(false);
74229
+ };
74230
+ return (isOpen && (jsxs(Modal, { className: "nobonus-modal", title: "Warning", onClose: handleAcknowledge, children: [jsx$2("p", { children: "You will not receive any bonus tokens when buying this Bond." }), jsx$2("p", { children: "Please acknowledge to proceed." }), jsxs(Flex, { className: "nobonus-actions", sx: { flexDirection: 'row', gap: '8px' }, children: [jsx$2(Button, { className: "nobonus-continue", onClick: handleAcknowledge, sx: { width: '100%', justifyContent: 'center' }, children: "Continue" }), jsx$2(Button, { classname: "nobonus-cancel", onClick: handleCancel, sx: { width: '100%', justifyContent: 'center' }, variant: "secondary", children: "Cancel" })] })] })));
74228
74231
  };
74229
74232
 
74230
74233
  const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) => {
@@ -74420,11 +74423,11 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
74420
74423
  }
74421
74424
  }
74422
74425
  };
74423
- const [openWarningModal] = useModal(jsx$2(WarningModal, { onAcknowledge: handleBothPurchases }), true, true);
74426
+ const [openNoBonusModal] = useModal(jsx$2(NoBonusModal, { onAcknowledge: handleBothPurchases }), true, true);
74424
74427
  const handleOpenModal = () => {
74425
74428
  var _a;
74426
74429
  if ((_a = bondData === null || bondData === void 0 ? void 0 : bondData.bonus) !== null && _a !== void 0 ? _a : 0 < 0) {
74427
- openWarningModal();
74430
+ openNoBonusModal();
74428
74431
  }
74429
74432
  else {
74430
74433
  handleBothPurchases();
package/dist/styles.css CHANGED
@@ -758,7 +758,7 @@ span.flex-inline {
758
758
  }
759
759
 
760
760
  .discount-negative {
761
- color: white;
761
+ color: #ffffff;
762
762
  width: 20%;
763
763
  }
764
764
 
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface NoBonusModalProps {
3
+ onAcknowledge: () => void;
4
+ }
5
+ declare const NoBonusModal: React.FC<NoBonusModalProps>;
6
+ export default NoBonusModal;
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.5.2-test2",
6
+ "version": "2.5.2-test4",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface WarningModalProps {
3
- onAcknowledge: () => void;
4
- }
5
- declare const WarningModal: React.FC<WarningModalProps>;
6
- export default WarningModal;