@ape.swap/bonds-sdk 1.0.706 → 1.0.708

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.
@@ -15,6 +15,6 @@ var BondRowsWithTitle = function (_a) {
15
15
  overflow: 'hidden',
16
16
  width: '100%',
17
17
  marginTop: '0px',
18
- }, children: billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map(function (bill) { return (_jsx(BondRow, { bond: bill, hotBonds: hotBonds, rowClick: rowClick }, bill.billAddress)); }) }, key))] }) }, key));
18
+ }, children: billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map(function (bill) { return (_jsx(Flex, { className: "bondrow-container", children: _jsx(BondRow, { bond: bill, hotBonds: hotBonds, rowClick: rowClick }, bill.billAddress) })); }) }, key))] }) }, key));
19
19
  };
20
20
  export default BondRowsWithTitle;
@@ -155,8 +155,8 @@ var BondModal = function (_a) {
155
155
  useEffect(function () {
156
156
  if (isActive && account && bondData.length > 0) {
157
157
  getTokenBalance(chainId, bondData[0].lpToken.address[chainId], account).then(function (_a) {
158
- var balanceInEther = _a.balanceInEther, decimals = _a.decimals;
159
- setTokenBalance(balanceInEther);
158
+ var roundedBalance = _a.roundedBalance, decimals = _a.decimals;
159
+ setTokenBalance(roundedBalance);
160
160
  setTokenDecimals(decimals);
161
161
  }).catch(function (error) {
162
162
  console.error('Error fetching token balance', error);
@@ -164,7 +164,7 @@ var BondModal = function (_a) {
164
164
  }
165
165
  }, [isActive, account, bondData]);
166
166
  var getTokenBalance = function (chainId, tokenAddress, walletAddress) { return __awaiter(void 0, void 0, void 0, function () {
167
- var urls, provider, contract, decimals, balance, balanceInEther, error_3;
167
+ var urls, provider, contract, decimals, balance, balanceInEther, roundedBalance, error_3;
168
168
  return __generator(this, function (_a) {
169
169
  switch (_a.label) {
170
170
  case 0:
@@ -182,14 +182,12 @@ var BondModal = function (_a) {
182
182
  case 2:
183
183
  balance = _a.sent();
184
184
  balanceInEther = ethers.utils.formatUnits(balance, decimals);
185
- console.log('balanceInEther', balanceInEther);
186
- console.log('decimals', decimals);
187
- console.log('roundedBalance', Number(balanceInEther).toFixed(4).toString());
188
- return [2 /*return*/, { balanceInEther: balanceInEther, decimals: decimals }];
185
+ roundedBalance = Number(balanceInEther).toFixed(4).toString();
186
+ return [2 /*return*/, { roundedBalance: roundedBalance, decimals: decimals }];
189
187
  case 3:
190
188
  error_3 = _a.sent();
191
189
  console.error('Error fetching token balance', error_3);
192
- return [2 /*return*/, { balanceInEther: '0', decimals: 0 }];
190
+ return [2 /*return*/, { roundedBalance: '0', decimals: 0 }];
193
191
  case 4: return [2 /*return*/];
194
192
  }
195
193
  });
@@ -361,6 +361,7 @@
361
361
 
362
362
  .get.action-button {
363
363
  width: 275px;
364
+ margin-right: 10px;
364
365
  }
365
366
 
366
367
  .button-container.buy {
@@ -370,6 +371,7 @@
370
371
 
371
372
  .buy.action-button {
372
373
  width: 375px;
374
+ margin-left: 10px;
373
375
  }
374
376
 
375
377
  .toast {
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.706",
6
+ "version": "1.0.708",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",