Skip to content

Commit

Permalink
Merge pull request #991 from alleslabs/fux/bug-bash-02
Browse files Browse the repository at this point in the history
Fix(components): code select section label
  • Loading branch information
evilpeach authored Jun 21, 2024
2 parents 0cc8911 + 2ca223c commit 7c47558
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 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

- [#991](https://github.com/alleslabs/celatone-frontend/pull/991) Fix code select section heading label
- [#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)
Expand Down
39 changes: 24 additions & 15 deletions src/lib/pages/instantiate/instantiate.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, Heading, Text } from "@chakra-ui/react";
import { Box, Flex, Heading, Text } from "@chakra-ui/react";
import type { InstantiateResult } from "@cosmjs/cosmwasm-stargate";
import type { StdFee } from "@cosmjs/stargate";
import type { RJSFValidationError } from "@rjsf/utils";
Expand All @@ -19,6 +19,7 @@ import {
useFabricateFee,
useInstantiateTx,
useSimulateFeeQuery,
useTierConfig,
useValidateAddress,
} from "lib/app-provider";
import { useAttachFunds } from "lib/app-provider/hooks/useAttachFunds";
Expand Down Expand Up @@ -97,6 +98,7 @@ const Instantiate = ({ onComplete }: InstantiatePageProps) => {
const { validateUserAddress, validateContractAddress } = useValidateAddress();
const getAttachFunds = useAttachFunds();
const { getSchemaByCodeHash } = useSchemaStore();
const isFullTier = useTierConfig() === "full";

// ------------------------------------------//
// ------------------STATES------------------//
Expand Down Expand Up @@ -407,20 +409,27 @@ const Instantiate = ({ onComplete }: InstantiatePageProps) => {
subtitle="You need to connect your wallet to perform this action"
mb={6}
/>
<CodeSelectSection
name="codeId"
control={control}
status={status}
error={formErrors.codeId?.message}
onCodeSelect={(code: string) => {
setValue("codeId", code);
resetMsgInputSchema();
}}
setCodeHash={(data: Code) =>
setValue("codeHash", data.hash.toLowerCase())
}
codeId={codeId}
/>
<Box w="100%">
{!isFullTier && (
<Heading variant="h6" as="h6" mt={4} mb={6} alignSelf="flex-start">
Code ID
</Heading>
)}
<CodeSelectSection
name="codeId"
control={control}
status={status}
error={formErrors.codeId?.message}
onCodeSelect={(code: string) => {
setValue("codeId", code);
resetMsgInputSchema();
}}
setCodeHash={(data: Code) =>
setValue("codeHash", data.hash.toLowerCase())
}
codeId={codeId}
/>
</Box>
<form style={{ width: "100%" }}>
<Heading variant="h6" as="h6" mt={4} mb={6} alignSelf="flex-start">
Label
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pages/migrate/components/MigrateContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const MigrateContract = ({
return (
<>
<Heading as="h6" variant="h6" mb={4}>
To Code ID
Migrate to Code ID
</Heading>
<CodeSelectSection
name="codeId"
Expand Down

0 comments on commit 7c47558

Please sign in to comment.