@ape.swap/bonds-sdk 4.1.0-test.14 → 4.1.0-test.16

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,5 +1,5 @@
1
1
  import { ChainId } from '@ape.swap/apeswap-lists';
2
2
  export declare const supportedByLIFI: ChainId[];
3
3
  export declare const STRAPI_URL = "https://strapi-api.ape.bond";
4
- export declare const SOUL_ZAP_API = "https://zap-api.ape.bond/zap?batch=1";
4
+ export declare const SOUL_ZAP_API = "https://zap-api.ape.bond/zap";
5
5
  export declare const APEBOND = "https://ape.bond";
package/dist/main.js CHANGED
@@ -63879,8 +63879,8 @@ const getPercentageVested = (bond) => {
63879
63879
  const vestingTerm = parseInt((_a = bond === null || bond === void 0 ? void 0 : bond.vesting) !== null && _a !== void 0 ? _a : '0');
63880
63880
  const timeLeftForFullyVested = getTimeLeftForFullyVested(bond);
63881
63881
  if (timeLeftForFullyVested <= 0)
63882
- return 1;
63883
- return 100 - ((vestingTerm - timeLeftForFullyVested) / vestingTerm) * 100;
63882
+ return 100;
63883
+ return ((vestingTerm - timeLeftForFullyVested) / vestingTerm) * 100;
63884
63884
  };
63885
63885
  const getTimeLeftForFullyVested = (bond) => {
63886
63886
  var _a, _b;
@@ -65479,7 +65479,7 @@ function fetchUserOwnedSolanaBonds(user, bondData, tokenPrices) {
65479
65479
  if (!user)
65480
65480
  return [];
65481
65481
  try {
65482
- console.time('fetch-SOL-bonds');
65482
+ console.time('fetchUserBondsSOL');
65483
65483
  const results = [];
65484
65484
  const userBase58 = new PublicKey(user).toBase58();
65485
65485
  const connection = new Connection(getRPC(types$1.ChainId.SOL), 'confirmed');
@@ -65559,7 +65559,7 @@ function fetchUserOwnedSolanaBonds(user, bondData, tokenPrices) {
65559
65559
  userOwnedBills: userBills,
65560
65560
  });
65561
65561
  }
65562
- console.timeEnd('fetch-SOL-bonds');
65562
+ console.timeEnd('fetchUserBondsSOL');
65563
65563
  return results;
65564
65564
  }
65565
65565
  catch (err) {
@@ -65629,7 +65629,7 @@ const useSOLAccount = () => {
65629
65629
  return Object.assign(Object.assign({}, account), { publicKey: solAddress ? solPublicKey : account.publicKey });
65630
65630
  };
65631
65631
 
65632
- function useUserBonds(dontFetch) {
65632
+ function useUserBonds() {
65633
65633
  var _a, _b;
65634
65634
  // First fetch the full list of bonds
65635
65635
  const { data: bondList } = useBondsList();
@@ -65641,8 +65641,8 @@ function useUserBonds(dontFetch) {
65641
65641
  return useQuery({
65642
65642
  queryKey: [QUERY_KEYS.USER_BONDS, address, publicKey, (_b = (_a = Object.keys(tokenPrices !== null && tokenPrices !== void 0 ? tokenPrices : {})) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : null],
65643
65643
  queryFn: () => getUserBonds(address, solanaAccount, bondList, queryClient),
65644
- refetchInterval: 20000, // TODO rollback this
65645
- enabled: !!bondList && !!(address || solanaAccount) && !!tokenPrices && true,
65644
+ refetchInterval: 120000,
65645
+ enabled: !!bondList && !!(address || solanaAccount) && !!tokenPrices,
65646
65646
  refetchOnWindowFocus: false,
65647
65647
  refetchOnMount: false,
65648
65648
  refetchOnReconnect: false,
@@ -65743,161 +65743,13 @@ const getUserBonds = (account, solanaAccount, bondList, queryClient) => __awaite
65743
65743
  }
65744
65744
  });
65745
65745
 
65746
- const colors$1 = {
65747
- // main background gradients
65748
- white1: '#0E0D16', // base site background
65749
- white2: '#161420',
65750
- white3: '#1F1D29',
65751
- white4: '#282632',
65752
- white5: '#312F3A',
65753
- primaryButton: '#6560C5', //this should've been called just "primary"
65754
- success: '#38A611',
65755
- error: '#DF4141',
65756
- yellow: '#FFB300',
65757
- // Button colors
65758
- primaryButtonDisable: '#48475B',
65759
- primaryButtonHovered: '#8480D1',
65760
- textDisabledButton: '#73728E',
65761
- // Text-related colors
65762
- text: '#FAFAFA',
65763
- textDisabled: '#424242',
65764
- primaryBright: '#FAFAFA',
65765
- abondGradient: 'linear-gradient(98.79deg, #6560C5 -2.37%, #E07753 100%)',
65766
- modalOverlay: 'rgba(66, 66, 66, 0.5)',
65767
- };
65768
-
65769
- function ConnectToSolanaCard() {
65770
- const { setVisible } = useWalletModal();
65771
- return (jsxs(Flex, { sx: {
65772
- width: '100%',
65773
- height: '75px',
65774
- background: `url('https://ape.bond/images/connect-to-vm/solana-card-background.svg') no-repeat center center`,
65775
- backgroundSize: 'cover',
65776
- p: ['10px', '10px', '10px', '20px'],
65777
- borderRadius: '10px',
65778
- justifyContent: 'space-between',
65779
- alignItems: 'center',
65780
- border: 'none',
65781
- cursor: 'pointer',
65782
- }, children: [jsxs(Flex, { sx: {
65783
- width: '100%',
65784
- maxWidth: '300px',
65785
- gap: '10px',
65786
- alignItems: 'center',
65787
- }, children: [jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/solana-icon.svg", alt: "solana icon", width: 30, height: 30, style: { borderRadius: '10px' } }), jsxs(Flex, { sx: {
65788
- flexDirection: 'column',
65789
- }, children: [jsxs(Text, { sx: { fontSize: '18px', fontWeight: '700', lineHeight: '18.5px', display: 'flex', alignItems: 'center' }, children: ["Solana", jsx$2(Text, { sx: {
65790
- fontSize: '10px',
65791
- fontWeight: '600',
65792
- lineHeight: '8px',
65793
- color: '#FAFAFA',
65794
- padding: '4px 6px',
65795
- background: 'rgba(250, 250, 250, 0.3)',
65796
- borderRadius: '4px',
65797
- marginLeft: '6px',
65798
- marginRight: '6px',
65799
- }, children: "NEW" }), jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/svm-compatible-wallets.svg", alt: "solana compatible wallets", width: 43, height: 17 })] }), jsx$2(Text, { sx: { fontSize: '11px', fontWeight: '400', lineHeight: '16px', color: 'white' }, children: "Connect your Solana wallet to view your Solana Bonds!" })] })] }), jsx$2(Flex, { sx: { minWidth: '100px' }, children: jsx$2(Button, { onClick: () => setVisible(true), sx: {
65800
- background: colors$1.text,
65801
- color: colors$1.primaryButton,
65802
- border: 'none',
65803
- height: '31px',
65804
- width: '210px',
65805
- fontSize: '14px',
65806
- fontWeight: '700',
65807
- '&:hover': { color: colors$1.text },
65808
- }, children: "Connect" }) })] }));
65809
- }
65810
-
65811
- function track({ event, chain, data, value, }) {
65812
- var _a;
65813
- (_a = window.dataLayer) === null || _a === void 0 ? void 0 : _a.push(Object.assign({ event, value, chain }, data));
65814
- }
65815
-
65816
- const RainbowKitButton = () => {
65817
- return (jsx$2(ConnectButton$1.Custom, { children: ({ openConnectModal }) => {
65818
- return (jsx$2(Button, { fullWidth: true, onClick: () => {
65819
- openConnectModal();
65820
- track({
65821
- event: 'wallet_connect',
65822
- chain: 0,
65823
- data: {
65824
- wallet: 'rainbow',
65825
- },
65826
- });
65827
- }, sx: { height: '45px', padding: '10px 10px', alignItems: 'center', width: '100%' }, children: "Connect" }));
65828
- } }));
65829
- };
65830
-
65831
- const AppKitButton = () => {
65832
- return (jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: jsx$2("appkit-connect-button", { label: "Connect Your Wallet" }) }));
65833
- };
65834
-
65835
- const ConnectButton = () => {
65836
- const config = useSDKConfig();
65837
- return (config === null || config === void 0 ? void 0 : config.connector) === 'rainbowkit' ? (jsx$2(RainbowKitButton, {})) : (config === null || config === void 0 ? void 0 : config.connector) === 'appkit' ? (jsx$2(AppKitButton, {})) : (jsx$2(Button, { disabled: true, fullWidth: true, children: "Connect wallet" }));
65838
- };
65839
-
65840
- function ConnectToEVMBanner() {
65841
- return (jsxs(Flex, { sx: {
65842
- width: '100%',
65843
- height: '75px',
65844
- backgroundColor: 'white2',
65845
- p: ['10px', '10px', '10px', '20px'],
65846
- borderRadius: '10px',
65847
- justifyContent: 'space-between',
65848
- alignItems: 'center',
65849
- cursor: 'pointer',
65850
- }, children: [jsxs(Flex, { sx: {
65851
- width: '100%',
65852
- maxWidth: '300px',
65853
- gap: '10px',
65854
- alignItems: 'center',
65855
- }, children: [jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/ethereum-icon.svg", alt: "ethereum icon", width: 30, height: 30 }), jsxs(Flex, { sx: {
65856
- flexDirection: 'column',
65857
- }, children: [jsxs(Text, { sx: { fontSize: '15px', fontWeight: '600', lineHeight: '18.5px', display: 'flex', alignItems: 'center' }, children: ["Ethereum", jsx$2(Text, { sx: {
65858
- display: ['none', 'none', 'none', 'flex'],
65859
- fontSize: '10px',
65860
- fontWeight: '600',
65861
- lineHeight: '8px',
65862
- color: '#FAFAFA',
65863
- padding: '4px 6px',
65864
- background: 'rgba(250, 250, 250, 0.3)',
65865
- borderRadius: '4px',
65866
- marginLeft: '6px',
65867
- marginRight: '6px',
65868
- }, children: "Popular" }), jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/evm-compatible-wallets.svg", alt: "solana compatible wallets", width: 55, height: 17, style: { marginLeft: '10px' } })] }), jsx$2(Text, { sx: {
65869
- fontSize: '10px',
65870
- fontWeight: '400',
65871
- lineHeight: '16px',
65872
- color: 'rgba(255, 255, 255, 0.65)',
65873
- display: 'flex',
65874
- alignItems: 'center',
65875
- gap: '4px',
65876
- }, children: "Connect your EVM wallet to view your EVM Bonds!" })] })] }), jsx$2(Flex, { sx: {
65877
- minWidth: '100px',
65878
- width: '210px',
65879
- '& > *': {
65880
- width: '210px',
65881
- height: '31px !important',
65882
- fontSize: '14px !important',
65883
- },
65884
- }, children: jsx$2(ConnectButton, {}) })] }));
65885
- }
65886
-
65887
65746
  const PlaceholderMonkey = ({ text }) => {
65888
65747
  return (jsxs(Flex, { sx: {
65889
65748
  width: '100%',
65890
65749
  flexDirection: 'column',
65891
65750
  alignItems: 'center',
65892
65751
  borderRadius: 'normal',
65893
- mt: ['50px', '50px', '50px', '100px'],
65894
- }, children: [jsx$2(Svg, { icon: "placeholderMonkey" }), jsx$2(Text, { sx: { fontWeight: 600, fontSize: '16px', mt: '15px', opacity: 0.6 }, children: text }), text === 'You are not connected.' && (jsxs(Flex, { sx: {
65895
- width: '100%',
65896
- flexDirection: ['column', 'column', 'column', 'row'],
65897
- mt: ['50px', '50px', '50px', '100px'],
65898
- // px: ['10px', '10px', '10px', '20px'],
65899
- gap: '15px',
65900
- }, children: [jsx$2(ConnectToSolanaCard, {}), jsx$2(ConnectToEVMBanner, {})] }))] }));
65752
+ }, children: [jsx$2(Svg, { icon: "placeholderMonkey" }), jsx$2(Text, { sx: { fontWeight: 600, fontSize: '16px', mt: '15px', opacity: 0.6 }, children: text })] }));
65901
65753
  };
65902
65754
 
65903
65755
  function useCookie(key, defaultValue) {
@@ -65964,6 +65816,11 @@ function useChainFilterOption() {
65964
65816
  return { data, setChainFilterOption };
65965
65817
  }
65966
65818
 
65819
+ function track({ event, chain, data, value, }) {
65820
+ var _a;
65821
+ (_a = window.dataLayer) === null || _a === void 0 ? void 0 : _a.push(Object.assign({ event, value, chain }, data));
65822
+ }
65823
+
65967
65824
  const RecommendationSelector = ({ options, activeOption, setActiveOption, }) => {
65968
65825
  const handleClick = (option) => {
65969
65826
  setActiveOption(option);
@@ -66295,7 +66152,7 @@ const supportedByLIFI = [
66295
66152
  types$1.ChainId.KATANA,
66296
66153
  ];
66297
66154
  const STRAPI_URL = `https://strapi-api.ape.bond`;
66298
- const SOUL_ZAP_API = `https://zap-api.ape.bond/zap?batch=1`;
66155
+ const SOUL_ZAP_API = `https://zap-api.ape.bond/zap`;
66299
66156
  const APEBOND = `https://ape.bond`;
66300
66157
 
66301
66158
  const TokenImage = ({ symbol, symbol2, size, chain, }) => {
@@ -67923,6 +67780,142 @@ const YourBondsMenu = ({ chainFilterOption, setChainFilterOption, filterOptions,
67923
67780
  return (jsxs("div", { className: "bonds-menu", children: [jsx$2(BondFilters, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: setFilterOption, onHandleQueryChange: () => setInputValue('') }), jsxs("div", { className: "table-header-container", children: [jsx$2("div", { className: "search-container", children: jsx$2(Flex$1, { sx: { width: '100%', maxWidth: '300px' }, children: jsx$2(Input, { className: "search-input", value: inputValue, onChange: (event) => setInputValue(event.target.value), variant: "search", sx: { fontWeight: 600, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }) }), jsxs("div", { className: "headers-container", sx: { pr: ['0', '0', '0', '20px'] }, children: [jsx$2(Flex$1, { sx: { display: ['none', 'none', 'none', 'none', 'none', 'none', 'flex'], width: '125px' } }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('claimable'), children: ["CLAIMABLE", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('pending'), children: ["PENDING", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('terms'), children: ["TERMS", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsx$2(Flex$1, { className: "claim-all-button-container", children: SDKConfig.referenceId === 'apebond' && jsx$2(ClaimAll, {}) })] })] })] }));
67924
67781
  };
67925
67782
 
67783
+ const colors$1 = {
67784
+ // main background gradients
67785
+ white1: '#0E0D16', // base site background
67786
+ white2: '#161420',
67787
+ white3: '#1F1D29',
67788
+ white4: '#282632',
67789
+ white5: '#312F3A',
67790
+ primaryButton: '#6560C5', //this should've been called just "primary"
67791
+ success: '#38A611',
67792
+ error: '#DF4141',
67793
+ yellow: '#FFB300',
67794
+ // Button colors
67795
+ primaryButtonDisable: '#48475B',
67796
+ primaryButtonHovered: '#8480D1',
67797
+ textDisabledButton: '#73728E',
67798
+ // Text-related colors
67799
+ text: '#FAFAFA',
67800
+ textDisabled: '#424242',
67801
+ primaryBright: '#FAFAFA',
67802
+ abondGradient: 'linear-gradient(98.79deg, #6560C5 -2.37%, #E07753 100%)',
67803
+ modalOverlay: 'rgba(66, 66, 66, 0.5)',
67804
+ };
67805
+
67806
+ function ConnectToSolanaCard() {
67807
+ const { setVisible } = useWalletModal();
67808
+ return (jsxs(Flex, { sx: {
67809
+ width: '100%',
67810
+ height: '75px',
67811
+ background: `url('https://ape.bond/images/connect-to-vm/solana-card-background.svg') no-repeat center center`,
67812
+ backgroundSize: 'cover',
67813
+ p: ['10px', '10px', '10px', '20px'],
67814
+ borderRadius: '10px',
67815
+ justifyContent: 'space-between',
67816
+ alignItems: 'center',
67817
+ border: 'none',
67818
+ cursor: 'pointer',
67819
+ }, children: [jsxs(Flex, { sx: {
67820
+ width: '100%',
67821
+ maxWidth: '300px',
67822
+ gap: '10px',
67823
+ alignItems: 'center',
67824
+ }, children: [jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/solana-icon.svg", alt: "solana icon", width: 30, height: 30, style: { borderRadius: '10px' } }), jsxs(Flex, { sx: {
67825
+ flexDirection: 'column',
67826
+ }, children: [jsxs(Text, { sx: { fontSize: '18px', fontWeight: '700', lineHeight: '18.5px', display: 'flex', alignItems: 'center' }, children: ["Solana", jsx$2(Text, { sx: {
67827
+ fontSize: '10px',
67828
+ fontWeight: '600',
67829
+ lineHeight: '8px',
67830
+ color: '#FAFAFA',
67831
+ padding: '4px 6px',
67832
+ background: 'rgba(250, 250, 250, 0.3)',
67833
+ borderRadius: '4px',
67834
+ marginLeft: '6px',
67835
+ marginRight: '6px',
67836
+ }, children: "NEW" }), jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/svm-compatible-wallets.svg", alt: "solana compatible wallets", width: 43, height: 17 })] }), jsx$2(Text, { sx: { fontSize: '11px', fontWeight: '400', lineHeight: '16px', color: 'white' }, children: "Connect your Solana wallet to view your Solana Bonds!" })] })] }), jsx$2(Flex, { sx: { minWidth: '100px' }, children: jsx$2(Button, { onClick: () => setVisible(true), sx: {
67837
+ background: colors$1.text,
67838
+ color: colors$1.primaryButton,
67839
+ border: 'none',
67840
+ height: '31px',
67841
+ width: '210px',
67842
+ fontSize: '14px',
67843
+ fontWeight: '700',
67844
+ '&:hover': { color: colors$1.text },
67845
+ }, children: "Connect" }) })] }));
67846
+ }
67847
+
67848
+ const RainbowKitButton = () => {
67849
+ return (jsx$2(ConnectButton$1.Custom, { children: ({ openConnectModal }) => {
67850
+ return (jsx$2(Button, { fullWidth: true, onClick: () => {
67851
+ openConnectModal();
67852
+ track({
67853
+ event: 'wallet_connect',
67854
+ chain: 0,
67855
+ data: {
67856
+ wallet: 'rainbow',
67857
+ },
67858
+ });
67859
+ }, sx: { height: '45px', padding: '10px 10px', alignItems: 'center', width: '100%' }, children: "Connect" }));
67860
+ } }));
67861
+ };
67862
+
67863
+ const AppKitButton = () => {
67864
+ return (jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: jsx$2("appkit-connect-button", { label: "Connect Your Wallet" }) }));
67865
+ };
67866
+
67867
+ const ConnectButton = () => {
67868
+ const config = useSDKConfig();
67869
+ return (config === null || config === void 0 ? void 0 : config.connector) === 'rainbowkit' ? (jsx$2(RainbowKitButton, {})) : (config === null || config === void 0 ? void 0 : config.connector) === 'appkit' ? (jsx$2(AppKitButton, {})) : (jsx$2(Button, { disabled: true, fullWidth: true, children: "Connect wallet" }));
67870
+ };
67871
+
67872
+ function ConnectToEVMBanner() {
67873
+ return (jsxs(Flex, { sx: {
67874
+ width: '100%',
67875
+ height: '75px',
67876
+ backgroundColor: 'white2',
67877
+ p: ['10px', '10px', '10px', '20px'],
67878
+ borderRadius: '10px',
67879
+ justifyContent: 'space-between',
67880
+ alignItems: 'center',
67881
+ cursor: 'pointer',
67882
+ }, children: [jsxs(Flex, { sx: {
67883
+ width: '100%',
67884
+ maxWidth: '300px',
67885
+ gap: '10px',
67886
+ alignItems: 'center',
67887
+ }, children: [jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/ethereum-icon.svg", alt: "ethereum icon", width: 30, height: 30 }), jsxs(Flex, { sx: {
67888
+ flexDirection: 'column',
67889
+ }, children: [jsxs(Text, { sx: { fontSize: '15px', fontWeight: '600', lineHeight: '18.5px', display: 'flex', alignItems: 'center' }, children: ["Ethereum", jsx$2(Text, { sx: {
67890
+ display: ['none', 'none', 'none', 'flex'],
67891
+ fontSize: '10px',
67892
+ fontWeight: '600',
67893
+ lineHeight: '8px',
67894
+ color: '#FAFAFA',
67895
+ padding: '4px 6px',
67896
+ background: 'rgba(250, 250, 250, 0.3)',
67897
+ borderRadius: '4px',
67898
+ marginLeft: '6px',
67899
+ marginRight: '6px',
67900
+ }, children: "Popular" }), jsx$2("img", { src: "https://ape.bond/images/connect-to-vm/evm-compatible-wallets.svg", alt: "solana compatible wallets", width: 55, height: 17, style: { marginLeft: '10px' } })] }), jsx$2(Text, { sx: {
67901
+ fontSize: '10px',
67902
+ fontWeight: '400',
67903
+ lineHeight: '16px',
67904
+ color: 'rgba(255, 255, 255, 0.65)',
67905
+ display: 'flex',
67906
+ alignItems: 'center',
67907
+ gap: '4px',
67908
+ }, children: "Connect your EVM wallet to view your EVM Bonds!" })] })] }), jsx$2(Flex, { sx: {
67909
+ minWidth: '100px',
67910
+ width: '210px',
67911
+ '& > *': {
67912
+ width: '210px',
67913
+ height: '31px !important',
67914
+ fontSize: '14px !important',
67915
+ },
67916
+ }, children: jsx$2(ConnectButton, {}) })] }));
67917
+ }
67918
+
67926
67919
  function useFavoriteTokens() {
67927
67920
  const { cookie, updateCookie } = useCookie(QUERY_KEYS.FAVORITE_TOKENS, []);
67928
67921
  const { data } = useQuery({
@@ -81443,12 +81436,12 @@ const YourBonds = ({ showOnly }) => {
81443
81436
  const hasBonds = useMemo(() => {
81444
81437
  return (bondsToRender && bondsToRender.length > 0) || !!(preTGEBondsToRender === null || preTGEBondsToRender === void 0 ? void 0 : preTGEBondsToRender.length);
81445
81438
  }, [bondsToRender, preTGEBondsToRender]);
81446
- return (jsxs(Flex$1, { className: "yourbonds table-container", children: [!showOnly && (jsx$2(YourBondsMenu, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleFilterOption, setInputValue: setInputValue, inputValue: inputValue, handleSort: handleSort })), !account && !solanaAccount ? (jsx$2(PlaceholderMonkey, { text: 'You are not connected.' })) : hasBonds && hasFetched ? (jsxs(Fragment$1, { children: [preTGEBondsToRender === null || preTGEBondsToRender === void 0 ? void 0 : preTGEBondsToRender.map((userBond, index) => jsx$2(UserBondRowPreTGE, { userBond: userBond }, index)), bondsToRender.map((bond) => {
81439
+ return (jsxs(Flex$1, { className: "yourbonds table-container", children: [!showOnly && (jsx$2(YourBondsMenu, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleFilterOption, setInputValue: setInputValue, inputValue: inputValue, handleSort: handleSort })), !account && !solanaAccount ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: 'You are not connected.' }) })) : hasBonds && hasFetched ? (jsxs(Fragment$1, { children: [preTGEBondsToRender === null || preTGEBondsToRender === void 0 ? void 0 : preTGEBondsToRender.map((userBond, index) => jsx$2(UserBondRowPreTGE, { userBond: userBond }, index)), bondsToRender.map((bond) => {
81447
81440
  var _a;
81448
81441
  if (((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.chainId) === types$1.ChainId.SOL)
81449
81442
  return jsx$2(UserBondRowSolana, { bill: bond }, `${bond.billNftAddress}-${bond.id}`);
81450
81443
  return jsx$2(UserBondRow, { bill: bond }, bond.id);
81451
- })] })) : inputValue !== '' || !chainFilterOption.includes('All Chains') ? (jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' })) : userBondsFetched && (userBonds === null || userBonds === void 0 ? void 0 : userBonds.length) === 0 ? (jsx$2(PlaceholderMonkey, { text: `You do not own any ${account && solanaAccount ? 'EVM nor SOL' : account ? 'EVM' : 'SOL'} Bonds.` })) : (jsx$2(Flex$1, { className: "yourbonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), account && !solanaAccount && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToSolanaCard, {}) })), solanaAccount && !account && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToEVMBanner, {}) }))] }));
81444
+ })] })) : inputValue !== '' || !chainFilterOption.includes('All Chains') ? (jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' })) : hasFetched && !hasBonds ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: `You do not own any ${account && solanaAccount ? 'EVM nor SOL' : account ? 'EVM' : 'SOL'} Bonds.` }) })) : (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(Spinner, { size: 100 }) })), jsxs(Flex$1, { sx: { width: '100%', flexDirection: ['column', 'column', 'column', 'row'], gap: '10px', my: '10px' }, children: [!solanaAccount && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToSolanaCard, {}) })), !account && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToEVMBanner, {}) }))] })] }));
81452
81445
  };
81453
81446
 
81454
81447
  // This basically returns the 2 tags with the higher active bond count
@@ -82643,12 +82636,10 @@ const useSoulZapTokenQuote = (typedValue, inputCurrency, outputToken, chainId, a
82643
82636
  ];
82644
82637
  }, [zapInputData]);
82645
82638
  const fetchZapDetails = () => __awaiter$9(void 0, void 0, void 0, function* () {
82646
- var _a, _b, _c;
82639
+ var _a, _b;
82647
82640
  console.log('Making SoulZap Token Call');
82648
- const response = yield axios.post(SOUL_ZAP_API, {
82649
- '0': zapInputData,
82650
- });
82651
- return (_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.data;
82641
+ const response = yield axios.post(SOUL_ZAP_API, zapInputData);
82642
+ return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.data;
82652
82643
  });
82653
82644
  const { data: response, isLoading, error, } = useQuery({
82654
82645
  queryKey: [QUERY_KEYS.ZAP_TOKEN_QUOTE, queryKey],
@@ -83912,6 +83903,27 @@ const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account, tierProof
83912
83903
  chainName &&
83913
83904
  bondContractAddress &&
83914
83905
  (inputCurrency === 'NATIVE' || (inputCurrency === null || inputCurrency === void 0 ? void 0 : inputCurrency.address[chainId]) !== principalToken.address[chainId])) {
83906
+ if (principalToken.liquidityWrapper && principalToken.liquidityWrapper === types$1.Wrappers.Steer) {
83907
+ return {
83908
+ chain: chainName,
83909
+ recipient: account !== null && account !== void 0 ? account : '0x0000000000000000000000000000000000000000',
83910
+ user: account !== null && account !== void 0 ? account : '0x0000000000000000000000000000000000000000',
83911
+ lpData: {
83912
+ lpType: 'steer',
83913
+ fromToken: inputCurrencyString,
83914
+ fromAmount: bigishInputAmount,
83915
+ lpAddress: vault,
83916
+ periphery: '0xCEBF1A54A9Ce703FC80967760b5A6cbDb4111099',
83917
+ slippage,
83918
+ },
83919
+ protocolData: {
83920
+ protocol: 'ApeBond',
83921
+ bond: bondContractAddress,
83922
+ depositer: account !== null && account !== void 0 ? account : '0x0000000000000000000000000000000000000000',
83923
+ tierProofSignature: bond.billVersion === types$1.BillVersion.V4 && tierProofSig ? tierProofSig : undefined,
83924
+ },
83925
+ };
83926
+ }
83915
83927
  return {
83916
83928
  chain: chainName,
83917
83929
  recipient: account !== null && account !== void 0 ? account : '0x0000000000000000000000000000000000000000',
@@ -83969,11 +83981,9 @@ const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account, tierProof
83969
83981
  ];
83970
83982
  }, [zapInputData]);
83971
83983
  const fetchZapDetails = () => __awaiter$9(void 0, void 0, void 0, function* () {
83972
- var _a, _b, _c;
83973
- const response = yield axios.post(SOUL_ZAP_API, {
83974
- '0': zapInputData,
83975
- });
83976
- return (_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.data;
83984
+ var _a, _b;
83985
+ const response = yield axios.post(SOUL_ZAP_API, zapInputData);
83986
+ return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.data;
83977
83987
  });
83978
83988
  const { data: response, isLoading, isFetching, error, } = useQuery({
83979
83989
  queryKey: [QUERY_KEYS.ZAP_TOKEN_QUOTE, queryKey],
@@ -86181,7 +86191,7 @@ const BuyAgainRow = () => {
86181
86191
  }, children: [jsx$2(Flex, { sx: {
86182
86192
  p: '0 1px',
86183
86193
  width: '100%',
86184
- mt: '10px',
86194
+ my: '10px',
86185
86195
  background: 'primaryButton',
86186
86196
  borderRadius: 'normal',
86187
86197
  flexDirection: 'column',
@@ -86329,7 +86339,7 @@ const Bonds = () => {
86329
86339
  }
86330
86340
  /* eslint-disable react-hooks/exhaustive-deps */
86331
86341
  }, [(_a = Object.keys(tokenPrices !== null && tokenPrices !== void 0 ? tokenPrices : {})) === null || _a === void 0 ? void 0 : _a.length, bondData === null || bondData === void 0 ? void 0 : bondData.length, refetch]);
86332
- return (jsxs(Flex, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), SDKConfig.useHotBonds && !SDKConfig.bondPartner && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' || filterOption !== 'ALL', showSolSkeleton: chainFilterOption.includes('All Chains') || chainFilterOption.includes(types$1.ChainId.SOL.toString()) })) : searchQuery || !chainFilterOption.includes('All Chains') ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex, { sx: {
86342
+ return (jsxs(Flex, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), SDKConfig.useHotBonds && !SDKConfig.bondPartner && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' || filterOption !== 'ALL', showSolSkeleton: chainFilterOption.includes('All Chains') || chainFilterOption.includes(types$1.ChainId.SOL.toString()) })) : searchQuery || !chainFilterOption.includes('All Chains') ? (jsx$2(Flex, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' }) })) : filterOption === 'FAVORITES' ? (jsxs(Flex, { sx: {
86333
86343
  width: '100%',
86334
86344
  height: '300px',
86335
86345
  background: 'white2',
@@ -103772,7 +103782,7 @@ const SingleBond = ({ tokenSymbol }) => {
103772
103782
  borderRadius: 'normal',
103773
103783
  p: '0 20px 20px 20px',
103774
103784
  mx: '10px',
103775
- }, children: activeBond ? (jsx$2(BuyComponent, { bondAddress: bondAddress, bondChain: bondChain })) : soldOutBond && isFetched ? (jsx$2(SoldOutBuyBondPlaceholder, { bond: soldOutBond })) : isFetched ? (jsx$2(Flex, { sx: { justifyContent: 'center', width: '100%', pt: '20px' }, children: "No bond" })) : (jsx$2(Flex, { className: "yourbonds-spinner", children: jsx$2(Spinner, { size: 100 }) })) })) : (jsx$2(YourBonds, { showOnly: tokenSymbol === null || tokenSymbol === void 0 ? void 0 : tokenSymbol[0] }))] }) }));
103785
+ }, children: activeBond ? (jsx$2(BuyComponent, { bondAddress: bondAddress, bondChain: bondChain })) : soldOutBond && isFetched ? (jsx$2(SoldOutBuyBondPlaceholder, { bond: soldOutBond })) : isFetched ? (jsx$2(Flex, { sx: { justifyContent: 'center', width: '100%', pt: '20px' }, children: "No bond" })) : (jsx$2(Flex, { className: "placeholder-monkey-wrapper", children: jsx$2(Spinner, { size: 100 }) })) })) : (jsx$2(YourBonds, { showOnly: tokenSymbol === null || tokenSymbol === void 0 ? void 0 : tokenSymbol[0] }))] }) }));
103776
103786
  };
103777
103787
 
103778
103788
  const SingleBondWithProviders = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { QueryClient, UseQueryResult } from '@tanstack/react-query';
2
2
  import { BillsConfig } from '@ape.swap/apeswap-lists';
3
3
  import { UserBill } from '../../types/yourbonds';
4
- export default function useUserBonds(dontFetch?: boolean): UseQueryResult<UserBill[]>;
4
+ export default function useUserBonds(): UseQueryResult<UserBill[]>;
5
5
  export declare const getUserBonds: (account: string, solanaAccount: string, bondList: BillsConfig[], queryClient: QueryClient) => Promise<UserBill[]>;
package/dist/styles.css CHANGED
@@ -1086,7 +1086,7 @@ html {
1086
1086
  }
1087
1087
  }
1088
1088
 
1089
- .yourbonds-spinner {
1089
+ .placeholder-monkey-wrapper {
1090
1090
  width: 100%;
1091
1091
  flex-direction: column;
1092
1092
  padding-top: 100px;
@@ -1095,6 +1095,8 @@ html {
1095
1095
  align-items: center;
1096
1096
  border-radius: 10px;
1097
1097
  margin-top: 15px;
1098
+ justify-content: center;
1099
+ height: 400px;
1098
1100
  }
1099
1101
 
1100
1102
  .yourbonds.table-container {
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": "4.1.0-test.14",
6
+ "version": "4.1.0-test.16",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",