@goodaofi/bonds-sdk 3.0.162 → 3.0.165

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.
@@ -3,4 +3,4 @@ export declare const supportedByLIFI: ChainId[];
3
3
  export declare const STRAPI_URL = "https://strapi-api.ape.bond";
4
4
  export declare const SOUL_ZAP_API = "https://zap-api.ape.bond/zap?batch=1";
5
5
  export declare const APEBOND = "https://ape.bond";
6
- export declare const APEBOND_REALTIME_API = "https://realtime-api-pr-99.herokuapp.com";
6
+ export declare const APEBOND_REALTIME_API = "https://realtime-api-pr-138.herokuapp.com";
package/dist/main.js CHANGED
@@ -74505,6 +74505,7 @@ const YourBonds = ({ showOnly, isGooSale }) => {
74505
74505
  const [inputValue, setInputValue] = useState('');
74506
74506
  const filterOptions = ['CLAIMABLE', 'ALL'];
74507
74507
  const [filterOption, setFilterOption] = useState(filterOptions[0]);
74508
+ const VESTING_NFT_ADDRESS = '0xD97197A4bC1db9e160023271B6C6de5B3325b7fd';
74508
74509
  const handleSort = (key) => {
74509
74510
  let direction = 'desc';
74510
74511
  if ((sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.key) === key && (sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.direction) === 'desc') {
@@ -74518,13 +74519,19 @@ const YourBonds = ({ showOnly, isGooSale }) => {
74518
74519
  let bondsToReturn = userBonds;
74519
74520
  // Handle Filtering //
74520
74521
  bondsToReturn = bondsToReturn === null || bondsToReturn === void 0 ? void 0 : bondsToReturn.filter((bond) => {
74521
- var _a;
74522
- return ((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.onlyPartner) ? bond.bond.bondPartner === SDKConfig.bondPartner : true;
74522
+ var _a, _b;
74523
+ const isVestingNft = ((_a = bond.address) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === VESTING_NFT_ADDRESS.toLowerCase();
74524
+ if (isVestingNft)
74525
+ return true;
74526
+ return ((_b = bond.bond) === null || _b === void 0 ? void 0 : _b.onlyPartner) ? bond.bond.bondPartner === SDKConfig.bondPartner : true;
74523
74527
  });
74524
74528
  if (SDKConfig.bondPartner) {
74525
74529
  bondsToReturn = bondsToReturn === null || bondsToReturn === void 0 ? void 0 : bondsToReturn.filter((bond) => {
74526
- var _a;
74527
- return ((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.bondPartner) === SDKConfig.bondPartner;
74530
+ var _a, _b;
74531
+ const isVestingNft = ((_a = bond.address) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === VESTING_NFT_ADDRESS.toLowerCase();
74532
+ if (isVestingNft)
74533
+ return true;
74534
+ return ((_b = bond.bond) === null || _b === void 0 ? void 0 : _b.bondPartner) === SDKConfig.bondPartner;
74528
74535
  });
74529
74536
  }
74530
74537
  // Filter Single Token View
@@ -74602,7 +74609,7 @@ const YourBonds = ({ showOnly, isGooSale }) => {
74602
74609
  const handleFilterOption = useCallback((newOption) => {
74603
74610
  setFilterOption(newOption);
74604
74611
  }, []);
74605
- 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, isGooSale: true }, 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 }) }))] }));
74612
+ 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, isGooSale: true }, index))), bondsToRender === null || bondsToRender === void 0 ? void 0 : bondsToRender.map((bill, index) => (jsx$2(UserBondRow, { bill: bill }, `${bill.id}-${index}`)))] })) : 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 }) }))] }));
74606
74613
  };
74607
74614
 
74608
74615
  // This basically returns the 2 tags with the higher active bond count
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Goo Money Bond SDK",
4
4
  "author": "Goo Money",
5
5
  "license": "MIT",
6
- "version": "3.0.162",
6
+ "version": "3.0.165",
7
7
  "proxy": "https://realtime-api-pr-99.herokuapp.com",
8
8
  "module": "dist/main.js",
9
9
  "type": "module",