Skip to content

Commit

Permalink
change flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Sep 25, 2024
1 parent 791ee93 commit 135fb66
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
2 changes: 1 addition & 1 deletion packages/telescope/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
4 changes: 2 additions & 2 deletions packages/telescope/__tests__/misc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -444,7 +444,7 @@ describe('misc', () => {
prototypes: {
typingsFormat: {
customTypes: {
usePatchedDecimal: true,
useEnhancedDecimal: true,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/telescope/src/generators/create-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/telescope/src/generators/customize-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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__';
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/telescope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ interface TelescopeOpts {
typingsFormat?: {
customTypes?: {
useCosmosSDKDec?: boolean;
usePatchedDecimal?: boolean;
useEnhancedDecimal?: boolean;
base64Lib?: '@endo/base64';
};

Expand Down
2 changes: 1 addition & 1 deletion packages/types/types/telescope.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ interface TelescopeOpts {
typingsFormat?: {
customTypes?: {
useCosmosSDKDec?: boolean;
usePatchedDecimal?: boolean;
useEnhancedDecimal?: boolean;
base64Lib?: '@endo/base64';
};
num64?: 'long' | 'bigint';
Expand Down

0 comments on commit 135fb66

Please sign in to comment.