@ape.swap/bonds-sdk 1.0.506 → 1.0.507

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.
@@ -188,16 +188,16 @@ var BondModal = function (_a) {
188
188
  }
189
189
  }, [isActive, account, bondData]);
190
190
  var getTokenBalance = function (chainId, tokenAddress, walletAddress) { return __awaiter(void 0, void 0, void 0, function () {
191
- var provider, contract, balance, balanceInEther, error_3;
191
+ var contract, balance, balanceInEther, error_3;
192
192
  return __generator(this, function (_a) {
193
193
  switch (_a.label) {
194
194
  case 0:
195
195
  _a.trys.push([0, 2, , 3]);
196
- provider = RPC_PROVIDERS[chainId];
197
- if (!provider) {
196
+ //const provider = RPC_PROVIDERS[chainId];
197
+ if (!RPC_PROVIDERS[chainId]) {
198
198
  throw new Error("No provider found for chainId: ".concat(chainId));
199
199
  }
200
- contract = new ethers.Contract(tokenAddress, ERC_20_ABI, provider);
200
+ contract = new ethers.Contract(tokenAddress, ERC_20_ABI, RPC_PROVIDERS[chainId]);
201
201
  return [4 /*yield*/, contract.balanceOf(walletAddress)];
202
202
  case 1:
203
203
  balance = _a.sent();
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.506",
6
+ "version": "1.0.507",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",