Skip to content

Commit

Permalink
Merge pull request #122 from alleslabs/fix/incorrect-unknown-block-he…
Browse files Browse the repository at this point in the history
…ight-rendering

fix unknown code upload block height
  • Loading branch information
poomthiti committed Jan 24, 2023
2 parents a6d966c + 10b31ed commit 9554a90
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- [#122](https://github.com/alleslabs/celatone-frontend/pull/122) Fix unknown code upload block height
- [#125](https://github.com/alleslabs/celatone-frontend/pull/125) Add connect wallet alert in instantiate page
- [#126](https://github.com/alleslabs/celatone-frontend/pull/126) Add port id copier for IBC port id
- [#121](https://github.com/alleslabs/celatone-frontend/pull/121) Fix code snippet for query axios
Expand Down
4 changes: 3 additions & 1 deletion src/lib/pages/code-details/components/CodeInfoSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const getMethodSpecificRender = (
/>
</LabelText>
),
storedBlockRender: (
storedBlockRender: codeProposalInfo.height ? (
<>
<ExplorerLink
type="block_height"
Expand All @@ -42,6 +42,8 @@ const getMethodSpecificRender = (
{formatUTC(codeProposalInfo.created)}
</Text>
</>
) : (
<Text variant="body2">N/A</Text>
),
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/services/codeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const useCodeInfoByCodeId = (
proposal: codes_by_pk.code_proposals[0]
? {
proposalId: codes_by_pk.code_proposals[0].proposal_id,
height: codes_by_pk.code_proposals[0].block?.height ?? 0,
height: codes_by_pk.code_proposals[0].block?.height,
created: parseDateDefault(
codes_by_pk.code_proposals[0].block?.timestamp
),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/types/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface CodeInfo extends CodeLocalInfo {

interface CodeProposal {
proposalId: number;
height: number;
height: Option<number>;
created: Date;
}

Expand Down

2 comments on commit 9554a90

@vercel
Copy link

@vercel vercel bot commented on 9554a90 Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 9554a90 Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.