Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix block in search by preventing non number #984

Merged
merged 4 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

- [#984](https://github.com/alleslabs/celatone-frontend/pull/984) Exclude non block number from searching block in lite
- [#974](https://github.com/alleslabs/celatone-frontend/pull/974) Fix tx by account addr lcd to support new cosmos sdk
- [#976](https://github.com/alleslabs/celatone-frontend/pull/976) Support save accounts in lite version
- [#944](https://github.com/alleslabs/celatone-frontend/pull/944) Fix asset input selector
Expand Down
5 changes: 3 additions & 2 deletions src/lib/services/searchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ export const useSearchHandler = (
isPosDecimal(debouncedKeyword) && isFullTier
);
const { foundBlock, isFetching: blockFetching } = useMemo(() => {
if (!isFullTier) return { foundBlock: true, isFetching: false };
if (isPosDecimal(debouncedKeyword) && !isFullTier)
return { foundBlock: true, isFetching: false };
return { foundBlock: blockApi.data, isFetching: blockApi.isFetching };
}, [blockApi, isFullTier]);
}, [blockApi.data, blockApi.isFetching, debouncedKeyword, isFullTier]);

// Proposal
const { data: proposalApiData, isFetching: proposalApiIsFetching } =
Expand Down
Loading