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: creator, sorting name in validator #986

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all 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

- [#986](https://github.com/alleslabs/celatone-frontend/pull/986) Fix bugbash lite version (creator, sorting name in validator)
- [#985](https://github.com/alleslabs/celatone-frontend/pull/985) Fix proposal details lite version bugs
- [#987](https://github.com/alleslabs/celatone-frontend/pull/987) Fix bug bash (query redirection, module button color, modal open/close, migration contract radio button, txs count in account detail)
- [#989](https://github.com/alleslabs/celatone-frontend/pull/989) Change tomcat endpoints
Expand Down
38 changes: 17 additions & 21 deletions src/lib/pages/module-details/components/ModuleTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
useCurrentChain,
useInternalNavigate,
useMobile,
useTierConfig,
} from "lib/app-provider";
import { Breadcrumb } from "lib/components/Breadcrumb";
import { CopyButton } from "lib/components/copy";
Expand Down Expand Up @@ -36,7 +35,6 @@ export const ModuleTop = ({ moduleData, isVerified }: ModuleTopProps) => {
const isMobile = useMobile();
const navigate = useInternalNavigate();
const { address } = useCurrentChain();
const isFullTier = useTierConfig() === "full";
const { convertHexWalletAddress, convertHexModuleAddress } =
useConvertHexAddress();

Expand Down Expand Up @@ -226,25 +224,23 @@ export const ModuleTop = ({ moduleData, isVerified }: ModuleTopProps) => {
type="module_path"
/>
</Flex>
{isFullTier && (
<Flex
mt={{ base: 2, md: 0 }}
gap={{ base: 0, md: 2 }}
direction={{ base: "column", md: "row" }}
>
<Text {...baseTextStyle} color="text.main">
Creator:
</Text>
<ExplorerLink
value={moduleAddress}
ampCopierSection="module_top"
textFormat="normal"
maxWidth="fit-content"
type="user_address"
fixedHeight={false}
/>
</Flex>
)}
<Flex
mt={{ base: 2, md: 0 }}
gap={{ base: 0, md: 2 }}
direction={{ base: "column", md: "row" }}
>
<Text {...baseTextStyle} color="text.main">
Creator:
</Text>
<ExplorerLink
value={moduleAddress}
ampCopierSection="module_top"
textFormat="normal"
maxWidth="fit-content"
type="user_address"
fixedHeight={false}
/>
</Flex>
<Flex
mt={{ base: 2, md: 0 }}
gap={{ base: 0, md: 2 }}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/pages/validators/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const compareValidator =
let isLower = true;
if (order === ValidatorOrder.Commission)
isLower = a.commissionRate < b.commissionRate;
else if (order === ValidatorOrder.Moniker) isLower = a.moniker < b.moniker;
else if (order === ValidatorOrder.Moniker)
isLower = a.moniker.toLowerCase() < b.moniker.toLowerCase();
else
isLower = a.votingPower.eq(b.votingPower)
? a.moniker > b.moniker
Expand Down
Loading