@ape.swap/bonds-sdk 1.0.509 → 1.0.511
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.
|
@@ -56,6 +56,7 @@ import { NETWORK_ICONS } from '../../../config/constants/chains';
|
|
|
56
56
|
import { formatUSDNumber, getPremiumColor, premium, youGet, youGetUSD, youSpend, youSpendUSD } from './helper';
|
|
57
57
|
import '../../../scss/BondModal.scss';
|
|
58
58
|
import { useWriteContract } from "wagmi";
|
|
59
|
+
import { getProvider } from '../../../config/constants/providers';
|
|
59
60
|
var BondModal = function (_a) {
|
|
60
61
|
var account = _a.account, accountChainId = _a.accountChainId, isActive = _a.isActive, isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
|
|
61
62
|
if (!isOpen)
|
|
@@ -187,10 +188,11 @@ var BondModal = function (_a) {
|
|
|
187
188
|
}
|
|
188
189
|
}, [isActive, account, bondData]);
|
|
189
190
|
var getTokenBalance = function (chainId, tokenAddress, walletAddress) { return __awaiter(void 0, void 0, void 0, function () {
|
|
191
|
+
var provider;
|
|
190
192
|
return __generator(this, function (_a) {
|
|
191
193
|
try {
|
|
192
194
|
return [2 /*return*/, "4"];
|
|
193
|
-
|
|
195
|
+
provider = getProvider(56, true);
|
|
194
196
|
//
|
|
195
197
|
// // const provider = RPC_PROVIDERS[chainId];
|
|
196
198
|
// if (!provider) {
|