From ec3af5b0375d75ec56c519ac9f918e46f5db687c Mon Sep 17 00:00:00 2001 From: willclarktech Date: Wed, 24 Mar 2021 17:27:34 +0100 Subject: [PATCH] stargate: Copy CosmosFeeTable from launchpad --- packages/stargate/src/index.ts | 1 + packages/stargate/src/signingstargateclient.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/stargate/src/index.ts b/packages/stargate/src/index.ts index fe379222..e43ceb2d 100644 --- a/packages/stargate/src/index.ts +++ b/packages/stargate/src/index.ts @@ -34,6 +34,7 @@ export { StargateClient, } from "./stargateclient"; export { + CosmosFeeTable, defaultRegistryTypes, SignerData, SigningStargateClient, diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index 271b5069..9af2f6d6 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -1,6 +1,5 @@ import { encodeSecp256k1Pubkey, makeSignDoc as makeSignDocAmino } from "@cosmjs/amino"; import { fromBase64 } from "@cosmjs/encoding"; -import { CosmosFeeTable } from "@cosmjs/launchpad"; import { Int53 } from "@cosmjs/math"; import { EncodeObject, @@ -57,9 +56,18 @@ import { MsgConnectionOpenInit, MsgConnectionOpenTry, } from "./codec/ibc/core/connection/v1/tx"; -import { buildFeeTable, GasLimits, GasPrice, StdFee } from "./fee"; +import { buildFeeTable, FeeTable, GasLimits, GasPrice, StdFee } from "./fee"; import { BroadcastTxResponse, StargateClient } from "./stargateclient"; +/** + * These fees are used by the higher level methods of SigningCosmosClient + * + * This is the same as CosmosFeeTable from @cosmjs/launchpad but those might diverge in the future. + */ +export interface CosmosFeeTable extends FeeTable { + readonly send: StdFee; +} + const defaultGasPrice = GasPrice.fromString("0.025ucosm"); const defaultGasLimits: GasLimits = { send: 80000 };