From c02458032426cd488bd0a2fd3ff497cd1c7e2edf Mon Sep 17 00:00:00 2001 From: Gefei Hou Date: Mon, 28 Oct 2024 14:50:25 +0800 Subject: [PATCH] Added interchainjs deps --- packages/telescope/src/generators/customize-utils.ts | 9 +++++++++ packages/types/src/telescope.ts | 1 + 2 files changed, 10 insertions(+) diff --git a/packages/telescope/src/generators/customize-utils.ts b/packages/telescope/src/generators/customize-utils.ts index fae6e1886..197f50b21 100644 --- a/packages/telescope/src/generators/customize-utils.ts +++ b/packages/telescope/src/generators/customize-utils.ts @@ -31,4 +31,13 @@ export const plugin = (builder: TelescopeBuilder) => { UTILS.base64FromBytes = '__helpers__'; UTILS.bytesFromBase64 = '__helpers__'; } + + if (builder.options.prototypes.useInterchainjsDeps === true) { + UTILS.AminoMsg = { + type: 'import', + path: '@interchainjs/ReadOnlyAminoMsg', + name: 'ReadOnlyAminoMsg', + importAs: 'AminoMsg', + }; + } }; diff --git a/packages/types/src/telescope.ts b/packages/types/src/telescope.ts index 8bf314219..a1d948940 100644 --- a/packages/types/src/telescope.ts +++ b/packages/types/src/telescope.ts @@ -62,6 +62,7 @@ interface TelescopeOpts { allowUndefinedTypes?: boolean; allowEncodeDefaultScalars?: boolean; isScalarDefaultToNullable?: boolean; + useInterchainjsDeps?: boolean; enforceNullCheck?: boolean; optionalQueryParams?: boolean;