@ape.swap/bonds-sdk 1.0.548 → 1.0.550

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.
@@ -66,7 +66,6 @@ import { fetchUserOwnedBillsDataAsync } from './fetchBillsUser';
66
66
  import { Input } from '../../components/uikit-sdk/Input';
67
67
  import { YourBondsModal } from "../../index";
68
68
  import BOND_ABI from '../../config/abi/bond.json';
69
- import { ethers } from 'ethers';
70
69
  var YourBonds = function (_a) {
71
70
  //const toastError = useToastError()
72
71
  // const { onClaimBill } = useClaimBill(billAddress, billIds)
@@ -87,33 +86,30 @@ var YourBonds = function (_a) {
87
86
  // setPendingTrx(false);
88
87
  // };
89
88
  var handleClaim = function (billId, billAddress) { return __awaiter(void 0, void 0, void 0, function () {
90
- var tokenAddress, uint256BillId, tx, error_1;
89
+ var tx, error_1;
91
90
  return __generator(this, function (_a) {
92
91
  switch (_a.label) {
93
92
  case 0:
94
- tokenAddress = bondData[0].billAddress;
95
- _a.label = 1;
96
- case 1:
97
- _a.trys.push([1, 3, , 4]);
98
- uint256BillId = ethers.BigNumber.from(billId);
93
+ _a.trys.push([0, 2, , 3]);
94
+ //const uint256BillId = ethers.BigNumber.from(billId);
99
95
  console.log('claimClicked');
100
- console.log('billId:', uint256BillId);
96
+ // console.log('billId:', uint256BillId);
101
97
  console.log('billAddress:', billAddress);
102
98
  return [4 /*yield*/, writeContract({
103
99
  address: billAddress,
104
100
  abi: BOND_ABI,
105
101
  functionName: 'redeem',
106
- args: [uint256BillId],
102
+ args: [billId],
107
103
  })];
108
- case 2:
104
+ case 1:
109
105
  tx = _a.sent();
110
106
  console.log('Transaction:', tx);
111
- return [3 /*break*/, 4];
112
- case 3:
107
+ return [3 /*break*/, 3];
108
+ case 2:
113
109
  error_1 = _a.sent();
114
110
  console.error('Approval failed:', error_1);
115
- return [3 /*break*/, 4];
116
- case 4: return [2 /*return*/];
111
+ return [3 /*break*/, 3];
112
+ case 3: return [2 /*return*/];
117
113
  }
118
114
  });
119
115
  }); };
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.548",
6
+ "version": "1.0.550",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",