Skip to content

Commit

Permalink
fix: link path
Browse files Browse the repository at this point in the history
  • Loading branch information
songwongtp committed Jul 1, 2024
1 parent 1c20d5a commit 883716c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
13 changes: 8 additions & 5 deletions src/lib/services/move/module/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,14 @@ export const getModulePublishInfo = async (
isGov: boolean
): Promise<ModulePublishInfo> =>
axios
.get(`${endpoint}/${encodeURI(vmAddress)}/${encodeURI(moduleName)}/info`, {
params: {
is_gov: isGov,
},
})
.get(
`${endpoint}/${encodeURI(vmAddress)}/${encodeURI(moduleName)}/publish_info`,
{
params: {
is_gov: isGov,
},
}
)
.then(({ data }) => parseWithError(zModulePublishInfoResponse, data));

export const getModuleTableCounts = async (
Expand Down
5 changes: 2 additions & 3 deletions src/lib/services/types/move/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ export const zModulePublishInfoResponse = z
recent_publish_transaction: z.string().nullable(),
recent_publish_proposal: zProposal
.pick({ id: true, title: true })
.nullish()
.default(null),
.nullish(),
recent_publish_block_height: z.number().nonnegative(),
recent_publish_block_timestamp: zUtcDate,
is_republished: z.boolean(),
Expand All @@ -105,7 +104,7 @@ export const zModulePublishInfoResponse = z
export const zModuleTableCountsResponse = z.object({
txs: z.number().nonnegative().nullable(),
histories: z.number().nonnegative().nullable(),
proposals: z.number().nonnegative().nullish().default(null),
proposals: z.number().nonnegative().nullish(),
});
export type ModuleTableCountsResponse = z.infer<
typeof zModuleTableCountsResponse
Expand Down
2 changes: 1 addition & 1 deletion src/lib/types/move/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ModuleInfo

export interface ModulePublishInfo {
recentPublishTransaction: Nullable<string>;
recentPublishProposal: Nullable<Pick<Proposal, "id" | "title">>;
recentPublishProposal?: Nullable<Pick<Proposal, "id" | "title">>;
recentPublishBlockHeight: number;
recentPublishBlockTimestamp: Date;
isRepublished: boolean;
Expand Down

0 comments on commit 883716c

Please sign in to comment.