"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useUnderlying = void 0;
var common_1 = require("../common");
var useUnderlying = function (chain, vault) {
    var uDec = (0, common_1.useCallOnce)(vault === null || vault === void 0 ? void 0 : vault.underlyingDecimals).res;
    var uAddress = (0, common_1.useCallOnce)(vault === null || vault === void 0 ? void 0 : vault.underlying).res;
    var underlying = (0, common_1.useERC20)(chain, uAddress);
    var uSymbol = (0, common_1.useCallOnce)(underlying === null || underlying === void 0 ? void 0 : underlying.symbol).res;
    if (uSymbol === 'WETH')
        uSymbol = 'ETH';
    return { uAddress: uAddress, uSymbol: uSymbol, uDec: uDec, underlying: underlying };
};
exports.useUnderlying = useUnderlying;
//# sourceMappingURL=useUnderlying.js.map