"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AminoConverter = void 0;
var _oracle = require("../../oracle/v1beta1/oracle");
var _helpers = require("../../../helpers");
var AminoConverter = {
  "/injective.insurance.v1beta1.MsgCreateInsuranceFund": {
    aminoType: "/injective.insurance.v1beta1.MsgCreateInsuranceFund",
    toAmino: function toAmino(_ref) {
      var sender = _ref.sender,
        ticker = _ref.ticker,
        quoteDenom = _ref.quoteDenom,
        oracleBase = _ref.oracleBase,
        oracleQuote = _ref.oracleQuote,
        oracleType = _ref.oracleType,
        expiry = _ref.expiry,
        initialDeposit = _ref.initialDeposit;
      return {
        sender: sender,
        ticker: ticker,
        quote_denom: quoteDenom,
        oracle_base: oracleBase,
        oracle_quote: oracleQuote,
        oracle_type: oracleType,
        expiry: expiry.toString(),
        initial_deposit: {
          denom: initialDeposit.denom,
          amount: _helpers.Long.fromValue(initialDeposit.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref2) {
      var sender = _ref2.sender,
        ticker = _ref2.ticker,
        quote_denom = _ref2.quote_denom,
        oracle_base = _ref2.oracle_base,
        oracle_quote = _ref2.oracle_quote,
        oracle_type = _ref2.oracle_type,
        expiry = _ref2.expiry,
        initial_deposit = _ref2.initial_deposit;
      return {
        sender: sender,
        ticker: ticker,
        quoteDenom: quote_denom,
        oracleBase: oracle_base,
        oracleQuote: oracle_quote,
        oracleType: (0, _oracle.oracleTypeFromJSON)(oracle_type),
        expiry: _helpers.Long.fromString(expiry),
        initialDeposit: {
          denom: initial_deposit.denom,
          amount: initial_deposit.amount
        }
      };
    }
  },
  "/injective.insurance.v1beta1.MsgUnderwrite": {
    aminoType: "/injective.insurance.v1beta1.MsgUnderwrite",
    toAmino: function toAmino(_ref3) {
      var sender = _ref3.sender,
        marketId = _ref3.marketId,
        deposit = _ref3.deposit;
      return {
        sender: sender,
        market_id: marketId,
        deposit: {
          denom: deposit.denom,
          amount: _helpers.Long.fromValue(deposit.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref4) {
      var sender = _ref4.sender,
        market_id = _ref4.market_id,
        deposit = _ref4.deposit;
      return {
        sender: sender,
        marketId: market_id,
        deposit: {
          denom: deposit.denom,
          amount: deposit.amount
        }
      };
    }
  },
  "/injective.insurance.v1beta1.MsgRequestRedemption": {
    aminoType: "/injective.insurance.v1beta1.MsgRequestRedemption",
    toAmino: function toAmino(_ref5) {
      var sender = _ref5.sender,
        marketId = _ref5.marketId,
        amount = _ref5.amount;
      return {
        sender: sender,
        market_id: marketId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref6) {
      var sender = _ref6.sender,
        market_id = _ref6.market_id,
        amount = _ref6.amount;
      return {
        sender: sender,
        marketId: market_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  }
};
exports.AminoConverter = AminoConverter;