Skip to content

Commit

Permalink
Merge pull request #1177 from alleslabs/release/v1.9.3
Browse files Browse the repository at this point in the history
Cut release v1.9.3
  • Loading branch information
evilpeach authored Nov 6, 2024
2 parents 45e61de + fd1abfe commit d044661
Show file tree
Hide file tree
Showing 17 changed files with 376 additions and 105 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Features

### Improvements

### Bug fixes

## v1.9.3

### Features

- [#1174](https://github.com/alleslabs/celatone-frontend/pull/1174) Add custom network by url with query param

### Bug fixes

- [#1176](https://github.com/alleslabs/celatone-frontend/pull/1176) Improve adding custom network by url with query param
- [#1175](https://github.com/alleslabs/celatone-frontend/pull/1175) Fix tooltip bg color
- [#1172](https://github.com/alleslabs/celatone-frontend/pull/1172) Fix auto popup for module drawer in mobile

## v1.9.2

### Improvements
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "celatone",
"version": "1.9.2",
"version": "1.9.3",
"author": "Alles Labs",
"contributors": [
{
Expand Down Expand Up @@ -42,7 +42,7 @@
"build-storybook": "storybook build"
},
"dependencies": {
"@alleslabs/shared": "1.0.0-dev5",
"@alleslabs/shared": "1.0.0-dev6",
"@amplitude/analytics-browser": "^2.3.3",
"@amplitude/analytics-types": "^2.3.0",
"@amplitude/plugin-user-agent-enrichment-browser": "^1.0.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/lib/app-provider/hooks/useChainConfigs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ChainConfig } from "@alleslabs/shared";
import type { AssetList, Chain } from "@chain-registry/types";
import chainRegistry from "chain-registry";
import { find, isUndefined, unionBy } from "lodash";
import { isUndefined, unionBy } from "lodash";
import { useMemo } from "react";

import { devChainConfigs } from "config/chain";
Expand All @@ -23,7 +23,6 @@ export const useChainConfigs = (): {
registryAssets: AssetList[];
supportedChainIds: string[];
isChainIdExist: (chainId: string) => boolean;
isPrettyNameExist: (name: string) => boolean;
isLoading: boolean;
} => {
const { data: apiChainConfigs, isFetching } =
Expand Down Expand Up @@ -114,8 +113,6 @@ export const useChainConfigs = (): {
),
supportedChainIds: [...SUPPORTED_CHAIN_IDS, ...local.supportedChainIds],
isChainIdExist: (chainId: string) => !!chainConfigs[chainId],
isPrettyNameExist: (name: string) =>
!!find(chainConfigs, { prettyName: name }),
isLoading: isFetching || !isHydrated,
};
}, [
Expand Down
4 changes: 3 additions & 1 deletion src/lib/app-provider/tx/storeCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export const useStoreCodeTx = (isMigrate: boolean) => {

const message = composeStoreCodeMsg({
sender: address,
wasmByteCode: await gzip(new Uint8Array(await wasmCode)),
wasmByteCode: new Uint8Array(
await gzip(new Uint8Array(await wasmCode))
),
permission,
addresses,
});
Expand Down
6 changes: 1 addition & 5 deletions src/lib/components/module/FunctionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ const FunctionCardBody = ({
<Flex alignItems="center" gap={2}>
{!isView && (
<>
<Tooltip
bg="primary.dark"
label={`is_entry: ${exposedFn.is_entry}`}
>
<Tooltip label={`is_entry: ${exposedFn.is_entry}`}>
<Flex pointerEvents="auto" onClick={(e) => e.stopPropagation()}>
{disabled ? (
<CustomIcon name="close" color="gray.600" boxSize={3} />
Expand Down Expand Up @@ -140,7 +137,6 @@ export const FunctionCard = ({
/>
) : (
<Tooltip
bg="primary.dark"
label="Only functions with “is_entry: true” are able to interacted through Celatone’s module interactions."
hidden={!disabled}
>
Expand Down
20 changes: 11 additions & 9 deletions src/lib/components/state/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { StateImage } from "./StateImage";
export interface EmptyStateProps {
imageVariant?: ImageVariant;
imageWidth?: ImageProps["width"];
message: string;
message?: string;
heading?: string;
withBorder?: boolean;
my?: FlexProps["my"];
Expand Down Expand Up @@ -51,14 +51,16 @@ export const EmptyState = ({
{heading}
</Heading>
)}
<Text
color="text.dark"
textAlign="center"
whiteSpace="pre-wrap"
variant={textVariant}
>
{message}
</Text>
{message && (
<Text
color="text.dark"
textAlign="center"
whiteSpace="pre-wrap"
variant={textVariant}
>
{message}
</Text>
)}
{children}
</Flex>
);
59 changes: 59 additions & 0 deletions src/lib/pages/custom-network/constant.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import type { ChainConfig } from "@alleslabs/shared";

export const DEFAULT_WASM_CONFIG: ChainConfig["features"]["wasm"] = {
enabled: true,
storeCodeMaxFileSize: 1024 * 1024 * 2,
clearAdminGas: 1000000,
};

export const DEFAULT_MOVE_CONFIG: ChainConfig["features"]["move"] = {
enabled: true,
moduleMaxFileSize: 1024 * 1024,
};

export const DEFAULT_POOL_CONFIG: ChainConfig["features"]["pool"] = {
enabled: false,
};

export const DEFAULT_PUBLIC_PROJECT_CONFIG: ChainConfig["features"]["publicProject"] =
{
enabled: true,
};

export const DEFAULT_GOV_CONFIG: ChainConfig["features"]["gov"] = {
enabled: false,
};

export const DEFAULT_WALLET_CONFIG: ChainConfig["wallets"] = [
"initia",
"keplr",
];

export const DEFAULT_BECH32_PREFIX = "init";

export const DEFAULT_GAS = {
gasPrice: 0.15,
fixed_min_gas_price: 0.15,
low_gas_price: 0.15,
average_gas_price: 0.15,
high_gas_price: 0.15,
gasAdjustment: 1.5,
maxGasLimit: 25000000,
};

export const DEFAULT_SLIP44 = 118;

export const DEFAULT_DENOM = "umin";

export const DEFAULT_CUSTOM_MINITIA_NETWORK: Pick<
ChainConfig,
"tier" | "chain" | "network_type" | "extra"
> = {
tier: "sequencer",
chain: "initia",
network_type: "local",
extra: {
isValidatorExternalLink: null,
layer: "2",
},
};
11 changes: 3 additions & 8 deletions src/lib/pages/custom-network/json/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useLocalChainConfigStore } from "lib/providers/store";

export const AddNetworkJson = observer(() => {
const navigate = useInternalNavigate();
const { isChainIdExist, isPrettyNameExist } = useChainConfigs();
const { isChainIdExist } = useChainConfigs();
const { addLocalChainConfig } = useLocalChainConfigStore();
const [file, setFile] = useState<File | null>(null);
const [json, setJson] = useState<ChainConfig | null>(null);
Expand Down Expand Up @@ -63,10 +63,7 @@ export const AddNetworkJson = observer(() => {

setJson(validatedData);

if (
isChainIdExist(validatedData.chainId) ||
isPrettyNameExist(validatedData.prettyName)
) {
if (isChainIdExist(validatedData.chainId)) {
duplicatedModalOnOpen();

return;
Expand All @@ -84,10 +81,8 @@ export const AddNetworkJson = observer(() => {

if (isChainIdExist(json.chainId)) return json.chainId;

if (isPrettyNameExist(json.prettyName)) return json.prettyName;

return "";
}, [isChainIdExist, isPrettyNameExist, json]);
}, [isChainIdExist, json]);

return (
<>
Expand Down
Loading

0 comments on commit d044661

Please sign in to comment.