diff --git a/README.md b/README.md index cd392c775..c723c088e 100644 --- a/README.md +++ b/README.md @@ -414,7 +414,7 @@ See [RPC Clients](#rpc-clients) for more info. | option | description | defaults | | ----------------------------------------- | -------------------------------------------------------------- | --------- | | `prototypes.typingsFormat.customTypes.useCosmosSDKDec` | enable handling "prototypes.typingsFormat.customTypes.useCosmosSDKDec" proto custom type. Used to show decimal fields with the custom type correctly. Highly recommend set to true. | `true` | -| `prototypes.typingsFormat.customTypes.usePatchedDecimal` | To use patched decimal other then decimal from @cosmjs/math | `false` | +| `prototypes.typingsFormat.customTypes.useEnhancedDecimal` | To use patched decimal other then decimal from @cosmjs/math | `false` | | `prototypes.typingsFormat.customTypes.base64Lib` | To use endo/base64 methods | `undefined` | | `prototypes.typingsFormat.num64` | 'long' or 'bigint', the way of generating int64 proto types, set to 'bigint' to enable using more stable built-in type | `bigint` | | `prototypes.typingsFormat.useTelescopeGeneratedType` | Discard GeneratedType from cosmjs, use TelescopeGeneratedType instead inside *.registry.ts files | `false` | diff --git a/packages/telescope/README.md b/packages/telescope/README.md index cd392c775..c723c088e 100644 --- a/packages/telescope/README.md +++ b/packages/telescope/README.md @@ -414,7 +414,7 @@ See [RPC Clients](#rpc-clients) for more info. | option | description | defaults | | ----------------------------------------- | -------------------------------------------------------------- | --------- | | `prototypes.typingsFormat.customTypes.useCosmosSDKDec` | enable handling "prototypes.typingsFormat.customTypes.useCosmosSDKDec" proto custom type. Used to show decimal fields with the custom type correctly. Highly recommend set to true. | `true` | -| `prototypes.typingsFormat.customTypes.usePatchedDecimal` | To use patched decimal other then decimal from @cosmjs/math | `false` | +| `prototypes.typingsFormat.customTypes.useEnhancedDecimal` | To use patched decimal other then decimal from @cosmjs/math | `false` | | `prototypes.typingsFormat.customTypes.base64Lib` | To use endo/base64 methods | `undefined` | | `prototypes.typingsFormat.num64` | 'long' or 'bigint', the way of generating int64 proto types, set to 'bigint' to enable using more stable built-in type | `bigint` | | `prototypes.typingsFormat.useTelescopeGeneratedType` | Discard GeneratedType from cosmjs, use TelescopeGeneratedType instead inside *.registry.ts files | `false` | diff --git a/packages/telescope/__tests__/misc.test.ts b/packages/telescope/__tests__/misc.test.ts index 07545191a..eed2d7944 100644 --- a/packages/telescope/__tests__/misc.test.ts +++ b/packages/telescope/__tests__/misc.test.ts @@ -434,7 +434,7 @@ describe('misc', () => { await telescope.build(); }); - it('generates with usePatchedDecimal', async () => { + it('generates with useEnhancedDecimal', async () => { const testFolder = '/output-decimals/agoric'; const telescope = new TelescopeBuilder({ @@ -444,7 +444,7 @@ describe('misc', () => { prototypes: { typingsFormat: { customTypes: { - usePatchedDecimal: true, + useEnhancedDecimal: true, }, }, }, diff --git a/packages/telescope/src/generators/create-helpers.ts b/packages/telescope/src/generators/create-helpers.ts index 0522311c0..088ed817a 100644 --- a/packages/telescope/src/generators/create-helpers.ts +++ b/packages/telescope/src/generators/create-helpers.ts @@ -94,7 +94,7 @@ export const plugin = (builder: TelescopeBuilder) => { write(builder, 'grpc-web.ts', grpcWeb); } - if (builder.options.prototypes.typingsFormat.customTypes.usePatchedDecimal) { + if (builder.options.prototypes.typingsFormat.customTypes.useEnhancedDecimal) { builder.files.push('decimals.ts'); write(builder, 'decimals.ts', decimal); } diff --git a/packages/telescope/src/generators/customize-utils.ts b/packages/telescope/src/generators/customize-utils.ts index 15e81b55f..fae6e1886 100644 --- a/packages/telescope/src/generators/customize-utils.ts +++ b/packages/telescope/src/generators/customize-utils.ts @@ -3,7 +3,7 @@ import { UTILS } from '../utils'; export const plugin = (builder: TelescopeBuilder) => { if ( - builder.options.prototypes.typingsFormat.customTypes.usePatchedDecimal === + builder.options.prototypes.typingsFormat.customTypes.useEnhancedDecimal === true ) { UTILS.Decimal = '__decimals__'; diff --git a/packages/types/src/telescope.ts b/packages/types/src/telescope.ts index 3a4d07569..ae67a63ee 100644 --- a/packages/types/src/telescope.ts +++ b/packages/types/src/telescope.ts @@ -87,7 +87,7 @@ interface TelescopeOpts { typingsFormat?: { customTypes?: { useCosmosSDKDec?: boolean; - usePatchedDecimal?: boolean; + useEnhancedDecimal?: boolean; base64Lib?: '@endo/base64'; }; diff --git a/packages/types/types/telescope.d.ts b/packages/types/types/telescope.d.ts index 4445c4f71..840de18cb 100644 --- a/packages/types/types/telescope.d.ts +++ b/packages/types/types/telescope.d.ts @@ -74,7 +74,7 @@ interface TelescopeOpts { typingsFormat?: { customTypes?: { useCosmosSDKDec?: boolean; - usePatchedDecimal?: boolean; + useEnhancedDecimal?: boolean; base64Lib?: '@endo/base64'; }; num64?: 'long' | 'bigint';