@ape.swap/bonds-sdk 1.0.605 → 1.0.606

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.
@@ -54,7 +54,7 @@ import ERC_20_ABI from '../../../config/abi/erc20.json';
54
54
  import { NETWORK_ICONS } from '../../../config/constants/chains';
55
55
  import { formatUSDNumber, getPremiumColor, premium, youGet, youGetUSD, youSpend, youSpendUSD } from './helper';
56
56
  import '../../../scss/BondModal.scss';
57
- import { useWaitForTransactionReceipt, useWriteContract } from "wagmi";
57
+ import { useWriteContract } from "wagmi";
58
58
  import { PUBLIC_RPC_URLS } from "../../../config/constants/networks";
59
59
  var BondModal = function (_a) {
60
60
  var account = _a.account, isActive = _a.isActive, isOpen = _a.isOpen, accountChainId = _a.accountChainId, onClose = _a.onClose, bondAddress = _a.bondAddress;
@@ -114,7 +114,7 @@ var BondModal = function (_a) {
114
114
  var _d = useState(null), buyTx = _d[0], setBuyTx = _d[1];
115
115
  //You approve the token, not the contract (this code will have to be updated for zap)
116
116
  var handleApprove = function () { return __awaiter(void 0, void 0, void 0, function () {
117
- var tokenAddress, decimals, amount, tx, receipt, error_2;
117
+ var tokenAddress, decimals, amount, tx, error_2;
118
118
  return __generator(this, function (_a) {
119
119
  switch (_a.label) {
120
120
  case 0:
@@ -133,16 +133,16 @@ var BondModal = function (_a) {
133
133
  })];
134
134
  case 2:
135
135
  tx = _a.sent();
136
- receipt = useWaitForTransactionReceipt({
137
- confirmations: 4,
138
- hash: tx,
139
- pollingInterval: 1000
140
- });
141
- ;
142
- if (receipt.isSuccess) {
143
- setReceiptTx(receipt.data.transactionHash);
144
- console.log('Receipt:', receipt);
145
- }
136
+ // const receipt = useWaitForTransactionReceipt({
137
+ // confirmations: 4,
138
+ // hash: tx,
139
+ // pollingInterval: 1_000
140
+ // });
141
+ // console.log('Receipt',receipt);
142
+ // if(receipt.isSuccess) {
143
+ // setReceiptTx(receipt.data.transactionHash);
144
+ // console.log('Receipt:', receipt);
145
+ // }
146
146
  if (tx) {
147
147
  setApproveTx(tx);
148
148
  console.log('setApproveTx:', tx);
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.605",
6
+ "version": "1.0.606",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",