Merge pull request #732 from cosmos/686-partial-gas-limits

Allow partial gas limits in signing stargate/cosmwasm clients
This commit is contained in:
mergify[bot]
2021-03-25 10:34:44 +00:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
@@ -94,7 +94,7 @@ export interface SigningCosmWasmClientOptions {
readonly aminoTypes?: AminoTypes;
readonly prefix?: string;
readonly gasPrice?: GasPrice;
readonly gasLimits?: GasLimits<CosmosFeeTable>;
readonly gasLimits?: Partial<GasLimits<CosmosFeeTable>>;
}
/** Use for testing only */
@@ -129,7 +129,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
registry = createDefaultRegistry(),
aminoTypes = new AminoTypes({ additions: cosmWasmTypes, prefix: options.prefix }),
gasPrice = defaultGasPrice,
gasLimits = defaultGasLimits,
gasLimits = {},
} = options;
this.fees = buildFeeTable<CosmosFeeTable>(gasPrice, defaultGasLimits, gasLimits);
this.registry = registry;
@@ -128,7 +128,7 @@ export interface SigningStargateClientOptions {
readonly aminoTypes?: AminoTypes;
readonly prefix?: string;
readonly gasPrice?: GasPrice;
readonly gasLimits?: GasLimits<CosmosFeeTable>;
readonly gasLimits?: Partial<GasLimits<CosmosFeeTable>>;
}
export class SigningStargateClient extends StargateClient {
@@ -173,7 +173,7 @@ export class SigningStargateClient extends StargateClient {
registry = createDefaultRegistry(),
aminoTypes = new AminoTypes({ prefix: options.prefix }),
gasPrice = defaultGasPrice,
gasLimits = defaultGasLimits,
gasLimits = {},
} = options;
this.fees = buildFeeTable<CosmosFeeTable>(gasPrice, defaultGasLimits, gasLimits);
this.registry = registry;