@ape.swap/bonds-sdk 1.0.546 → 1.0.548
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,6 +66,7 @@ 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';
|
|
69
70
|
var YourBonds = function (_a) {
|
|
70
71
|
//const toastError = useToastError()
|
|
71
72
|
// const { onClaimBill } = useClaimBill(billAddress, billIds)
|
|
@@ -86,7 +87,7 @@ var YourBonds = function (_a) {
|
|
|
86
87
|
// setPendingTrx(false);
|
|
87
88
|
// };
|
|
88
89
|
var handleClaim = function (billId, billAddress) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
-
var tokenAddress, tx, error_1;
|
|
90
|
+
var tokenAddress, uint256BillId, tx, error_1;
|
|
90
91
|
return __generator(this, function (_a) {
|
|
91
92
|
switch (_a.label) {
|
|
92
93
|
case 0:
|
|
@@ -94,14 +95,15 @@ var YourBonds = function (_a) {
|
|
|
94
95
|
_a.label = 1;
|
|
95
96
|
case 1:
|
|
96
97
|
_a.trys.push([1, 3, , 4]);
|
|
98
|
+
uint256BillId = ethers.BigNumber.from(billId);
|
|
97
99
|
console.log('claimClicked');
|
|
98
|
-
console.log('billId:',
|
|
100
|
+
console.log('billId:', uint256BillId);
|
|
99
101
|
console.log('billAddress:', billAddress);
|
|
100
102
|
return [4 /*yield*/, writeContract({
|
|
101
103
|
address: billAddress,
|
|
102
104
|
abi: BOND_ABI,
|
|
103
105
|
functionName: 'redeem',
|
|
104
|
-
args: [
|
|
106
|
+
args: [uint256BillId],
|
|
105
107
|
})];
|
|
106
108
|
case 2:
|
|
107
109
|
tx = _a.sent();
|