import { __awaiter, __extends, __generator } from "tslib";
import { QueryBase } from "./baseQuery";
var CustomGasTokenQueries = /** @class */ (function (_super) {
    __extends(CustomGasTokenQueries, _super);
    function CustomGasTokenQueries(args) {
        var _this = _super.apply(this, args.queryBaseArgs) || this;
        _this.customGasTokenSymbol = args.customGasTokenSymbol;
        return _this;
    }
    CustomGasTokenQueries.prototype.getTokenPrice = function (tokenSymbol) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, customGasTokenPrice, tokenPrice;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0: return [4 /*yield*/, Promise.all([
                            _super.prototype.getTokenPrice.call(this, this.customGasTokenSymbol),
                            _super.prototype.getTokenPrice.call(this, tokenSymbol),
                        ])];
                    case 1:
                        _a = _b.sent(), customGasTokenPrice = _a[0], tokenPrice = _a[1];
                        return [2 /*return*/, Number((tokenPrice / customGasTokenPrice).toFixed(this.symbolMapping[this.customGasTokenSymbol].decimals))];
                }
            });
        });
    };
    return CustomGasTokenQueries;
}(QueryBase));
export { CustomGasTokenQueries };
//# sourceMappingURL=customGasToken.js.map