Merge pull request #732 from cosmos/686-partial-gas-limits
Allow partial gas limits in signing stargate/cosmwasm clients
This commit is contained in:
commit
a2fd121bca
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user