@ape.swap/bonds-sdk 1.0.677 → 1.0.680

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,9 +1,10 @@
1
1
  import { BondsDataResponse } from '../../types/bonds';
2
2
  import '../../scss/BondRowsByChain.scss';
3
- declare const BondRowsByChain: ({ bonds, hotBonds, hideTitles, rowClick }: {
3
+ declare const BondRowsByChain: ({ bonds, hotBonds, hideTitles, rowClick, chains }: {
4
4
  bonds: BondsDataResponse[];
5
5
  hotBonds?: string[];
6
6
  hideTitles: boolean;
7
7
  rowClick: (bond: BondsDataResponse) => void;
8
+ chains?: number[];
8
9
  }) => import("react").JSX.Element;
9
10
  export default BondRowsByChain;
@@ -5,13 +5,16 @@ import { Flex } from '../uikit-sdk';
5
5
  import { MAINNET_CHAINS } from '../../config/constants/chains';
6
6
  import '../../scss/BondRowsByChain.scss';
7
7
  var BondRowsByChain = function (_a) {
8
- var bonds = _a.bonds, hotBonds = _a.hotBonds, hideTitles = _a.hideTitles, rowClick = _a.rowClick;
9
- return (_jsxs(Flex, { className: "bondrowsbychain", children: [[ChainId.MAINNET].map(function (chain, index) {
10
- return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
11
- }), [ChainId.BSC].map(function (chain, index) {
12
- return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
13
- }), (MAINNET_CHAINS.slice(2, MAINNET_CHAINS.length).map(function (chain, index) {
14
- return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
8
+ var bonds = _a.bonds, hotBonds = _a.hotBonds, hideTitles = _a.hideTitles, rowClick = _a.rowClick, chains = _a.chains;
9
+ return (_jsxs(Flex, { className: "bondrowsbychain", children: [!chains || chains.includes(ChainId.MAINNET) &&
10
+ [ChainId.MAINNET].map(function (chain, index) {
11
+ return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
12
+ }), !chains || chains.includes(ChainId.BSC) &&
13
+ [ChainId.BSC].map(function (chain, index) {
14
+ return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
15
+ }), (MAINNET_CHAINS.slice(2, MAINNET_CHAINS.length).map(function (chain, index) {
16
+ return (!chains || chains.includes(chain) &&
17
+ _jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
15
18
  }))] }));
16
19
  };
17
20
  export default BondRowsByChain;
@@ -11,6 +11,7 @@ interface BondsProps {
11
11
  accountChainId: number;
12
12
  isActive: boolean;
13
13
  bondAddress: string | null;
14
+ chains?: number[];
14
15
  }
15
16
  declare const Bonds: React.FC<BondsProps>;
16
17
  export default Bonds;
@@ -23,7 +23,7 @@ import BondRowsByChain from '../../components/BondRows/BondRowsByChain';
23
23
  import { useTopTags } from '../../hooks/useTopThreeTags';
24
24
  import useChainFilterOption from '../../components/BondMenu/useChainFilterOption';
25
25
  var Bonds = function (_a) {
26
- var account = _a.account, accountChainId = _a.accountChainId, isActive = _a.isActive;
26
+ var account = _a.account, accountChainId = _a.accountChainId, isActive = _a.isActive, chains = _a.chains;
27
27
  var navigate = useNavigate();
28
28
  // Fetch data
29
29
  var _b = useState([]), bondData = _b[0], setBondData = _b[1];
@@ -181,6 +181,6 @@ var Bonds = function (_a) {
181
181
  setBondsRendered(true);
182
182
  }
183
183
  }, [billstoRender]);
184
- return (_jsx(ThemeUIProvider, { theme: defaultTheme, children: _jsxs(Flex, { className: "container table-container", children: [_jsx(BondRowHeader, { inputValue: inputValue, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onInputChange: handleInputChange, onHandleQueryChange: setInputValue, onSort: handleSort }), bondsRendered && (_jsx(BondRowsByChain, { bonds: billstoRender, hotBonds: hotBonds, hideTitles: inputValue !== '', rowClick: rowClick }))] }) }));
184
+ return (_jsx(ThemeUIProvider, { theme: defaultTheme, children: _jsxs(Flex, { className: "container table-container", children: [_jsx(BondRowHeader, { inputValue: inputValue, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onInputChange: handleInputChange, onHandleQueryChange: setInputValue, onSort: handleSort }), bondsRendered && (_jsx(BondRowsByChain, { chains: chains, bonds: billstoRender, hotBonds: hotBonds, hideTitles: inputValue !== '', rowClick: rowClick }))] }) }));
185
185
  };
186
186
  export default Bonds;
@@ -261,12 +261,6 @@ var YourBonds = function (_a) {
261
261
  event.stopPropagation();
262
262
  // Add your claim logic here
263
263
  handleClaim(bill.id, bill.address);
264
- }, sx: {
265
- height: ['36px', '36px', '36px', '26px'],
266
- lineHeight: '12px',
267
- fontSize: '14px',
268
- fontWeight: 600,
269
- width: '100%',
270
264
  }, children: "Claim" }) })] })] }, bill.id));
271
265
  })] }))] }));
272
266
  };
@@ -130,17 +130,17 @@
130
130
  width: 100%;
131
131
  }
132
132
 
133
- // .claim-button {
134
- // height: 36px;
135
- // line-height: 12px;
136
- // font-size: 14px;
137
- // font-weight: 600;
138
- // width: 100%;
133
+ .claim-button {
134
+ height: 36px;
135
+ line-height: 12px;
136
+ font-size: 14px;
137
+ font-weight: 600;
138
+ width: 100%;
139
139
 
140
- // @media (min-width: 1024px) {
141
- // height: 26px;
142
- // }
143
- // }
140
+ @media (min-width: 1024px) {
141
+ height: 26px;
142
+ }
143
+ }
144
144
 
145
145
  .toast {
146
146
  position: fixed;
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": "1.0.677",
6
+ "version": "1.0.680",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",