diff --git a/packages/launchpad/src/cosmosclient.spec.ts b/packages/launchpad/src/cosmosclient.spec.ts index 4a17c340..768b27b6 100644 --- a/packages/launchpad/src/cosmosclient.spec.ts +++ b/packages/launchpad/src/cosmosclient.spec.ts @@ -4,6 +4,7 @@ import { ReadonlyDate } from "readonly-date"; import { assertIsBroadcastTxSuccess, CosmosClient, PrivateCosmosClient } from "./cosmosclient"; import { makeSignDoc } from "./encoding"; +import { StdFee } from "./fee"; import { findAttribute } from "./logs"; import { MsgSend } from "./msgs"; import { Secp256k1HdWallet } from "./secp256k1hdwallet"; @@ -17,7 +18,6 @@ import { unused, } from "./testutils.spec"; import { isWrappedStdTx, makeStdTx } from "./tx"; -import { StdFee } from "./types"; const blockTime = 1_000; // ms diff --git a/packages/launchpad/src/encoding.ts b/packages/launchpad/src/encoding.ts index 6ce92d42..5d7b457d 100644 --- a/packages/launchpad/src/encoding.ts +++ b/packages/launchpad/src/encoding.ts @@ -2,8 +2,8 @@ import { toUtf8 } from "@cosmjs/encoding"; import { Uint53 } from "@cosmjs/math"; +import { StdFee } from "./fee"; import { Msg } from "./msgs"; -import { StdFee } from "./types"; function sortedObject(obj: any): any { if (typeof obj !== "object" || obj === null) { diff --git a/packages/launchpad/src/gas.spec.ts b/packages/launchpad/src/fee.spec.ts similarity index 95% rename from packages/launchpad/src/gas.spec.ts rename to packages/launchpad/src/fee.spec.ts index a92e4e08..7a94238a 100644 --- a/packages/launchpad/src/gas.spec.ts +++ b/packages/launchpad/src/fee.spec.ts @@ -1,6 +1,6 @@ import { Decimal } from "@cosmjs/math"; -import { GasPrice } from "./gas"; +import { GasPrice } from "./fee"; describe("GasPrice", () => { it("can be constructed", () => { diff --git a/packages/launchpad/src/gas.ts b/packages/launchpad/src/fee.ts similarity index 92% rename from packages/launchpad/src/gas.ts rename to packages/launchpad/src/fee.ts index c6cfe666..027d7554 100644 --- a/packages/launchpad/src/gas.ts +++ b/packages/launchpad/src/fee.ts @@ -1,7 +1,11 @@ import { Decimal, Uint53 } from "@cosmjs/math"; -import { coins } from "./coins"; -import { StdFee } from "./types"; +import { Coin, coins } from "./coins"; + +export interface StdFee { + readonly amount: readonly Coin[]; + readonly gas: string; +} export type FeeTable = Record; diff --git a/packages/launchpad/src/index.ts b/packages/launchpad/src/index.ts index d97792e4..04d91fb8 100644 --- a/packages/launchpad/src/index.ts +++ b/packages/launchpad/src/index.ts @@ -43,7 +43,7 @@ export { isSearchByTagsQuery, } from "./cosmosclient"; export { makeSignDoc, serializeSignDoc, StdSignDoc } from "./encoding"; -export { buildFeeTable, FeeTable, GasLimits, GasPrice } from "./gas"; +export { buildFeeTable, FeeTable, GasLimits, GasPrice, StdFee } from "./fee"; export { AuthAccountsResponse, AuthExtension, @@ -145,7 +145,6 @@ export { findSequenceForSignedTx } from "./sequence"; export { AccountData, Algo, AminoSignResponse, OfflineSigner } from "./signer"; export { CosmosFeeTable, SigningCosmosClient } from "./signingcosmosclient"; export { isStdTx, isWrappedStdTx, makeStdTx, CosmosSdkTx, StdTx, WrappedStdTx, WrappedTx } from "./tx"; -export { StdFee } from "./types"; export { executeKdf, KdfConfiguration } from "./wallet"; export { extractKdfConfiguration, Secp256k1HdWallet } from "./secp256k1hdwallet"; export { Secp256k1Wallet } from "./secp256k1wallet"; diff --git a/packages/launchpad/src/lcdapi/lcdclient.spec.ts b/packages/launchpad/src/lcdapi/lcdclient.spec.ts index 1813b349..ff7495c7 100644 --- a/packages/launchpad/src/lcdapi/lcdclient.spec.ts +++ b/packages/launchpad/src/lcdapi/lcdclient.spec.ts @@ -4,6 +4,7 @@ import { assert, sleep } from "@cosmjs/utils"; import { Coin } from "../coins"; import { isBroadcastTxFailure } from "../cosmosclient"; import { makeSignDoc } from "../encoding"; +import { StdFee } from "../fee"; import { parseLogs } from "../logs"; import { MsgSend } from "../msgs"; import { makeCosmoshubPath } from "../paths"; @@ -21,7 +22,6 @@ import { unused, } from "../testutils.spec"; import { isWrappedStdTx, makeStdTx, StdTx } from "../tx"; -import { StdFee } from "../types"; import { setupAuthExtension } from "./auth"; import { TxsResponse } from "./base"; import { LcdApiArray, LcdClient } from "./lcdclient"; diff --git a/packages/launchpad/src/signingcosmosclient.spec.ts b/packages/launchpad/src/signingcosmosclient.spec.ts index d898a447..307243a9 100644 --- a/packages/launchpad/src/signingcosmosclient.spec.ts +++ b/packages/launchpad/src/signingcosmosclient.spec.ts @@ -3,7 +3,7 @@ import { assert } from "@cosmjs/utils"; import { Coin, coin, coins } from "./coins"; import { assertIsBroadcastTxSuccess, PrivateCosmosClient } from "./cosmosclient"; -import { GasPrice } from "./gas"; +import { GasPrice } from "./fee"; import { MsgDelegate, MsgSend } from "./msgs"; import { makeCosmoshubPath } from "./paths"; import { Secp256k1HdWallet } from "./secp256k1hdwallet"; diff --git a/packages/launchpad/src/signingcosmosclient.ts b/packages/launchpad/src/signingcosmosclient.ts index 829aaa80..057efb4e 100644 --- a/packages/launchpad/src/signingcosmosclient.ts +++ b/packages/launchpad/src/signingcosmosclient.ts @@ -4,12 +4,11 @@ import equals from "fast-deep-equal"; import { Coin } from "./coins"; import { Account, BroadcastTxResult, CosmosClient, GetSequenceResult } from "./cosmosclient"; import { makeSignDoc } from "./encoding"; -import { buildFeeTable, FeeTable, GasLimits, GasPrice } from "./gas"; +import { buildFeeTable, FeeTable, GasLimits, GasPrice, StdFee } from "./fee"; import { BroadcastMode } from "./lcdapi"; import { Msg, MsgSend } from "./msgs"; import { OfflineSigner } from "./signer"; import { makeStdTx, StdTx } from "./tx"; -import { StdFee } from "./types"; /** * These fees are used by the higher level methods of SigningCosmosClient diff --git a/packages/launchpad/src/tx.spec.ts b/packages/launchpad/src/tx.spec.ts index 848c0c56..894a8069 100644 --- a/packages/launchpad/src/tx.spec.ts +++ b/packages/launchpad/src/tx.spec.ts @@ -3,8 +3,8 @@ import { StdSignature } from "@cosmjs/amino"; import { coins } from "./coins"; import { makeSignDoc } from "./encoding"; +import { StdFee } from "./fee"; import { makeStdTx } from "./tx"; -import { StdFee } from "./types"; describe("tx", () => { describe("makeStdTx", () => { diff --git a/packages/launchpad/src/tx.ts b/packages/launchpad/src/tx.ts index e88ab00f..0ef1082d 100644 --- a/packages/launchpad/src/tx.ts +++ b/packages/launchpad/src/tx.ts @@ -1,8 +1,8 @@ import { StdSignature } from "@cosmjs/amino"; import { StdSignDoc } from "./encoding"; +import { StdFee } from "./fee"; import { Msg } from "./msgs"; -import { StdFee } from "./types"; /** * A Cosmos SDK StdTx diff --git a/packages/launchpad/src/types.ts b/packages/launchpad/src/types.ts deleted file mode 100644 index 91fc04c0..00000000 --- a/packages/launchpad/src/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable @typescript-eslint/naming-convention */ -import { Coin } from "./coins"; - -export interface StdFee { - readonly amount: readonly Coin[]; - readonly gas: string; -}