mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
PR fixes.
This commit is contained in:
parent
6e98cbb6cf
commit
0a27b16d3c
@ -162,17 +162,6 @@ function createDeliverTxResponseErrorMessage(result: DeliverTxResponse): string
|
||||
return `Error when broadcasting tx ${result.transactionHash} at height ${result.height}. Code: ${result.code}; Raw log: ${result.rawLog}`;
|
||||
}
|
||||
|
||||
function createDefaultRegistry(): Registry {
|
||||
return new Registry([...defaultStargateTypes, ...wasmTypes]);
|
||||
}
|
||||
|
||||
function createDefaultAminoTypes(): AminoTypes {
|
||||
return new AminoTypes({
|
||||
...createDefaultAminoConverters(),
|
||||
...createWasmAminoConverters(),
|
||||
})
|
||||
}
|
||||
|
||||
export interface SigningCosmWasmClientOptions {
|
||||
readonly registry?: Registry;
|
||||
readonly aminoTypes?: AminoTypes;
|
||||
@ -240,8 +229,14 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
) {
|
||||
super(tmClient);
|
||||
const {
|
||||
registry = createDefaultRegistry(),
|
||||
aminoTypes = createDefaultAminoTypes(),
|
||||
registry = new Registry([
|
||||
...defaultStargateTypes,
|
||||
...wasmTypes
|
||||
]),
|
||||
aminoTypes = new AminoTypes({
|
||||
...createDefaultAminoConverters(),
|
||||
...createWasmAminoConverters(),
|
||||
}),
|
||||
} = options;
|
||||
this.registry = registry;
|
||||
this.aminoTypes = aminoTypes;
|
||||
|
@ -123,6 +123,7 @@ export {
|
||||
SearchTxQuery,
|
||||
} from "./search";
|
||||
export {
|
||||
createDefaultAminoConverters,
|
||||
defaultRegistryTypes,
|
||||
SignerData,
|
||||
SigningStargateClient,
|
||||
|
@ -64,10 +64,6 @@ export const defaultRegistryTypes: ReadonlyArray<[string, GeneratedType]> = [
|
||||
...vestingTypes,
|
||||
];
|
||||
|
||||
function createDefaultRegistry(): Registry {
|
||||
return new Registry(defaultRegistryTypes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Signing information for a single signer that is not included in the transaction.
|
||||
*
|
||||
@ -105,10 +101,6 @@ export function createDefaultAminoConverters(): AminoConverters {
|
||||
};
|
||||
}
|
||||
|
||||
function createDefaultAminoTypes(): AminoTypes {
|
||||
return new AminoTypes(createDefaultAminoConverters())
|
||||
}
|
||||
|
||||
export class SigningStargateClient extends StargateClient {
|
||||
public readonly registry: Registry;
|
||||
public readonly broadcastTimeoutMs: number | undefined;
|
||||
@ -168,8 +160,8 @@ export class SigningStargateClient extends StargateClient {
|
||||
) {
|
||||
super(tmClient, options);
|
||||
const {
|
||||
registry = createDefaultRegistry(),
|
||||
aminoTypes = createDefaultAminoTypes()
|
||||
registry = new Registry(defaultRegistryTypes),
|
||||
aminoTypes = new AminoTypes(createDefaultAminoConverters())
|
||||
} = options;
|
||||
this.registry = registry;
|
||||
this.aminoTypes = aminoTypes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user