@ape.swap/bonds-sdk 1.0.510 → 1.0.512
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.
|
@@ -187,10 +187,11 @@ var BondModal = function (_a) {
|
|
|
187
187
|
}
|
|
188
188
|
}, [isActive, account, bondData]);
|
|
189
189
|
var getTokenBalance = function (chainId, tokenAddress, walletAddress) { return __awaiter(void 0, void 0, void 0, function () {
|
|
190
|
+
var provider;
|
|
190
191
|
return __generator(this, function (_a) {
|
|
191
192
|
try {
|
|
192
|
-
|
|
193
|
-
//
|
|
193
|
+
provider = new ethers.providers.JsonRpcProvider("https://bsc-dataseed.binance.org/");
|
|
194
|
+
// const provider = getProvider(56, true)
|
|
194
195
|
//
|
|
195
196
|
// // const provider = RPC_PROVIDERS[chainId];
|
|
196
197
|
// if (!provider) {
|
|
@@ -201,6 +202,7 @@ var BondModal = function (_a) {
|
|
|
201
202
|
// const balanceInEther = ethers.utils.formatUnits(balance, 18); // Assuming the token has 18 decimals
|
|
202
203
|
// console.log(`Token Balance: ${balanceInEther}`);
|
|
203
204
|
// return balanceInEther;
|
|
205
|
+
return [2 /*return*/, "4"];
|
|
204
206
|
}
|
|
205
207
|
catch (error) {
|
|
206
208
|
console.error('Error fetching token balance', error);
|