import { ChainGetter , CosmosMsgOpts , CosmwasmMsgOpts , SecretMsgOpts , } from "@keplr-wallet/stores" ; import { ObservableQueryBalances } from "@keplr-wallet/stores/build/query/balances" ; import { useFeeConfig , useMemoConfig , useRecipientConfig } from "./index" ; import { useSendGasConfig } from "./send-gas" ; import { useAmountConfig } from "./amount" ; type MsgOpts = CosmosMsgOpts & SecretMsgOpts & CosmwasmMsgOpts ; export const useSendTxConfig = ( chainGetter , chainId , sendMsgOpts , sender , queryBalances , ensEndpoint ? ) => { const amountConfig = useAmountConfig ( chainGetter , chainId , sender , queryBalances ) ; const memoConfig = useMemoConfig ( chainGetter , chainId ) ; const gasConfig = useSendGasConfig ( chainGetter , chainId , amountConfig , sendMsgOpts ) ; const feeConfig = useFeeConfig ( chainGetter , chainId , sender , queryBalances , amountConfig , gasConfig ) ; amountConfig . setFeeConfig ( feeConfig ) ; const recipientConfig = useRecipientConfig ( chainGetter , chainId , ensEndpoint ) ; return { amountConfig , memoConfig , gasConfig , feeConfig , recipientConfig , } ; } ;