Skip to content

Commit

Permalink
Merge pull request #987 from alleslabs/fix/bug-bash-01
Browse files Browse the repository at this point in the history
Fix: bug bash
  • Loading branch information
evilpeach committed Jun 21, 2024
2 parents 5b9496c + 135c830 commit 1176a33
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 27 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

- [#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
- [#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
Expand Down
40 changes: 22 additions & 18 deletions src/lib/components/select-code/CodeSelectSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useState } from "react";
import type { Control, FieldPath, FieldValues } from "react-hook-form";

import { AmpEvent, track } from "lib/amplitude";
import { useTierConfig } from "lib/app-provider";
import { ControllerInput } from "lib/components/forms";
import type { FormStatus } from "lib/components/forms";
import type { Code } from "lib/services/types";
Expand All @@ -29,29 +30,32 @@ export const CodeSelectSection = <T extends FieldValues>({
setCodeHash,
status,
}: CodeSelectSectionProps<T>) => {
const isFullTier = useTierConfig() === "full";
const [method, setMethod] = useState<"select-existing" | "fill-manually">(
"select-existing"
isFullTier ? "select-existing" : "fill-manually"
);

return (
<>
<RadioGroup
onChange={(nextVal: "select-existing" | "fill-manually") => {
track(
nextVal === "fill-manually"
? AmpEvent.USE_CODE_FILL
: AmpEvent.USE_CODE_SELECT
);
setMethod(nextVal);
}}
value={method}
w="100%"
>
<Flex justify="space-around">
<Radio value="select-existing">Select from your code</Radio>
<Radio value="fill-manually">Fill Code ID manually</Radio>
</Flex>
</RadioGroup>
{isFullTier && (
<RadioGroup
onChange={(nextVal: "select-existing" | "fill-manually") => {
track(
nextVal === "fill-manually"
? AmpEvent.USE_CODE_FILL
: AmpEvent.USE_CODE_SELECT
);
setMethod(nextVal);
}}
value={method}
w="100%"
>
<Flex justify="space-around">
<Radio value="select-existing">Select from your code</Radio>
<Radio value="fill-manually">Fill Code ID manually</Radio>
</Flex>
</RadioGroup>
)}
<form style={{ width: "100%" }}>
{method === "select-existing" ? (
<CodeSelect
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/tx/modal/ButtonSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const ButtonSection = ({
.find((r) => r.title === "Tx Hash")
?.value?.toString();
openTxTab(txHash);
onClose?.();
};

const openProposalExplorer = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/layout/mobile/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const getNavDrawerLite = (
},
{
name: "Query",
slug: "/query",
slug: "/interact-contract",
icon: "query" as IconKeys,
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const TxsTableLite = ({
title="Transactions"
count={txsCount}
onViewMore={onViewMore}
showCount={isFullTier}
/>
) : (
<Flex direction="column" gap={6}>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/pages/home/components/DevShortcut.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ export const DevShortcut = () => {
{
title: "Query",
subtitle: "Query and get contract state data",
slug: "query",
slug: "interact-contract",
icon: "query" as const,
},
{
title: "Execute",
subtitle: "Send transactions to contracts",
slug: "execute",
slug: "interact-contract?selectedType=execute",
icon: "execute" as const,
},
]
Expand Down
4 changes: 2 additions & 2 deletions src/lib/pages/home/components/QuickMenuLite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ export const QuickMenuLite = () => {
{
title: "Query",
subtitle: "Query and get contract state data",
slug: "query",
slug: "interact-contract",
icon: "query" as const,
isHighlight: false,
isDocument: false,
},
{
title: "Execute",
subtitle: "Send transactions to contracts",
slug: "execute",
slug: "interact-contract?selectedType=execute",
icon: "execute" as const,
isHighlight: false,
isDocument: false,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pages/home/components/QuickMenuMobileLite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const QuickMenuMobileLite = ({ prettyName }: { prettyName: string }) => {
item={{
title: "Query",
subtitle: "Query and get contract state data",
slug: "query",
slug: "interact-contract",
icon: "query" as const,
isDocument: false,
}}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/pages/publish-module/components/ModulePublishCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export const ModulePublishCard = ({ module }: ModulePublishCardProps) => {
</Flex>
<Grid templateColumns="1fr 1fr 1fr" columnGap={4}>
<Button
rightIcon={<CustomIcon name="launch" boxSize={3} color="text.main" />}
variant="outline-white"
rightIcon={<CustomIcon name="launch" boxSize={3} />}
variant="primary"
onClick={() => {
track(AmpEvent.USE_PUBLISHED_MODULE_ACTION, {
label: "See Module",
Expand Down

0 comments on commit 1176a33

Please sign in to comment.