From d6bda838da2e039f6b8568315b1ec098f25f6105 Mon Sep 17 00:00:00 2001 From: Zetazzz Date: Wed, 25 Dec 2024 19:48:31 +0800 Subject: [PATCH] fix default value for cosmos --- .../v-next/outputicjs/cosmos/client.ts | 49 ------------------- packages/types/src/telescope.ts | 1 - 2 files changed, 50 deletions(-) delete mode 100644 __fixtures__/v-next/outputicjs/cosmos/client.ts diff --git a/__fixtures__/v-next/outputicjs/cosmos/client.ts b/__fixtures__/v-next/outputicjs/cosmos/client.ts deleted file mode 100644 index 74aebadaa..000000000 --- a/__fixtures__/v-next/outputicjs/cosmos/client.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; -import { AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; -import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; -import * as cosmosAuthzV1beta1TxRegistry from "./authz/v1beta1/tx.registry"; -import * as cosmosBankV1beta1TxRegistry from "./bank/v1beta1/tx.registry"; -import * as cosmosCrisisV1beta1TxRegistry from "./crisis/v1beta1/tx.registry"; -import * as cosmosDistributionV1beta1TxRegistry from "./distribution/v1beta1/tx.registry"; -import * as cosmosEvidenceV1beta1TxRegistry from "./evidence/v1beta1/tx.registry"; -import * as cosmosFeegrantV1beta1TxRegistry from "./feegrant/v1beta1/tx.registry"; -import * as cosmosGovV1TxRegistry from "./gov/v1/tx.registry"; -import * as cosmosGovV1beta1TxRegistry from "./gov/v1beta1/tx.registry"; -import * as cosmosGroupV1TxRegistry from "./group/v1/tx.registry"; -import * as cosmosNftV1beta1TxRegistry from "./nft/v1beta1/tx.registry"; -import * as cosmosSlashingV1beta1TxRegistry from "./slashing/v1beta1/tx.registry"; -import * as cosmosStakingV1beta1TxRegistry from "./staking/v1beta1/tx.registry"; -import * as cosmosUpgradeV1beta1TxRegistry from "./upgrade/v1beta1/tx.registry"; -import * as cosmosVestingV1beta1TxRegistry from "./vesting/v1beta1/tx.registry"; -export const cosmosAminoConverters = {}; -export const cosmosProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...cosmosAuthzV1beta1TxRegistry.registry, ...cosmosBankV1beta1TxRegistry.registry, ...cosmosCrisisV1beta1TxRegistry.registry, ...cosmosDistributionV1beta1TxRegistry.registry, ...cosmosEvidenceV1beta1TxRegistry.registry, ...cosmosFeegrantV1beta1TxRegistry.registry, ...cosmosGovV1TxRegistry.registry, ...cosmosGovV1beta1TxRegistry.registry, ...cosmosGroupV1TxRegistry.registry, ...cosmosNftV1beta1TxRegistry.registry, ...cosmosSlashingV1beta1TxRegistry.registry, ...cosmosStakingV1beta1TxRegistry.registry, ...cosmosUpgradeV1beta1TxRegistry.registry, ...cosmosVestingV1beta1TxRegistry.registry]; -export const getSigningCosmosClientOptions = (): { - registry: Registry; - aminoTypes: AminoTypes; -} => { - const registry = new Registry([...cosmosProtoRegistry]); - const aminoTypes = new AminoTypes({ - ...cosmosAminoConverters - }); - return { - registry, - aminoTypes - }; -}; -export const getSigningCosmosClient = async ({ - rpcEndpoint, - signer -}: { - rpcEndpoint: string | HttpEndpoint; - signer: OfflineSigner; -}) => { - const { - registry, - aminoTypes - } = getSigningCosmosClientOptions(); - const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry: (registry as any), - aminoTypes - }); - return client; -}; \ No newline at end of file diff --git a/packages/types/src/telescope.ts b/packages/types/src/telescope.ts index 6fe02df22..63f689adc 100644 --- a/packages/types/src/telescope.ts +++ b/packages/types/src/telescope.ts @@ -548,7 +548,6 @@ export const defaultTelescopeOptions: TelescopeOptions = { packages: { cosmos: { stargateClients: { - enabled: true, includeCosmosDefaultTypes: false, }, },