@ape.swap/bonds-sdk 3.0.17 → 3.0.19

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.
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- declare const AddFavToken: ({ tokenSymbol, hotBond }: {
2
+ declare const AddFavToken: ({ tokenSymbol, hotBond, isGoldBond, }: {
3
3
  tokenSymbol: string;
4
4
  hotBond?: boolean;
5
+ isGoldBond: boolean;
5
6
  }) => React.JSX.Element;
6
7
  export default AddFavToken;
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  import { BondsData } from '../../types/bonds';
3
3
  import { BillsConfig } from '@ape.swap/apeswap-lists';
4
4
  export declare const NETWORK_COLORS: Partial<Record<number, string>>;
5
- declare const TokenInfoAndName: ({ bill, vestEnds, isHotBond, }: {
5
+ declare const TokenInfoAndName: ({ bill, vestEnds, isHotBond, isGoldBond, }: {
6
6
  bill: BondsData | BillsConfig;
7
7
  vestEnds?: string;
8
8
  isHotBond?: boolean;
9
+ isGoldBond: boolean;
9
10
  }) => React.JSX.Element;
10
11
  export default TokenInfoAndName;
package/dist/main.js CHANGED
@@ -6640,12 +6640,12 @@ const AllChains = ({ width }) => {
6640
6640
  return (jsx$2("svg", { width: width || '26', viewBox: "0 0 26 26", fill: "#fafafa", xmlns: "http://www.w3.org/2000/svg", children: jsxs("g", { mask: "url(#mask0_4377_23303)", children: [jsx$2("circle", { cx: "12", cy: "12", r: "11", fill: "#fafafa" }), jsx$2("path", { d: "M0 12.9777C0.0118051 5.83109 5.86935 -0.0156193 13.0011 -9.12111e-05C20.1926 0.0161764 26.0074 5.84588 26 13.0332C25.9926 20.2375 20.138 26.062 12.8624 25.9992C5.72916 25.9378 0.0272993 20.1783 0 12.9777ZM10.6563 20.2242C11.2222 20.2331 11.9032 20.0659 12.5547 19.7598C13.4386 19.345 14.0879 18.6462 14.7077 17.929C15.1068 17.4676 14.9954 16.7525 14.5387 16.3606C14.0746 15.9621 13.3995 15.9769 12.9561 16.4028C12.6765 16.6712 12.4123 16.9544 12.132 17.2213C11.1875 18.1175 9.72666 18.1027 8.81693 17.1932C7.90573 16.2823 7.88802 14.8211 8.78299 13.8776C9.04344 13.6033 9.31865 13.3437 9.58205 13.0731C10.0454 12.5962 10.0484 11.8656 9.59312 11.4079C9.1342 10.9472 8.41409 10.9465 7.92934 11.4123C7.67036 11.6615 7.41434 11.9144 7.16274 12.1717C6.29433 13.0576 5.82803 14.1172 5.78745 15.3624C5.70113 18.0332 7.82826 20.2294 10.6563 20.2242ZM15.5016 5.78746C14.31 5.78894 13.2638 6.18454 12.374 6.97278C12.036 7.27151 11.7276 7.60426 11.4126 7.92813C10.9359 8.41837 10.9411 9.15189 11.417 9.61182C11.8811 10.0599 12.6005 10.0444 13.0808 9.57337C13.3575 9.302 13.6223 9.01879 13.9071 8.75703C14.4797 8.22982 15.1644 8.02647 15.9243 8.16918C16.8525 8.34369 17.487 8.89753 17.7652 9.80333C18.0434 10.7091 17.8176 11.5122 17.1617 12.1924C16.9189 12.4446 16.6651 12.6864 16.4202 12.9378C15.9546 13.4147 15.9494 14.1446 16.4039 14.6015C16.8628 15.0629 17.5837 15.0659 18.0677 14.6023C18.3341 14.3472 18.5967 14.0884 18.8535 13.8236C19.7027 12.9481 20.1646 11.9048 20.2096 10.6803C20.3092 7.99246 18.188 5.78746 15.5008 5.7882L15.5016 5.78746ZM15.4381 11.7407C15.399 11.2674 15.1895 10.8903 14.7342 10.6803C14.2753 10.4681 13.7979 10.5494 13.4113 10.9295C12.5769 11.7517 11.7468 12.5792 10.9271 13.4155C10.4446 13.9072 10.446 14.6104 10.9035 15.0807C11.3676 15.5576 12.0892 15.5702 12.5879 15.0814C13.4254 14.2621 14.2473 13.4273 15.0751 12.5977C15.3068 12.3655 15.4182 12.0801 15.4381 11.7407Z", fill: "#312F3A" })] }) }));
6641
6641
  };
6642
6642
 
6643
- const Star = ({ width, height }) => {
6644
- return (jsx$2("svg", { width: width || '14', height: height || '14', viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", children: jsx$2("path", { d: "M13.9488 5.57875C13.8863 5.38658 13.7683 5.21721 13.6097 5.09198C13.4511 4.96674 13.259 4.89125 13.0575 4.875L9.37004 4.5775L7.94629 1.13438C7.8693 0.946766 7.73825 0.786285 7.56981 0.673341C7.40137 0.560397 7.20315 0.500092 7.00035 0.500092C6.79756 0.500092 6.59934 0.560397 6.4309 0.673341C6.26246 0.786285 6.13141 0.946766 6.05442 1.13438L4.63192 4.57688L0.942542 4.875C0.740778 4.89207 0.548535 4.9683 0.389901 5.09413C0.231267 5.21997 0.113295 5.38983 0.0507674 5.58241C-0.0117605 5.775 -0.0160642 5.98176 0.0383956 6.17678C0.0928554 6.37181 0.203657 6.54642 0.356917 6.67875L3.16942 9.10563L2.31254 12.7344C2.26462 12.9315 2.27635 13.1385 2.34625 13.3289C2.41615 13.5194 2.54107 13.6848 2.70514 13.8041C2.86921 13.9235 3.06505 13.9913 3.26778 13.9992C3.47051 14.007 3.671 13.9544 3.84379 13.8481L7.00004 11.9056L10.1582 13.8481C10.331 13.9532 10.5311 14.0047 10.7332 13.9963C10.9353 13.9879 11.1304 13.9199 11.2939 13.8008C11.4574 13.6817 11.5821 13.5169 11.6521 13.3271C11.7221 13.1374 11.7345 12.9311 11.6875 12.7344L10.8275 9.105L13.64 6.67813C13.7945 6.54602 13.9064 6.37103 13.9613 6.17532C14.0163 5.97961 14.0119 5.77199 13.9488 5.57875ZM12.99 5.92063L9.94629 8.54563C9.87688 8.60546 9.82524 8.68321 9.79703 8.7704C9.76881 8.85759 9.7651 8.95085 9.78629 9.04L10.7163 12.965C10.7187 12.9704 10.7189 12.9765 10.717 12.9821C10.715 12.9877 10.7109 12.9923 10.7057 12.995C10.6944 13.0038 10.6913 13.0019 10.6819 12.995L7.26192 10.8919C7.18315 10.8435 7.0925 10.8178 7.00004 10.8178C6.90758 10.8178 6.81693 10.8435 6.73817 10.8919L3.31817 12.9963C3.30879 13.0019 3.30629 13.0038 3.29442 12.9963C3.28914 12.9936 3.2851 12.989 3.28312 12.9834C3.28115 12.9778 3.28139 12.9717 3.28379 12.9663L4.21379 9.04125C4.23499 8.9521 4.23127 8.85884 4.20306 8.77165C4.17484 8.68446 4.1232 8.60671 4.05379 8.54688L1.01004 5.92188C1.00254 5.91563 0.995667 5.91 1.00192 5.89063C1.00817 5.87125 1.01317 5.87375 1.02254 5.8725L5.01754 5.55C5.10917 5.54215 5.19686 5.50917 5.27096 5.45469C5.34506 5.40022 5.4027 5.32637 5.43754 5.24125L6.97629 1.51563C6.98129 1.505 6.98317 1.5 6.99817 1.5C7.01317 1.5 7.01504 1.505 7.02004 1.51563L8.56254 5.24125C8.59771 5.3264 8.65572 5.40017 8.73016 5.45444C8.80461 5.5087 8.89259 5.54134 8.98442 5.54875L12.9794 5.87125C12.9888 5.87125 12.9944 5.87125 13 5.88938C13.0057 5.90751 13 5.91438 12.99 5.92063Z", fill: "#73728E" }) }));
6643
+ const Star = ({ width, height, color = '#73728E' }) => {
6644
+ return (jsx$2("svg", { width: width || '14', height: height || '14', viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", children: jsx$2("path", { d: "M13.9488 5.57875C13.8863 5.38658 13.7683 5.21721 13.6097 5.09198C13.4511 4.96674 13.259 4.89125 13.0575 4.875L9.37004 4.5775L7.94629 1.13438C7.8693 0.946766 7.73825 0.786285 7.56981 0.673341C7.40137 0.560397 7.20315 0.500092 7.00035 0.500092C6.79756 0.500092 6.59934 0.560397 6.4309 0.673341C6.26246 0.786285 6.13141 0.946766 6.05442 1.13438L4.63192 4.57688L0.942542 4.875C0.740778 4.89207 0.548535 4.9683 0.389901 5.09413C0.231267 5.21997 0.113295 5.38983 0.0507674 5.58241C-0.0117605 5.775 -0.0160642 5.98176 0.0383956 6.17678C0.0928554 6.37181 0.203657 6.54642 0.356917 6.67875L3.16942 9.10563L2.31254 12.7344C2.26462 12.9315 2.27635 13.1385 2.34625 13.3289C2.41615 13.5194 2.54107 13.6848 2.70514 13.8041C2.86921 13.9235 3.06505 13.9913 3.26778 13.9992C3.47051 14.007 3.671 13.9544 3.84379 13.8481L7.00004 11.9056L10.1582 13.8481C10.331 13.9532 10.5311 14.0047 10.7332 13.9963C10.9353 13.9879 11.1304 13.9199 11.2939 13.8008C11.4574 13.6817 11.5821 13.5169 11.6521 13.3271C11.7221 13.1374 11.7345 12.9311 11.6875 12.7344L10.8275 9.105L13.64 6.67813C13.7945 6.54602 13.9064 6.37103 13.9613 6.17532C14.0163 5.97961 14.0119 5.77199 13.9488 5.57875ZM12.99 5.92063L9.94629 8.54563C9.87688 8.60546 9.82524 8.68321 9.79703 8.7704C9.76881 8.85759 9.7651 8.95085 9.78629 9.04L10.7163 12.965C10.7187 12.9704 10.7189 12.9765 10.717 12.9821C10.715 12.9877 10.7109 12.9923 10.7057 12.995C10.6944 13.0038 10.6913 13.0019 10.6819 12.995L7.26192 10.8919C7.18315 10.8435 7.0925 10.8178 7.00004 10.8178C6.90758 10.8178 6.81693 10.8435 6.73817 10.8919L3.31817 12.9963C3.30879 13.0019 3.30629 13.0038 3.29442 12.9963C3.28914 12.9936 3.2851 12.989 3.28312 12.9834C3.28115 12.9778 3.28139 12.9717 3.28379 12.9663L4.21379 9.04125C4.23499 8.9521 4.23127 8.85884 4.20306 8.77165C4.17484 8.68446 4.1232 8.60671 4.05379 8.54688L1.01004 5.92188C1.00254 5.91563 0.995667 5.91 1.00192 5.89063C1.00817 5.87125 1.01317 5.87375 1.02254 5.8725L5.01754 5.55C5.10917 5.54215 5.19686 5.50917 5.27096 5.45469C5.34506 5.40022 5.4027 5.32637 5.43754 5.24125L6.97629 1.51563C6.98129 1.505 6.98317 1.5 6.99817 1.5C7.01317 1.5 7.01504 1.505 7.02004 1.51563L8.56254 5.24125C8.59771 5.3264 8.65572 5.40017 8.73016 5.45444C8.80461 5.5087 8.89259 5.54134 8.98442 5.54875L12.9794 5.87125C12.9888 5.87125 12.9944 5.87125 13 5.88938C13.0057 5.90751 13 5.91438 12.99 5.92063Z", fill: color }) }));
6645
6645
  };
6646
6646
 
6647
- const StarFilled = ({ width, height }) => {
6648
- return (jsx$2("svg", { width: width || '14', height: height || '14', viewBox: "0 0 16 17", xmlns: "http://www.w3.org/2000/svg", children: jsx$2("path", { d: "M14.6431 7.67812L11.8306 10.105L12.6875 13.7344C12.7347 13.9314 12.7226 14.138 12.6525 14.3281C12.5824 14.5182 12.4575 14.6833 12.2937 14.8025C12.1298 14.9216 11.9343 14.9896 11.7319 14.9977C11.5294 15.0058 11.3291 14.9538 11.1562 14.8481L7.99996 12.9056L4.84184 14.8481C4.66898 14.9532 4.4689 15.0047 4.2668 14.9963C4.06469 14.9879 3.8696 14.9199 3.70609 14.8008C3.54257 14.6817 3.41795 14.5169 3.3479 14.3271C3.27786 14.1374 3.26553 13.9311 3.31246 13.7344L4.17246 10.105L1.35996 7.67812C1.20702 7.54593 1.09641 7.37163 1.04195 7.17696C0.987486 6.98229 0.99158 6.77589 1.05372 6.58353C1.11586 6.39118 1.23329 6.22139 1.39135 6.09538C1.54941 5.96937 1.7411 5.89271 1.94246 5.87499L5.62996 5.57749L7.05246 2.13499C7.12946 1.94738 7.2605 1.7869 7.42894 1.67395C7.59738 1.56101 7.7956 1.5007 7.9984 1.5007C8.2012 1.5007 8.39942 1.56101 8.56785 1.67395C8.73629 1.7869 8.86734 1.94738 8.94434 2.13499L10.3662 5.57749L14.0537 5.87499C14.2555 5.89205 14.4477 5.96828 14.6064 6.09412C14.765 6.21996 14.883 6.38981 14.9455 6.5824C15.008 6.77499 15.0123 6.98175 14.9579 7.17677C14.9034 7.37179 14.7926 7.54641 14.6393 7.67874L14.6431 7.67812Z", fill: "#DE62F3" }) }));
6647
+ const StarFilled = ({ width, height, color = '#DE62F3' }) => {
6648
+ return (jsx$2("svg", { width: width || '14', height: height || '14', viewBox: "0 0 16 17", xmlns: "http://www.w3.org/2000/svg", children: jsx$2("path", { d: "M14.6431 7.67812L11.8306 10.105L12.6875 13.7344C12.7347 13.9314 12.7226 14.138 12.6525 14.3281C12.5824 14.5182 12.4575 14.6833 12.2937 14.8025C12.1298 14.9216 11.9343 14.9896 11.7319 14.9977C11.5294 15.0058 11.3291 14.9538 11.1562 14.8481L7.99996 12.9056L4.84184 14.8481C4.66898 14.9532 4.4689 15.0047 4.2668 14.9963C4.06469 14.9879 3.8696 14.9199 3.70609 14.8008C3.54257 14.6817 3.41795 14.5169 3.3479 14.3271C3.27786 14.1374 3.26553 13.9311 3.31246 13.7344L4.17246 10.105L1.35996 7.67812C1.20702 7.54593 1.09641 7.37163 1.04195 7.17696C0.987486 6.98229 0.99158 6.77589 1.05372 6.58353C1.11586 6.39118 1.23329 6.22139 1.39135 6.09538C1.54941 5.96937 1.7411 5.89271 1.94246 5.87499L5.62996 5.57749L7.05246 2.13499C7.12946 1.94738 7.2605 1.7869 7.42894 1.67395C7.59738 1.56101 7.7956 1.5007 7.9984 1.5007C8.2012 1.5007 8.39942 1.56101 8.56785 1.67395C8.73629 1.7869 8.86734 1.94738 8.94434 2.13499L10.3662 5.57749L14.0537 5.87499C14.2555 5.89205 14.4477 5.96828 14.6064 6.09412C14.765 6.21996 14.883 6.38981 14.9455 6.5824C15.008 6.77499 15.0123 6.98175 14.9579 7.17677C14.9034 7.37179 14.7926 7.54641 14.6393 7.67874L14.6431 7.67812Z", fill: color }) }));
6649
6649
  };
6650
6650
 
6651
6651
  const FirePink = ({ width, height }) => {
@@ -18888,7 +18888,7 @@ function useFavoriteTokens() {
18888
18888
  return { favTokens: data, addFavToken };
18889
18889
  }
18890
18890
 
18891
- const AddFavToken = ({ tokenSymbol, hotBond }) => {
18891
+ const AddFavToken = ({ tokenSymbol, hotBond, isGoldBond, }) => {
18892
18892
  const { favTokens, addFavToken } = useFavoriteTokens();
18893
18893
  const [isFavToken, setIsFavToken] = useState(false);
18894
18894
  useEffect(() => {
@@ -18898,7 +18898,7 @@ const AddFavToken = ({ tokenSymbol, hotBond }) => {
18898
18898
  event.stopPropagation();
18899
18899
  setIsFavToken(true);
18900
18900
  addFavToken(tokenSymbol);
18901
- }, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex' }, children: isFavToken ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22 })) : (jsx$2(Svg, { icon: hotBond ? 'FirePink' : 'Star', width: hotBond ? 25 : 20, height: hotBond ? 25 : 20 })) }, isFavToken ? 'StarFilled' : 'Star') }) }));
18901
+ }, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex' }, children: isFavToken ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22, color: isGoldBond ? '#ffffff' : '#DE62F3' })) : (jsx$2(Svg, { icon: hotBond ? 'FirePink' : 'Star', width: hotBond ? 25 : 20, height: hotBond ? 25 : 20, color: isGoldBond ? '#ffffff' : '#73728E' })) }, isFavToken ? 'StarFilled' : 'Star') }) }));
18902
18902
  };
18903
18903
 
18904
18904
  const defaultUrls = {
@@ -18935,7 +18935,7 @@ const NETWORK_COLORS = {
18935
18935
  [types.ChainId.MONAD_TESTNET]: '#836EF9',
18936
18936
  [types.ChainId.SONIC]: '#fb9a4c',
18937
18937
  };
18938
- const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
18938
+ const TokenInfoAndName = ({ bill, vestEnds, isHotBond, isGoldBond, }) => {
18939
18939
  var _a, _b, _c, _d, _e;
18940
18940
  const SDKConfig = useSDKConfig();
18941
18941
  const tokenName = 'showcaseTokenName' in bill ? bill.showcaseTokenName : bill.earnToken.symbol;
@@ -18949,7 +18949,7 @@ const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
18949
18949
  } })] })), jsxs(Flex, { className: "tokeninfoname tokencontainer", sx: {
18950
18950
  marginTop: vestEnds ? ['10px', '10px', '10px', '0px'] : 0,
18951
18951
  maxWidth: ['140px', '140px', '140px', '190px', '190px'],
18952
- }, children: [jsx$2(TokenImage, { symbol: tokenName, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [tokenName, vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: { minWidth: '25px', p: '5px' }, children: jsx$2(AddFavToken, { tokenSymbol: tokenName, hotBond: isHotBond }) })] }), jsx$2(Flex, { sx: {
18952
+ }, children: [jsx$2(TokenImage, { symbol: tokenName, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [tokenName, vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: { minWidth: '25px', p: '5px' }, children: jsx$2(AddFavToken, { tokenSymbol: tokenName, hotBond: isHotBond, isGoldBond: isGoldBond }) })] }), jsx$2(Flex, { sx: {
18953
18953
  justifyContent: isHotBond ? 'center' : 'flex-start',
18954
18954
  alignItems: 'center',
18955
18955
  }, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: ((_c = bill.tags) === null || _c === void 0 ? void 0 : _c[0]) && jsx$2(ListTag, { text: (_e = (_d = bill.tags) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.toUpperCase() }) }) }), jsx$2(Flex, { className: vestEnds ? '' : 'short-description-basepad', sx: { display: 'none' }, children: bill.shortDescription })] }));
@@ -71205,6 +71205,7 @@ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, pro
71205
71205
  const UserBondRow = ({ bill }) => {
71206
71206
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
71207
71207
  const userChainId = useChainId();
71208
+ const { address: account } = useAccount();
71208
71209
  const { switchChain } = useSwitchChain();
71209
71210
  const { writeContractAsync } = useWriteContract();
71210
71211
  const { addToastError } = usePopups();
@@ -71223,7 +71224,7 @@ const UserBondRow = ({ bill }) => {
71223
71224
  functionName: 'redeem',
71224
71225
  args: [billId],
71225
71226
  chain: userChainId,
71226
- account: address,
71227
+ account,
71227
71228
  });
71228
71229
  setLoadingTx(false);
71229
71230
  if (tx) {
@@ -76390,7 +76391,7 @@ const BonusComponent = ({ bond, tooltipPosition, }) => {
76390
76391
  zIndex: 1,
76391
76392
  background: 'primaryButton',
76392
76393
  opacity: 0.3,
76393
- } }), jsxs(Flex, { sx: { width: '100%', zIndex: 2, alignItems: 'center' }, children: [jsx$2("img", { src: `/images/launch/legend.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { fontSize: '14px', mr: '3px' }, children: "Up to" }), jsxs(Flex, { sx: { color: (highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) > 0 ? 'success' : 'error' }, children: [(_c = highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%"] })] })] }) }) })) : (`${(_d = baseTrueBondPrice === null || baseTrueBondPrice === void 0 ? void 0 : baseTrueBondPrice.bonusWithFee) === null || _d === void 0 ? void 0 : _d.toFixed(2)}%`) }));
76394
+ } }), jsxs(Flex, { sx: { width: '100%', zIndex: 2, alignItems: 'center' }, children: [jsx$2("img", { src: `/images/launch/legend.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { fontSize: '14px', mr: '3px' }, children: "Up to" }), jsxs(Flex, { sx: { color: (highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) > 0 ? 'success' : 'error' }, children: [(_c = highestPointsElement === null || highestPointsElement === void 0 ? void 0 : highestPointsElement.bonusWithFee) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%"] })] })] }) }) })) : (jsxs(Flex, { sx: { alignItems: 'center' }, className: `${getDiscountColor(+(baseTrueBondPrice === null || baseTrueBondPrice === void 0 ? void 0 : baseTrueBondPrice.bonusWithFee))}`, children: [(_d = baseTrueBondPrice === null || baseTrueBondPrice === void 0 ? void 0 : baseTrueBondPrice.bonusWithFee) === null || _d === void 0 ? void 0 : _d.toFixed(2), "%"] })) }));
76394
76395
  };
76395
76396
 
76396
76397
  const useIsMobile = () => {
@@ -76732,6 +76733,7 @@ const BuyBond = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond, isPro
76732
76733
  const bondData = bonds === null || bonds === void 0 ? void 0 : bonds.find((bond) => { var _a; return ((_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (bondAddress === null || bondAddress === void 0 ? void 0 : bondAddress.toLowerCase()); });
76733
76734
  const { abTestValue } = useABTesting({ key: ABTestKeys.BOND_DESCRIPTION });
76734
76735
  const reason = abTestValue === 'true' ? 'bondDescription' : 'noBondDescription';
76736
+ const isGoldRush = 'billArt' in bondData ? bondData.billArt.collection.toLowerCase().includes('apebond') : false;
76735
76737
  // Tier Gating
76736
76738
  const userTier = getUserTier(userPoints !== null && userPoints !== void 0 ? userPoints : '0');
76737
76739
  const minTier = (bondData === null || bondData === void 0 ? void 0 : bondData.minTier) !== undefined ? bondData.minTier : null;
@@ -76965,26 +76967,26 @@ const BuyBond = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond, isPro
76965
76967
  console.log('change to native');
76966
76968
  }
76967
76969
  }, [inputCurrencyBalance]);
76968
- return bondData ? (jsx$2(Flex, { className: "modal-content", children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, inputDisabled: isUserRestricted }), SDKConfig.useTiers && jsx$2(GetUpToComponent, { bond: bondData, depositAmount: depositAmount }), jsxs(Flex, { className: "modaltable-container button-container", children: [account && (jsx$2(Flex, { className: "button-container get", children: jsx$2(Button, { className: "action-button", onClick: () => bondData.billVersion === types.BillVersion.V4 && SDKConfig.useTiers
76969
- ? window.open('http://ape.bond/tier-staking', '_blank')
76970
- : supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId)
76971
- ? handleOpenZapModal()
76972
- : openExternal(), variant: "secondary", fullWidth: true, children: bondData.billVersion === types.BillVersion.V4 && SDKConfig.useTiers
76973
- ? `Get your Tier`
76974
- : `Get ${getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)}` }) })), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : isUserRestricted ? (jsx$2(Button, { className: "action-button", disabled: true, children: "INSUFFICIENT TIER" })) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "action-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
76975
- event.stopPropagation();
76976
- switchChain({ chainId: bondData.chainId });
76977
- }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
76978
- (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
76979
- !account ||
76980
- !inputValue ||
76981
- parseFloat(inputValue) === 0 ||
76982
- fetchingZapQuote ||
76983
- zapError, onClick: handleOpenModal, children: zapError ? 'something went wrong' : `buy` })) : (jsx$2(Button, { className: "action-button", load: approvalState === ApprovalState.PENDING, disabled: approvalState === ApprovalState.PENDING ||
76984
- (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
76985
- !account ||
76986
- !inputValue ||
76987
- parseFloat(inputValue) === 0, onClick: handleApprove, children: "enable" })) })] })] }) })) : (jsx$2(Fragment$1, {}));
76970
+ return bondData ? (jsxs(Flex, { className: `modal-content ${isGoldRush ? 'gold-rush' : ''}`, children: [jsx$2("div", { className: "gold-ribbon" }), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, inputDisabled: isUserRestricted }), SDKConfig.useTiers && jsx$2(GetUpToComponent, { bond: bondData, depositAmount: depositAmount }), jsxs(Flex, { className: "modaltable-container button-container", children: [account && (jsx$2(Flex, { className: "button-container get", children: jsx$2(Button, { className: "action-button", onClick: () => bondData.billVersion === types.BillVersion.V4 && SDKConfig.useTiers
76971
+ ? window.open('http://ape.bond/tier-staking', '_blank')
76972
+ : supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId)
76973
+ ? handleOpenZapModal()
76974
+ : openExternal(), variant: "secondary", fullWidth: true, children: bondData.billVersion === types.BillVersion.V4 && SDKConfig.useTiers
76975
+ ? `Get your Tier`
76976
+ : `Get ${getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)}` }) })), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : isUserRestricted ? (jsx$2(Button, { className: "action-button", disabled: true, children: "INSUFFICIENT TIER" })) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "action-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
76977
+ event.stopPropagation();
76978
+ switchChain({ chainId: bondData.chainId });
76979
+ }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
76980
+ (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
76981
+ !account ||
76982
+ !inputValue ||
76983
+ parseFloat(inputValue) === 0 ||
76984
+ fetchingZapQuote ||
76985
+ zapError, onClick: handleOpenModal, children: zapError ? 'something went wrong' : `buy` })) : (jsx$2(Button, { className: "action-button", load: approvalState === ApprovalState.PENDING, disabled: approvalState === ApprovalState.PENDING ||
76986
+ (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
76987
+ !account ||
76988
+ !inputValue ||
76989
+ parseFloat(inputValue) === 0, onClick: handleApprove, children: "enable" })) })] })] })] })) : (jsx$2(Fragment$1, {}));
76988
76990
  };
76989
76991
 
76990
76992
  const BuyBondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) => {
@@ -77117,6 +77119,7 @@ const BondRow = ({ bond }) => {
77117
77119
  : 'contractAddress' in bond
77118
77120
  ? bond.contractAddress[bond.chainId]
77119
77121
  : undefined;
77122
+ const isGoldRush = 'billArt' in bond ? bond.billArt.collection === types.BillArtCollection.GoldenTicket_Collection1 : false;
77120
77123
  // Modal
77121
77124
  const [openBuyModal] = useModal(jsx$2(ModalHandler, { bondAddress: billAddress, bondChain: bond.chainId }), true, true, `buyBondModal-${billAddress}-${bond.chainId}`);
77122
77125
  const handleOpenModal = () => {
@@ -77154,7 +77157,7 @@ const BondRow = ({ bond }) => {
77154
77157
  const tokens = new BigNumber$1(tokensRemaining);
77155
77158
  return tokens.times(payoutTokenPrice);
77156
77159
  };
77157
- return (jsxs("div", { className: "bond-row", onClick: handleOpenModal, sx: { borderRadius: 'normal' }, children: [jsx$2("div", { className: "token-info-container", sx: { width: ['50%', '50%', '50%', '30%'] }, children: jsx$2(TokenInfoAndName, { bill: bond }) }), jsxs("div", { className: "bond-info-columns", sx: { width: ['50%', '50%', '50%', '60%'] }, children: [jsx$2("div", { className: `discount-column`, children: 'trueBondPrices' in bond ? (((_b = (_a = findHighestTrueBondPrice(TIERS_WEIGHT[types.LaunchBondTiers.Legend], bond)) === null || _a === void 0 ? void 0 : _a.bonusWithFee) !== null && _b !== void 0 ? _b : 0) > 0 ? (jsx$2(BonusComponent, { bond: bond, tooltipPosition: isMobile ? 'bottomRight' : 'bottomLeft' })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: 'This bond is currently on cooldown and has no bonus. Please check back soon.', width: "205px", placement: "bottomRight", transformTip: "translate(10%, 0%)", children: jsx$2(Svg, { icon: "Timer", width: "20px", color: "#81CFEA" }) }))) : ('-') }), jsx$2("div", { className: "arr-column", children: 'trueBondPrices' in bond ? (((_d = (_c = findHighestTrueBondPrice(TIERS_WEIGHT[types.LaunchBondTiers.Legend], bond)) === null || _c === void 0 ? void 0 : _c.bonusWithFee) !== null && _d !== void 0 ? _d : 0) > 0 ? (bond.billVersion === types.BillVersion.V4 && SDKConfig.useTiers ? (jsxs(Flex, { sx: {
77160
+ return (jsxs("div", { className: `bond-row ${isGoldRush ? 'gold-rush' : ''}`, onClick: handleOpenModal, sx: { borderRadius: 'normal' }, children: [jsx$2("div", { className: "gold-ribbon" }), jsx$2("div", { className: "token-info-container", sx: { width: ['50%', '50%', '50%', '30%'] }, children: jsx$2(TokenInfoAndName, { bill: bond, isGoldBond: isGoldRush }) }), jsxs("div", { className: "bond-info-columns", sx: { width: ['50%', '50%', '50%', '60%'] }, children: [jsx$2("div", { className: `discount-column`, children: 'trueBondPrices' in bond ? (((_b = (_a = findHighestTrueBondPrice(TIERS_WEIGHT[types.LaunchBondTiers.Legend], bond)) === null || _a === void 0 ? void 0 : _a.bonusWithFee) !== null && _b !== void 0 ? _b : 0) > 0 ? (jsx$2(BonusComponent, { bond: bond, tooltipPosition: isMobile ? 'bottomRight' : 'bottomLeft' })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: 'This bond is currently on cooldown and has no bonus. Please check back soon.', width: "205px", placement: "bottomRight", transformTip: "translate(10%, 0%)", children: jsx$2(Svg, { icon: "Timer", width: "20px", color: "#81CFEA" }) }))) : ('-') }), jsx$2("div", { className: "arr-column", children: 'trueBondPrices' in bond ? (((_d = (_c = findHighestTrueBondPrice(TIERS_WEIGHT[types.LaunchBondTiers.Legend], bond)) === null || _c === void 0 ? void 0 : _c.bonusWithFee) !== null && _d !== void 0 ? _d : 0) > 0 ? (bond.billVersion === types.BillVersion.V4 && SDKConfig.useTiers ? (jsxs(Flex, { sx: {
77158
77161
  p: '3px 6px',
77159
77162
  border: '1px solid var(--theme-ui-colors-primaryButton)',
77160
77163
  borderRadius: 'normal',
package/dist/styles.css CHANGED
@@ -144,6 +144,15 @@
144
144
  border-radius: 10px;
145
145
  width: 100%;
146
146
  }
147
+ .modal-content .gold-ribbon {
148
+ display: none;
149
+ }
150
+
151
+ .modal-content.gold-rush .gold-ribbon {
152
+ display: block;
153
+ top: 0px;
154
+ left: 0px;
155
+ }
147
156
 
148
157
  .modaltable-container {
149
158
  width: 100%;
@@ -571,10 +580,14 @@
571
580
 
572
581
  .fading-hr {
573
582
  border: none;
574
- height: 1px; /* Adjust thickness */
575
- background: linear-gradient(to right, transparent, white, transparent); /* White fades to transparent */
576
- width: 100%; /* Full width */
577
- margin: 20px 0; /* Adjust margin for spacing */
583
+ height: 1px;
584
+ /* Adjust thickness */
585
+ background: linear-gradient(to right, transparent, white, transparent);
586
+ /* White fades to transparent */
587
+ width: 100%;
588
+ /* Full width */
589
+ margin: 20px 0;
590
+ /* Adjust margin for spacing */
578
591
  }
579
592
 
580
593
  .rotate-hr {
@@ -618,6 +631,7 @@ span.flex-inline {
618
631
  cursor: pointer;
619
632
  margin-bottom: 5px;
620
633
  justify-content: space-between;
634
+ position: relative;
621
635
  }
622
636
  .bond-row:hover {
623
637
  background-color: var(--theme-ui-colors-white3);
@@ -681,6 +695,31 @@ span.flex-inline {
681
695
  width: 50px;
682
696
  display: flex;
683
697
  }
698
+ .bond-row .gold-ribbon {
699
+ display: none;
700
+ }
701
+
702
+ .gold-ribbon {
703
+ position: absolute;
704
+ background-image: url("/images/bills/tag.png");
705
+ background-repeat: no-repeat;
706
+ background-position: center;
707
+ background-size: contain;
708
+ width: 70px;
709
+ height: 68px;
710
+ z-index: 11;
711
+ }
712
+
713
+ .bond-row.gold-rush {
714
+ background: linear-gradient(90deg, rgba(227, 164, 85, 0.6) 7%, rgba(103, 61, 34, 0.6) 18%, rgba(246, 219, 166, 0.6) 36%, rgba(255, 235, 195, 0.6) 43%, rgba(240, 190, 121, 0.6) 53%, rgba(238, 188, 112, 0.6) 77%, rgba(63, 31, 15, 0.6) 92%), linear-gradient(0deg, #FFAE00 0%, #FFAE00 100%), var(--Neutral-Elevation-1, #161420);
715
+ }
716
+ .bond-row.gold-rush .list-tag {
717
+ color: white;
718
+ background: linear-gradient(99.09deg, #A16552 0%, #FFB300 106.96%);
719
+ }
720
+ .bond-row.gold-rush .gold-ribbon {
721
+ display: block;
722
+ }
684
723
 
685
724
  .column.column-tokens {
686
725
  display: flex;
@@ -36,4 +36,7 @@ export interface BondsData {
36
36
  lpToken: Token;
37
37
  minTier?: LaunchBondTiers;
38
38
  billVersion?: BillVersion;
39
+ billArt: {
40
+ collection: string;
41
+ };
39
42
  }
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": "3.0.17",
6
+ "version": "3.0.19",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",