Skip to content

Commit

Permalink
fix: use correct var name for options
Browse files Browse the repository at this point in the history
  • Loading branch information
j-yw committed Sep 14, 2024
1 parent 0b39319 commit f294fb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/telescope/__tests__/misc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const options: TelescopeOptions = {
customTypes: {
useCosmosSDKDec: true,
// default uses cosmjs/math Decimals, undefined uses agoric-sdk
useAgnostic: 'default',
useAgoricDecimal: 'default',
},
num64: 'bigint',
useDeepPartial: true,
Expand Down
8 changes: 4 additions & 4 deletions packages/telescope/src/generators/create-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ export const plugin = (builder: TelescopeBuilder) => {
write(builder, 'grpc-web.ts', grpcWeb);
}

const useAgnostic =
builder.options.prototypes.typingsFormat.customTypes.useAgnostic;
const useAgoric =
builder.options.prototypes.typingsFormat.customTypes.useAgoricDecimal;

if (useAgnostic === 'default' || useAgnostic === undefined) {
if (useAgoric === 'default' || useAgoric === undefined) {
builder.files.push('decimals.ts');
const content = useAgnostic === 'default' ? cosmjsDecimal : decimal;
const content = useAgoric === 'default' ? decimal : cosmjsDecimal;
write(builder, 'decimals.ts', content);
}

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;
useAgnostic?: 'default' | undefined;
useAgoricDecimal?: 'default' | undefined;
};

num64?: 'long' | 'bigint';
Expand Down

0 comments on commit f294fb9

Please sign in to comment.