@ape.swap/bonds-sdk 1.0.467 → 1.0.468

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.
@@ -7,9 +7,7 @@ declare global {
7
7
  }
8
8
  }
9
9
  interface YourBondsProps {
10
- account: string;
11
- accountChainId: number;
12
- isActive: boolean;
10
+ connectionString?: string;
13
11
  }
14
12
  declare const YourBonds: React.FC<YourBondsProps>;
15
13
  export default YourBonds;
@@ -77,9 +77,9 @@ import axios from 'axios';
77
77
  import { fetchUserOwnedBillsDataAsync } from './fetchBillsUser';
78
78
  import { Input } from '../../components/uikit-sdk/Input';
79
79
  var YourBonds = function (_a) {
80
- var account = _a.account, isActive = _a.isActive, accountChainId = _a.accountChainId;
81
- //const { account, isActive } = useWeb3React();
82
- var _b = useSearchParams(), searchParams = _b[0], setSearchParams = _b[1];
80
+ var connectionString = _a.connectionString;
81
+ var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
82
+ var _c = useSearchParams(), searchParams = _c[0], setSearchParams = _c[1];
83
83
  var navigate = useNavigate();
84
84
  var USDT_ABI = [
85
85
  // The ERC-20 approve function ABI
@@ -121,8 +121,8 @@ var YourBonds = function (_a) {
121
121
  });
122
122
  }); };
123
123
  // Fetch data
124
- var _c = useState([]), bondData = _c[0], setBondData = _c[1];
125
- var _d = useState([]), mappedUserBills = _d[0], setMappedUserBills = _d[1];
124
+ var _d = useState([]), bondData = _d[0], setBondData = _d[1];
125
+ var _e = useState([]), mappedUserBills = _e[0], setMappedUserBills = _e[1];
126
126
  useEffect(function () {
127
127
  axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
128
128
  var bonds = response.data.bonds;
@@ -155,8 +155,8 @@ var YourBonds = function (_a) {
155
155
  }); };
156
156
  fetchData();
157
157
  }, [account]);
158
- var _e = useState(null), sortConfig = _e[0], setSortConfig = _e[1];
159
- var _f = useState(mappedUserBills), sortedBonds = _f[0], setSortedBonds = _f[1];
158
+ var _f = useState(null), sortConfig = _f[0], setSortConfig = _f[1];
159
+ var _g = useState(mappedUserBills), sortedBonds = _g[0], setSortedBonds = _g[1];
160
160
  var handleSort = function (key) {
161
161
  var direction = 'asc';
162
162
  if ((sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.key) === key && (sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.direction) === 'asc') {
@@ -237,16 +237,16 @@ var YourBonds = function (_a) {
237
237
  return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
238
238
  };
239
239
  // Modal
240
- var _g = useState(false), isModalOpen = _g[0], setIsModalOpen = _g[1];
241
- var _h = useState(null), selectedBill = _h[0], setSelectedBill = _h[1];
240
+ var _h = useState(false), isModalOpen = _h[0], setIsModalOpen = _h[1];
241
+ var _j = useState(null), selectedBill = _j[0], setSelectedBill = _j[1];
242
242
  var rowClick = function (bill) {
243
243
  setSelectedBill(bill);
244
244
  setIsModalOpen(true);
245
245
  navigate("/YourBonds/?bondAddress=".concat(bill.address, "&bondChain=").concat(bill.bond.chainId), { replace: true });
246
246
  };
247
247
  // Search logic
248
- var _j = useState(''), inputValue = _j[0], setInputValue = _j[1];
249
- var _k = useState(sortedBonds), filteredBonds = _k[0], setFilteredBonds = _k[1];
248
+ var _k = useState(''), inputValue = _k[0], setInputValue = _k[1];
249
+ var _l = useState(sortedBonds), filteredBonds = _l[0], setFilteredBonds = _l[1];
250
250
  useEffect(function () {
251
251
  if (inputValue === '') {
252
252
  setFilteredBonds(sortedBonds);
@@ -261,7 +261,7 @@ var YourBonds = function (_a) {
261
261
  setInputValue(event.target.value);
262
262
  };
263
263
  // Page render logic
264
- var _l = useState(false), bondsRendered = _l[0], setBondsRendered = _l[1];
264
+ var _m = useState(false), bondsRendered = _m[0], setBondsRendered = _m[1];
265
265
  useEffect(function () {
266
266
  if (filteredBonds.length > 0) {
267
267
  setBondsRendered(true);
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.467",
6
+ "version": "1.0.468",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",