@ape.swap/bonds-sdk 1.0.560 → 1.0.561
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.
|
@@ -106,7 +106,7 @@ var BondModal = function (_a) {
|
|
|
106
106
|
}); };
|
|
107
107
|
//You approve the token, not the contract (this code will have to be updated for zap)
|
|
108
108
|
var handleApprove = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
109
|
-
var tokenAddress, tx, error_2;
|
|
109
|
+
var tokenAddress, amount, tx, error_2;
|
|
110
110
|
return __generator(this, function (_a) {
|
|
111
111
|
switch (_a.label) {
|
|
112
112
|
case 0:
|
|
@@ -115,11 +115,13 @@ var BondModal = function (_a) {
|
|
|
115
115
|
case 1:
|
|
116
116
|
_a.trys.push([1, 3, , 4]);
|
|
117
117
|
console.log(adjustDecimals(inputValue));
|
|
118
|
+
amount = ethers.BigNumber.from(inputValue);
|
|
119
|
+
console.log('Amount:', amount);
|
|
118
120
|
return [4 /*yield*/, writeContract({
|
|
119
121
|
address: tokenAddress,
|
|
120
122
|
abi: ERC_20_ABI,
|
|
121
123
|
functionName: 'approve',
|
|
122
|
-
args: [account,
|
|
124
|
+
args: [account, amount],
|
|
123
125
|
})];
|
|
124
126
|
case 2:
|
|
125
127
|
tx = _a.sent();
|