@ape.swap/bonds-sdk 3.0.89-test.0 → 3.0.89-test.1

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
@@ -73615,6 +73615,7 @@ const PreTgeUserRow = ({ userBond }) => {
73615
73615
  const YourBonds = ({ showOnly }) => {
73616
73616
  useTokenPrices();
73617
73617
  // Hooks
73618
+ const SDKConfig = useSDKConfig();
73618
73619
  const { address: account } = useAccount();
73619
73620
  const { data: userBonds, isFetched: userBondsFetched } = useUserBonds();
73620
73621
  const { data: chainFilterOption, setChainFilterOption } = useChainFilterOption();
@@ -73640,6 +73641,16 @@ const YourBonds = ({ showOnly }) => {
73640
73641
  return [];
73641
73642
  let bondsToReturn = userBonds;
73642
73643
  // Handle Filtering //
73644
+ bondsToReturn = bondsToReturn === null || bondsToReturn === void 0 ? void 0 : bondsToReturn.filter((bond) => {
73645
+ var _a;
73646
+ return ((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.onlyPartner) ? bond.bond.bondPartner === SDKConfig.bondPartner : true;
73647
+ });
73648
+ if (SDKConfig.bondPartner) {
73649
+ bondsToReturn = bondsToReturn === null || bondsToReturn === void 0 ? void 0 : bondsToReturn.filter((bond) => {
73650
+ var _a;
73651
+ return ((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.bondPartner) === SDKConfig.bondPartner;
73652
+ });
73653
+ }
73643
73654
  // Filter Single Token View
73644
73655
  if (showOnly) {
73645
73656
  bondsToReturn = bondsToReturn === null || bondsToReturn === void 0 ? void 0 : bondsToReturn.filter((bond) => {
@@ -73711,11 +73722,11 @@ const YourBonds = ({ showOnly }) => {
73711
73722
  return 0;
73712
73723
  });
73713
73724
  return bondsToReturn;
73714
- }, [userBonds, showOnly, inputValue, chainFilterOption, filterOption, sortConfig]);
73725
+ }, [userBonds, showOnly, inputValue, chainFilterOption, filterOption, sortConfig, SDKConfig.bondPartner]);
73715
73726
  const handleFilterOption = useCallback((newOption) => {
73716
73727
  setFilterOption(newOption);
73717
73728
  }, []);
73718
- 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 ? (jsx$2(PlaceholderMonkey, { text: 'You are not connected.' })) : (bondsToRender && (bondsToRender === null || bondsToRender === void 0 ? void 0 : bondsToRender.length) > 0) || (preTGEBondsToRender && preTGEBondsToRender.length > 0) ? (jsxs(Fragment$1, { children: [preTGEBondsToRender === null || preTGEBondsToRender === void 0 ? void 0 : preTGEBondsToRender.map((userBond, index) => jsx$2(PreTgeUserRow, { userBond: userBond }, index)), bondsToRender === null || bondsToRender === void 0 ? void 0 : bondsToRender.map((bill, index) => jsx$2(UserBondRow, { bill: bill }, `${bill.id}-${index}`))] })) : 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 Bonds.' })) : (jsx$2(Flex$1, { className: "yourbonds-spinner", children: jsx$2(Spinner, { size: 100 }) }))] }));
73729
+ 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 ? (jsx$2(PlaceholderMonkey, { text: 'You are not connected.' })) : (bondsToRender && (bondsToRender === null || bondsToRender === void 0 ? void 0 : bondsToRender.length) > 0) || (preTGEBondsToRender && preTGEBondsToRender.length > 0) ? (jsxs(Fragment$1, { children: [preTGEBondsToRender === null || preTGEBondsToRender === void 0 ? void 0 : preTGEBondsToRender.map((userBond, index) => jsx$2(PreTgeUserRow, { userBond: userBond }, index)), bondsToRender === null || bondsToRender === void 0 ? void 0 : bondsToRender.map((bill, index) => jsx$2(UserBondRow, { bill: bill }, `${bill.id}-${index}`))] })) : inputValue !== '' || !chainFilterOption.includes('All Chains') ? (jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' })) : userBondsFetched && (bondsToRender === null || bondsToRender === void 0 ? void 0 : bondsToRender.length) === 0 ? (jsx$2(PlaceholderMonkey, { text: 'You do not own any Bonds.' })) : (jsx$2(Flex$1, { className: "yourbonds-spinner", children: jsx$2(Spinner, { size: 100 }) }))] }));
73719
73730
  };
73720
73731
 
73721
73732
  // This basically returns the 2 tags with the higher active bond count
@@ -80471,7 +80482,7 @@ const Bonds = () => {
80471
80482
  const handleChangeFilterOption = useCallback((newOption) => {
80472
80483
  setFilterOption(newOption);
80473
80484
  }, []);
80474
- return (jsxs(Flex$1, { 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 && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
80485
+ return (jsxs(Flex$1, { 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 !== '' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
80475
80486
  width: '100%',
80476
80487
  height: '300px',
80477
80488
  background: 'white2',
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { SDKProps } from '../../state/useSDKConfig';
3
- declare const BondsWithProviders: React.FC<SDKProps>;
2
+ import { SDKPropsDTO } from '../../state/useSDKConfig';
3
+ declare const BondsWithProviders: React.FC<SDKPropsDTO>;
4
4
  export default BondsWithProviders;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { SDKProps } from '../../state/useSDKConfig';
3
- declare const FullBondsViewWithProviders: React.FC<SDKProps>;
2
+ import { SDKPropsDTO } from '../../state/useSDKConfig';
3
+ declare const FullBondsViewWithProviders: React.FC<SDKPropsDTO>;
4
4
  export default FullBondsViewWithProviders;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { SDKProps } from '../../state/useSDKConfig';
2
+ import { SDKPropsDTO } from '../../state/useSDKConfig';
3
3
  import { ProjectViewProps } from './ProjectView';
4
- interface Props extends SDKProps, ProjectViewProps {
4
+ interface Props extends SDKPropsDTO, ProjectViewProps {
5
5
  }
6
6
  declare const ProjectViewWithProviders: React.FC<Props>;
7
7
  export default ProjectViewWithProviders;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { SDKProps } from '../../state/useSDKConfig';
2
+ import { SDKPropsDTO } from '../../state/useSDKConfig';
3
3
  import { SingleBondProps } from './SingleBond';
4
- interface Props extends SDKProps, SingleBondProps {
4
+ interface Props extends SDKPropsDTO, SingleBondProps {
5
5
  }
6
6
  declare const SingleBondWithProviders: React.FC<Props>;
7
7
  export default SingleBondWithProviders;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { SDKProps } from '../../state/useSDKConfig';
3
- declare const YourBondsWithProviders: React.FC<SDKProps>;
2
+ import { SDKPropsDTO } from '../../state/useSDKConfig';
3
+ declare const YourBondsWithProviders: React.FC<SDKPropsDTO>;
4
4
  export default YourBondsWithProviders;
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.89-test.0",
6
+ "version": "3.0.89-test.1",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",