Skip to content

Commit

Permalink
Merge pull request #986 from alleslabs/fix/bugbash-lite-peach2
Browse files Browse the repository at this point in the history
fix: creator, sorting name in validator
  • Loading branch information
evilpeach committed Jun 21, 2024
2 parents a4e5404 + 5b9dfa0 commit 0cc8911
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
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

0 comments on commit 0cc8911

Please sign in to comment.