@ape.swap/bonds-sdk 5.0.5 → 5.0.6

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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AbondModal: () => React.JSX.Element;
3
+ export default AbondModal;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const OabondModal: () => React.JSX.Element;
3
+ export default OabondModal;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const PmusdModal: ({ onDismiss }: {
3
+ onDismiss?: () => void;
4
+ }) => React.JSX.Element;
5
+ export default PmusdModal;
@@ -0,0 +1,3 @@
1
+ export { default as AbondModal } from './AbondModal';
2
+ export { default as OabondModal } from './OabondModal';
3
+ export { default as PmusdModal } from './PmusdModal';
package/dist/main.js CHANGED
@@ -59288,20 +59288,31 @@ const remove0xPrefix = (str) => {
59288
59288
  return str;
59289
59289
  };
59290
59290
 
59291
- const CircularModal = () => {
59291
+ const AbondModal = () => {
59292
59292
  const handleClick = () => {
59293
59293
  window.location.href = 'https://ape.bond/true-yield';
59294
59294
  };
59295
59295
  return (jsx$2(Modal, { title: "You've Claimed ABOND!", children: jsxs(Flex, { sx: { flexDirection: 'column' }, children: [jsx$2(Flex, { sx: { fontSize: '12px', lineHeight: '20px', color: 'primaryButton', mt: '10px' }, children: "Did You Know?" }), jsxs(Flex, { sx: { flexDirection: 'column', gap: '10px', cursor: 'pointer' }, onClick: handleClick, children: [jsx$2(Flex, { children: "You can stake ABOND to earn $USDT and extra discounts on Bonds:" }), jsx$2(Image$1, { src: 'https://ape.bond/images/circular-staking/real-yield.png' }), jsx$2(Image$1, { src: 'https://ape.bond/images/circular-staking/extra-discounts.png' }), jsx$2(Button, { sx: { width: '100%', mt: '10px' }, children: " Stake now" })] })] }) }));
59296
59296
  };
59297
59297
 
59298
- const OABONDModal = () => {
59298
+ const OabondModal = () => {
59299
59299
  const handleClick = () => {
59300
59300
  window.location.href = 'https://ape.bond/true-yield?createPosition=oABOND';
59301
59301
  };
59302
59302
  return (jsx$2(Modal, { title: "You've Claimed oABOND!", children: jsx$2(Flex, { sx: { flexDirection: 'column' }, children: jsxs(Flex, { sx: { flexDirection: 'column', gap: '10px', cursor: 'pointer' }, onClick: handleClick, children: [jsx$2(Flex, { children: "You can now stake your oABOND and turn it into veABOND at permalock:" }), jsx$2(Image$1, { src: 'https://ape.bond/images/circular-staking/real-yield.png' }), jsx$2(Button, { sx: { width: '100%', mt: '10px' }, children: "Lock now" })] }) }) }));
59303
59303
  };
59304
59304
 
59305
+ const PmusdModal = ({ onDismiss }) => {
59306
+ return (jsx$2(Modal, { title: "You've Claimed pmUSD!", children: jsx$2(Flex, { sx: { flexDirection: 'column' }, children: jsxs(Flex, { sx: { flexDirection: 'column', gap: '10px' }, children: [jsxs(Flex, { sx: {
59307
+ fontWeight: 500,
59308
+ fontSize: '14px',
59309
+ textAlign: 'left',
59310
+ color: 'textDisabledButton',
59311
+ my: '10px',
59312
+ display: 'block',
59313
+ }, children: ["Base pmUSD rewards succesfully claimed. The additional PVE rewards (10\u201315%) will be automatically transferred to your wallet within the next 24 hours. If you experience any issues or delay, please contact with", ' ', jsx$2("a", { href: "https://discord.gg/raac", target: "_blank", rel: "noreferrer", sx: { color: 'primaryButton' }, children: "RACC support channel" }), "."] }), jsx$2(Button, { sx: { width: '100%', mt: '10px' }, onClick: onDismiss, children: "close" })] }) }) }));
59314
+ };
59315
+
59305
59316
  const Actions = ({ userBill }) => {
59306
59317
  var _a, _b, _c;
59307
59318
  // Hooks
@@ -59373,17 +59384,21 @@ const Actions = ({ userBill }) => {
59373
59384
  }
59374
59385
  };
59375
59386
  // Modals
59376
- const [openCircularModal] = useModal(jsx$2(CircularModal, {}), true, false, 'circularModal');
59377
- const [openOABONDModal] = useModal(jsx$2(OABONDModal, {}), true, false, 'oABONDModal');
59387
+ const [openAbondModal] = useModal(jsx$2(AbondModal, {}), true, false, 'abondModal');
59388
+ const [openOabondModal] = useModal(jsx$2(OabondModal, {}), true, false, 'oAbondModal');
59389
+ const [openPmusdModal] = useModal(jsx$2(PmusdModal, {}), true, false, 'pmUSDModal');
59378
59390
  useEffect(() => {
59379
- var _a, _b;
59391
+ var _a, _b, _c;
59380
59392
  if (isConfirmed) {
59381
59393
  refetchUserBonds();
59382
59394
  if (((_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.earnToken.symbol.toLowerCase()) === 'abond') {
59383
- openCircularModal();
59395
+ openAbondModal();
59384
59396
  }
59385
59397
  if (((_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken.symbol.toLowerCase()) === 'oabond') {
59386
- openOABONDModal();
59398
+ openOabondModal();
59399
+ }
59400
+ if (((_c = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _c === void 0 ? void 0 : _c.earnToken.symbol.toLowerCase()) === 'pmusd') {
59401
+ openPmusdModal();
59387
59402
  }
59388
59403
  }
59389
59404
  /* eslint-disable react-hooks/exhaustive-deps */
@@ -59813,10 +59828,11 @@ const UserBondRow = ({ bill }) => {
59813
59828
  const isPendingCliff = vestingCliff ? currentTime - purchaseTimestamp < vestingCliff : false;
59814
59829
  const cliffCountdown = getTimePeriods(purchaseTimestamp + (vestingCliff !== null && vestingCliff !== void 0 ? vestingCliff : 0) - currentTime, true);
59815
59830
  // Modals
59816
- const [openCircularModal] = useModal(jsx$2(CircularModal, {}), true, false, 'circularModal');
59817
- const [openOABONDModal] = useModal(jsx$2(OABONDModal, {}), true, false, 'oABONDModal');
59831
+ const [openCircularModal] = useModal(jsx$2(AbondModal, {}), true, false, 'circularModal');
59832
+ const [openOABONDModal] = useModal(jsx$2(OabondModal, {}), true, false, 'oABONDModal');
59833
+ const [openPmusdModal] = useModal(jsx$2(PmusdModal, {}), true, false, 'pmUSDModal');
59818
59834
  useEffect(() => {
59819
- var _a, _b;
59835
+ var _a, _b, _c;
59820
59836
  if (isConfirmed) {
59821
59837
  refetchUserBonds();
59822
59838
  if (((_a = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _a === void 0 ? void 0 : _a.earnToken.symbol.toLowerCase()) === 'abond') {
@@ -59825,6 +59841,9 @@ const UserBondRow = ({ bill }) => {
59825
59841
  if (((_b = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _b === void 0 ? void 0 : _b.earnToken.symbol.toLowerCase()) === 'oabond') {
59826
59842
  openOABONDModal();
59827
59843
  }
59844
+ if (((_c = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _c === void 0 ? void 0 : _c.earnToken.symbol.toLowerCase()) === 'pmusd') {
59845
+ openPmusdModal();
59846
+ }
59828
59847
  }
59829
59848
  /* eslint-disable react-hooks/exhaustive-deps */
59830
59849
  }, [isConfirmed]);
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": "5.0.5",
6
+ "version": "5.0.6",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const CircularModal: () => React.JSX.Element;
3
- export default CircularModal;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const OABONDModal: () => React.JSX.Element;
3
- export default OABONDModal;