diff --git a/CHANGELOG.md b/CHANGELOG.md index b51a7b856..ab08bb045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#277](https://github.com/alleslabs/celatone-frontend/pull/277) Wire up data for pool navigation page - [#275](https://github.com/alleslabs/celatone-frontend/pull/275) Add Pool navigation and pool detail data - [#270](https://github.com/alleslabs/celatone-frontend/pull/270) Add Pool navigation and detail page + +### Improvements + +- [#283](https://github.com/alleslabs/celatone-frontend/pull/283) Change unsupported token icon render logic + +### Bug fixes + +## v1.0.3 + +### Features + +- [#310](https://github.com/alleslabs/celatone-frontend/pull/310) Add amplitude for landing on the following pages - blocks, block detail, txs, network overview - [#268](https://github.com/alleslabs/celatone-frontend/pull/268) Wireup create proposal to whitelisting - [#266](https://github.com/alleslabs/celatone-frontend/pull/250) Add proposal whitelisting page - [#286](https://github.com/alleslabs/celatone-frontend/pull/286) Add block proposer @@ -68,7 +80,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improvements -- [#283](https://github.com/alleslabs/celatone-frontend/pull/283) Change unsupported token icon render logic +- [#309](https://github.com/alleslabs/celatone-frontend/pull/309) Add public account name and description in account detail page +- [#289](https://github.com/alleslabs/celatone-frontend/pull/289) Add public accounts to public projects +- [#308](https://github.com/alleslabs/celatone-frontend/pull/308) Adjust view more button to full width and fix empty state layout in contract history +- [#304](https://github.com/alleslabs/celatone-frontend/pull/304) Remove suffix for token card - [#282](https://github.com/alleslabs/celatone-frontend/pull/282) Change details page top section explorer link to copy link - [#293](https://github.com/alleslabs/celatone-frontend/pull/293) Add comma separator to pagination and total blocks - [#291](https://github.com/alleslabs/celatone-frontend/pull/291) Update tx count query @@ -87,6 +102,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug fixes +- [#306](https://github.com/alleslabs/celatone-frontend/pull/306) Fix react query function timeout and retries, minor ui bugs +- [#307](https://github.com/alleslabs/celatone-frontend/pull/307) Remove minor ui in account detail +- [#297](https://github.com/alleslabs/celatone-frontend/pull/297) Fix open new tab on tx modal link clicked +- [#303](https://github.com/alleslabs/celatone-frontend/pull/303) Fix pagination problem when using filter +- [#301](https://github.com/alleslabs/celatone-frontend/pull/301) Fix whitelist revalidation trigger +- [#305](https://github.com/alleslabs/celatone-frontend/pull/305) Fix UI avatar for validator not shown when encounter special chars +- [#302](https://github.com/alleslabs/celatone-frontend/pull/302) Fix token card width, text size for unsupported token button in account details page and tx count color when equal to zero +- [#300](https://github.com/alleslabs/celatone-frontend/pull/300) Fix search bar's placeholder text and remove separator in latest block height - [#290](https://github.com/alleslabs/celatone-frontend/pull/290) Fix spacing and styling in account detail - [#280](https://github.com/alleslabs/celatone-frontend/pull/280) Fix begin unlocking optional coins field causing crash - [#269](https://github.com/alleslabs/celatone-frontend/pull/269) Fix array value json string format and receipt row text color @@ -98,6 +121,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#241](https://github.com/alleslabs/celatone-frontend/pull/241) Fix NAToken size - [#244](https://github.com/alleslabs/celatone-frontend/pull/244) Fix json funds instantiate cannot edit - [#243](https://github.com/alleslabs/celatone-frontend/pull/243) Fix Json viewer and view more btn +- [#299](https://github.com/alleslabs/celatone-frontend/pull/299) Fix validator identity url ## v1.0.2 diff --git a/codegen.ts b/codegen.ts index e7b32b3d8..41900b584 100644 --- a/codegen.ts +++ b/codegen.ts @@ -1,7 +1,7 @@ import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { - schema: "https://osmosis-testnet-graphql2.alleslabs.dev/v1/graphql", + schema: "https://osmosis-testnet-graphql.alleslabs.dev/v1/graphql", documents: ["src/**/*.tsx", "src/**/*.ts"], ignoreNoDocuments: true, // for better experience with the watcher generates: { diff --git a/src/lib/app-fns/tx/clearAdmin.tsx b/src/lib/app-fns/tx/clearAdmin.tsx index 52e7656c2..2ffd2d9dc 100644 --- a/src/lib/app-fns/tx/clearAdmin.tsx +++ b/src/lib/app-fns/tx/clearAdmin.tsx @@ -52,7 +52,11 @@ export const clearAdminTx = ({ title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/common/catchTxError.tsx b/src/lib/app-fns/tx/common/catchTxError.tsx index 733dd2b9c..b5b945a4a 100644 --- a/src/lib/app-fns/tx/common/catchTxError.tsx +++ b/src/lib/app-fns/tx/common/catchTxError.tsx @@ -23,7 +23,7 @@ const getTxHashReceipt = (txHash?: string) => { title: "Tx Hash", value: txHash, - html: , + html: , }, ] : []; diff --git a/src/lib/app-fns/tx/common/post.tsx b/src/lib/app-fns/tx/common/post.tsx index 709d3c68f..bfebff1fd 100644 --- a/src/lib/app-fns/tx/common/post.tsx +++ b/src/lib/app-fns/tx/common/post.tsx @@ -33,7 +33,11 @@ export const postTx = ({ postFn }: PostTxParams) => { { title: "Tx Hash", html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/execute.tsx b/src/lib/app-fns/tx/execute.tsx index e9022f065..61d491f5f 100644 --- a/src/lib/app-fns/tx/execute.tsx +++ b/src/lib/app-fns/tx/execute.tsx @@ -70,7 +70,11 @@ export const executeContractTx = ({ title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/migrate.tsx b/src/lib/app-fns/tx/migrate.tsx index 839185045..98682c250 100644 --- a/src/lib/app-fns/tx/migrate.tsx +++ b/src/lib/app-fns/tx/migrate.tsx @@ -64,7 +64,11 @@ export const migrateContractTx = ({ title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/resend.tsx b/src/lib/app-fns/tx/resend.tsx index 78500ca71..a86bf0065 100644 --- a/src/lib/app-fns/tx/resend.tsx +++ b/src/lib/app-fns/tx/resend.tsx @@ -49,7 +49,11 @@ export const resendTx = ({ title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/submitProposal.tsx b/src/lib/app-fns/tx/submitProposal.tsx index 1837146f9..95c14a0d8 100644 --- a/src/lib/app-fns/tx/submitProposal.tsx +++ b/src/lib/app-fns/tx/submitProposal.tsx @@ -57,13 +57,19 @@ export const submitProposalTx = ({ { title: "Proposal ID", value: proposalId, - html: , + html: ( + + ), }, { title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/updateAdmin.tsx b/src/lib/app-fns/tx/updateAdmin.tsx index 1e31d979a..53d68afcd 100644 --- a/src/lib/app-fns/tx/updateAdmin.tsx +++ b/src/lib/app-fns/tx/updateAdmin.tsx @@ -58,7 +58,11 @@ export const updateAdminTx = ({ title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-fns/tx/upload.tsx b/src/lib/app-fns/tx/upload.tsx index 899206637..9a660485d 100644 --- a/src/lib/app-fns/tx/upload.tsx +++ b/src/lib/app-fns/tx/upload.tsx @@ -59,7 +59,11 @@ export const uploadContractTx = ({ value: txInfo.codeId, html: (
- +
), }, @@ -67,7 +71,11 @@ export const uploadContractTx = ({ title: "Tx Hash", value: txInfo.transactionHash, html: ( - + ), }, { diff --git a/src/lib/app-provider/hooks/useInternalNavigate.ts b/src/lib/app-provider/hooks/useInternalNavigate.ts index d36f0546e..d130d4978 100644 --- a/src/lib/app-provider/hooks/useInternalNavigate.ts +++ b/src/lib/app-provider/hooks/useInternalNavigate.ts @@ -3,7 +3,7 @@ import type { Router } from "next/router"; import type { ParsedUrlQueryInput } from "node:querystring"; import { useCallback } from "react"; -interface NavigationArgs { +export interface NavigationArgs { pathname: string; query?: ParsedUrlQueryInput; options?: Parameters["push"]>[2]; diff --git a/src/lib/app-provider/query-client/index.ts b/src/lib/app-provider/query-client/index.ts index 2b4359f9e..91d1b7b32 100644 --- a/src/lib/app-provider/query-client/index.ts +++ b/src/lib/app-provider/query-client/index.ts @@ -4,8 +4,8 @@ export const GRAPH_URL: Record = { /** * Revisit graphql for terra2 mainnet and osmosis mainnet */ - osmosis: "https://osmosis-mainnet-graphql2.alleslabs.dev/v1/graphql", - osmosistestnet: "https://osmosis-testnet-graphql2.alleslabs.dev/v1/graphql", + osmosis: "https://osmosis-mainnet-graphql.alleslabs.dev/v1/graphql", + osmosistestnet: "https://osmosis-testnet-graphql.alleslabs.dev/v1/graphql", terra2testnet: "https://terra-testnet-graphql.alleslabs.dev/v1/graphql", }; diff --git a/src/lib/components/CustomTab.tsx b/src/lib/components/CustomTab.tsx index 8739208f6..701ac5c87 100644 --- a/src/lib/components/CustomTab.tsx +++ b/src/lib/components/CustomTab.tsx @@ -19,7 +19,7 @@ export const CustomTab = ({ count, ...restProps }: CustomTabProps) => { fontWeight="700" lineHeight="24px" letterSpacing="0.4px" - variant="ghost" + variant="ghost-gray" color="text.dark" mb={0} sx={{ diff --git a/src/lib/components/ExplorerLink.tsx b/src/lib/components/ExplorerLink.tsx index f96a290c4..d63d0c089 100644 --- a/src/lib/components/ExplorerLink.tsx +++ b/src/lib/components/ExplorerLink.tsx @@ -7,7 +7,9 @@ import { getExplorerValidatorUrl, } from "lib/app-fns/explorer"; import type { AddressReturnType } from "lib/app-provider"; +import { useCurrentNetwork } from "lib/app-provider/hooks/useCurrentNetwork"; import { AmpTrackMintscan } from "lib/services/amplitude"; +import type { Option } from "lib/types"; import { truncate } from "lib/utils"; import { AppLink } from "./AppLink"; @@ -30,6 +32,7 @@ interface ExplorerLinkProps extends BoxProps { maxWidth?: string; textVariant?: TextProps["variant"]; ampCopierSection?: string; + openNewTab?: boolean; } const getNavigationUrl = ( @@ -93,6 +96,7 @@ const LinkRender = ({ isEllipsis, maxWidth, textVariant, + openNewTab, }: { type: string; isInternal: boolean; @@ -101,7 +105,9 @@ const LinkRender = ({ isEllipsis: boolean; maxWidth: ExplorerLinkProps["maxWidth"]; textVariant: TextProps["variant"]; + openNewTab: Option; }) => { + const { network } = useCurrentNetwork(); const textElement = ( ); - return isInternal ? ( + return isInternal && !openNewTab ? ( e.stopPropagation()}> {textElement} ) : ( { const { address, currentChainName } = useWallet(); @@ -189,6 +196,7 @@ export const ExplorerLink = ({ isEllipsis={textFormat === "ellipsis"} maxWidth={maxWidth} textVariant={textVariant} + openNewTab={openNewTab} /> ( - + {label} diff --git a/src/lib/components/TokenCard.tsx b/src/lib/components/TokenCard.tsx index a185f2f2f..4cfd0ce58 100644 --- a/src/lib/components/TokenCard.tsx +++ b/src/lib/components/TokenCard.tsx @@ -80,7 +80,7 @@ export const TokenCard = ({ - {formatUTokenWithPrecision(amount as U, precision)} + {formatUTokenWithPrecision(amount as U, precision, false)} {price diff --git a/src/lib/components/ValidatorBadge.tsx b/src/lib/components/ValidatorBadge.tsx index 3aea2c360..c2463cb5e 100644 --- a/src/lib/components/ValidatorBadge.tsx +++ b/src/lib/components/ValidatorBadge.tsx @@ -5,6 +5,7 @@ import { useWallet } from "@cosmos-kit/react"; import { getChainApiPath } from "env"; import { ExplorerLink } from "lib/components/ExplorerLink"; import type { ValidatorInfo } from "lib/types"; +import { removeSpecialChars } from "lib/utils"; interface ValidatorBadgeProps { validator: ValidatorInfo | null; @@ -42,11 +43,11 @@ export const ValidatorBadge = ({ boxSize={badgeSize} src={`https://raw.githubusercontent.com/cosmostation/chainlist/master/chain/${getChainApiPath( currentChainName - )}/${validator.validatorAddress}.png`} + )}/moniker/${validator.validatorAddress}.png`} alt={validator.moniker} - fallbackSrc={`https://ui-avatars.com/api/?name=${ + fallbackSrc={`https://ui-avatars.com/api/?name=${removeSpecialChars( validator.moniker ?? "" - }&background=9793F3&color=fff`} + )}&background=9793F3&color=fff`} borderRadius="50%" /> ( ); diff --git a/src/lib/components/table/codes/MySavedCodesTable.tsx b/src/lib/components/table/codes/MySavedCodesTable.tsx index 3987a66e6..4d4d11a4a 100644 --- a/src/lib/components/table/codes/MySavedCodesTable.tsx +++ b/src/lib/components/table/codes/MySavedCodesTable.tsx @@ -27,7 +27,6 @@ export const MySavedCodesTable = ({ } onRowSelect={onRowSelect} diff --git a/src/lib/components/table/contracts/ContractsTableRowCTA.tsx b/src/lib/components/table/contracts/ContractsTableRowCTA.tsx index aef7eb2a9..83b7183c8 100644 --- a/src/lib/components/table/contracts/ContractsTableRowCTA.tsx +++ b/src/lib/components/table/contracts/ContractsTableRowCTA.tsx @@ -165,7 +165,7 @@ export const ContractsTableRowCTA = ({ {formatUTC(contractInfo.latestUpdated)} - + {`(${dateFromNow(contractInfo.latestUpdated)})`} diff --git a/src/lib/components/table/tableComponents.ts b/src/lib/components/table/tableComponents.ts index da64c2616..96db4acd6 100644 --- a/src/lib/components/table/tableComponents.ts +++ b/src/lib/components/table/tableComponents.ts @@ -6,7 +6,7 @@ export const TableContainer = chakra(Flex, { overflowX: "scroll", flexDir: "column", w: "full", - pb: 6, + pb: 0, }, }); diff --git a/src/lib/gql/gql.ts b/src/lib/gql/gql.ts index f8c6b8710..abaad1376 100644 --- a/src/lib/gql/gql.ts +++ b/src/lib/gql/gql.ts @@ -3,6 +3,8 @@ import * as types from "./graphql"; import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core"; const documents = { + "\n query getAccountIdByAddressQueryDocument($address: String!) {\n accounts_by_pk(address: $address) {\n id\n }\n }\n": + types.GetAccountIdByAddressQueryDocumentDocument, "\n query getBlockTimestampByHeightQuery($height: Int!) {\n blocks_by_pk(height: $height) {\n timestamp\n }\n }\n": types.GetBlockTimestampByHeightQueryDocument, "\n query getBlockListQuery($limit: Int!, $offset: Int!) {\n blocks(limit: $limit, offset: $offset, order_by: { height: desc }) {\n hash\n height\n timestamp\n transactions_aggregate {\n aggregate {\n count\n }\n }\n validator {\n moniker\n operator_address\n }\n }\n }\n": @@ -89,6 +91,9 @@ const documents = { types.GetBlockTransactionCountByHeightQueryDocument, }; +export function graphql( + source: "\n query getAccountIdByAddressQueryDocument($address: String!) {\n accounts_by_pk(address: $address) {\n id\n }\n }\n" +): typeof documents["\n query getAccountIdByAddressQueryDocument($address: String!) {\n accounts_by_pk(address: $address) {\n id\n }\n }\n"]; export function graphql( source: "\n query getBlockTimestampByHeightQuery($height: Int!) {\n blocks_by_pk(height: $height) {\n timestamp\n }\n }\n" ): typeof documents["\n query getBlockTimestampByHeightQuery($height: Int!) {\n blocks_by_pk(height: $height) {\n timestamp\n }\n }\n"]; diff --git a/src/lib/gql/graphql.ts b/src/lib/gql/graphql.ts index 254e94061..47ab55bf8 100644 --- a/src/lib/gql/graphql.ts +++ b/src/lib/gql/graphql.ts @@ -11738,8 +11738,6 @@ export type Validators_Bool_Exp = { export enum Validators_Constraint { /** unique or primary key constraint on columns "account_id" */ ValidatorsAccountIdKey = "validators_account_id_key", - /** unique or primary key constraint on columns "consensus_address" */ - ValidatorsConsensusAddressKey = "validators_consensus_address_key", /** unique or primary key constraint on columns "id" */ ValidatorsIdKey = "validators_id_key", /** unique or primary key constraint on columns "operator_address" */ @@ -12098,6 +12096,15 @@ export type Validators_Variance_Order_By = { id?: InputMaybe; }; +export type GetAccountIdByAddressQueryDocumentQueryVariables = Exact<{ + address: Scalars["String"]; +}>; + +export type GetAccountIdByAddressQueryDocumentQuery = { + __typename?: "query_root"; + accounts_by_pk?: { __typename?: "accounts"; id: number } | null; +}; + export type GetBlockTimestampByHeightQueryQueryVariables = Exact<{ height: Scalars["Int"]; }>; @@ -12888,6 +12895,60 @@ export type GetBlockTransactionCountByHeightQueryQuery = { }; }; +export const GetAccountIdByAddressQueryDocumentDocument = { + kind: "Document", + definitions: [ + { + kind: "OperationDefinition", + operation: "query", + name: { kind: "Name", value: "getAccountIdByAddressQueryDocument" }, + variableDefinitions: [ + { + kind: "VariableDefinition", + variable: { + kind: "Variable", + name: { kind: "Name", value: "address" }, + }, + type: { + kind: "NonNullType", + type: { + kind: "NamedType", + name: { kind: "Name", value: "String" }, + }, + }, + }, + ], + selectionSet: { + kind: "SelectionSet", + selections: [ + { + kind: "Field", + name: { kind: "Name", value: "accounts_by_pk" }, + arguments: [ + { + kind: "Argument", + name: { kind: "Name", value: "address" }, + value: { + kind: "Variable", + name: { kind: "Name", value: "address" }, + }, + }, + ], + selectionSet: { + kind: "SelectionSet", + selections: [ + { kind: "Field", name: { kind: "Name", value: "id" } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetAccountIdByAddressQueryDocumentQuery, + GetAccountIdByAddressQueryDocumentQueryVariables +>; export const GetBlockTimestampByHeightQueryDocument = { kind: "Document", definitions: [ diff --git a/src/lib/layout/Footer.tsx b/src/lib/layout/Footer.tsx index db065f88c..6ceee8e59 100644 --- a/src/lib/layout/Footer.tsx +++ b/src/lib/layout/Footer.tsx @@ -63,7 +63,7 @@ const Footer = () => ( rel="noopener noreferrer" onClick={() => AmpTrack(AmpEvent.FEEDBACK)} > -