@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
|
|
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 (!
|
|
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,
|
|
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();
|