Skip to content

Fixes for release v2.1.0 #2772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configs/app/features/tac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const title = 'Ton Application Chain (TAC)';

const tonExplorerUrl = getEnvValue('NEXT_PUBLIC_TAC_TON_EXPLORER_URL');

const config: Feature<{ explorerUrl: string }> = (() => {
const config: Feature<{ tonExplorerUrl: string }> = (() => {
if (apis.tac && tonExplorerUrl) {
return Object.freeze({
title,
isEnabled: true,
explorerUrl: tonExplorerUrl,
tonExplorerUrl,
});
}

Expand Down
2 changes: 1 addition & 1 deletion configs/envs/.env.tac_turin
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=tac_turin"

NEXT_PUBLIC_TAC_OPERATION_LIFECYCLE_API_HOST=https://tac-operation-lifecycle.k8s-dev.blockscout.com
NEXT_PUBLIC_TAC_TON_EXPLORER_URL=https://testnet.tonscan.org
NEXT_PUBLIC_TAC_TON_EXPLORER_URL=https://testnet.tonviewer.com

# Local ENVs
NEXT_PUBLIC_APP_PROTOCOL=http
Expand Down
146 changes: 73 additions & 73 deletions docs/ENVS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,67 @@ All json-like values should be single-quoted. If it contains a hash (`#`) or a d
&nbsp;

## Table of contents
- [App configuration](ENVS.md#app-configuration)
- [Blockchain parameters](ENVS.md#blockchain-parameters)
- [API configuration](ENVS.md#api-configuration)
- [UI configuration](ENVS.md#ui-configuration)
- [Homepage](ENVS.md#homepage)
- [Navigation](ENVS.md#navigation)
- [Footer](ENVS.md#footer)
- [Favicon](ENVS.md#favicon)
- [Meta](ENVS.md#meta)
- [Views](ENVS.md#views)
- [Block](ENVS.md#block-views)
- [Address](ENVS.md#address-views)
- [Transaction](ENVS.md#transaction-views)
- [NFT](ENVS.md#nft-views)
- [Misc](ENVS.md#misc)
- [App features](ENVS.md#app-features)
- [My account](ENVS.md#my-account)
- [Gas tracker](ENVS.md#gas-tracker)
- [Advanced filter](ENVS.md#advanced-filter)
- [Address verification](ENVS.md#address-verification-in-my-account) in "My account"
- [Blockchain interaction](ENVS.md#blockchain-interaction-writing-to-contract-etc) (writing to contract, etc.)
- [Banner ads](ENVS.md#banner-ads)
- [Text ads](ENVS.md#text-ads)
- [Beacon chain](ENVS.md#beacon-chain)
- [User operations](ENVS.md#user-operations-erc-4337)
- [Rollup chain](ENVS.md#rollup-chain)
- [Export data to CSV file](ENVS.md#export-data-to-csv-file)
- [Google analytics](ENVS.md#google-analytics)
- [Mixpanel analytics](ENVS.md#mixpanel-analytics)
- [GrowthBook feature flagging and A/B testing](ENVS.md#growthbook-feature-flagging-and-ab-testing)
- [GraphQL API documentation](ENVS.md#graphql-api-documentation)
- [REST API documentation](ENVS.md#rest-api-documentation)
- [Marketplace](ENVS.md#marketplace)
- [Solidity to UML diagrams](ENVS.md#solidity-to-uml-diagrams)
- [Blockchain statistics](ENVS.md#blockchain-statistics)
- [Web3 wallet integration](ENVS.md#web3-wallet-integration-add-token-or-network-to-the-wallet) (add token or network to the wallet)
- [Transaction interpretation](ENVS.md#transaction-interpretation)
- [Verified tokens info](ENVS.md#verified-tokens-info)
- [Name service integration](ENVS.md#name-service-integration)
- [Metadata service integration](ENVS.md#metadata-service-integration)
- [Public tag submission](ENVS.md#public-tag-submission)
- [Data availability](ENVS.md#data-availability)
- [Bridged tokens](ENVS.md#bridged-tokens)
- [Safe{Core} address tags](ENVS.md#safecore-address-tags)
- [Address profile API](ENVS.md#address-profile-api)
- [Address XStar XHS score](ENVS.md#address-xstar-xhs-score)
- [SUAVE chain](ENVS.md#suave-chain)
- [Celo chain](ENVS.md#celo-chain)
- [Ton Application Chain (TAC)](ENVS.md#ton-application-chain-tac)
- [MetaSuites extension](ENVS.md#metasuites-extension)
- [Validators list](ENVS.md#validators-list)
- [Sentry error monitoring](ENVS.md#sentry-error-monitoring)
- [Rollbar error monitoring](ENVS.md#rollbar-error-monitoring)
- [OpenTelemetry](ENVS.md#opentelemetry)
- [DeFi dropdown](ENVS.md#defi-dropdown)
- [Multichain balance button](ENVS.md#multichain-balance-button)
- [Get gas button](ENVS.md#get-gas-button)
- [Save on gas with GasHawk](ENVS.md#save-on-gas-with-gashawk)
- [Rewards service API](ENVS.md#rewards-service-api)
- [DEX pools](ENVS.md#dex-pools)
- [3rd party services configuration](ENVS.md#external-services-configuration)
- [App configuration](#app-configuration)
- [Blockchain parameters](#blockchain-parameters)
- [API configuration](#api-configuration)
- [UI configuration](#ui-configuration)
- [Homepage](#homepage)
- [Navigation](#navigation)
- [Footer](#footer)
- [Favicon](#favicon)
- [Meta](#meta)
- [Views](#views)
- [Block](#block-views)
- [Address](#address-views)
- [Transaction](#transaction-views)
- [NFT](#nft-views)
- [Misc](#misc)
- [App features](#app-features)
- [My account](#my-account)
- [Gas tracker](#gas-tracker)
- [Advanced filter](#advanced-filter)
- [Address verification](#address-verification-in-my-account) in "My account"
- [Blockchain interaction](#blockchain-interaction-writing-to-contract-etc) (writing to contract, etc.)
- [Banner ads](#banner-ads)
- [Text ads](#text-ads)
- [Beacon chain](#beacon-chain)
- [User operations](#user-operations-erc-4337)
- [Rollup chain](#rollup-chain)
- [Export data to CSV file](#export-data-to-csv-file)
- [Google analytics](#google-analytics)
- [Mixpanel analytics](#mixpanel-analytics)
- [GrowthBook feature flagging and A/B testing](#growthbook-feature-flagging-and-ab-testing)
- [GraphQL API documentation](#graphql-api-documentation)
- [REST API documentation](#rest-api-documentation)
- [Marketplace](#marketplace)
- [Solidity to UML diagrams](#solidity-to-uml-diagrams)
- [Blockchain statistics](#blockchain-statistics)
- [Web3 wallet integration](#web3-wallet-integration-add-token-or-network-to-the-wallet) (add token or network to the wallet)
- [Transaction interpretation](#transaction-interpretation)
- [Verified tokens info](#verified-tokens-info)
- [Name service integration](#name-service-integration)
- [Metadata service integration](#metadata-service-integration)
- [Public tag submission](#public-tag-submission)
- [Data availability](#data-availability)
- [Bridged tokens](#bridged-tokens)
- [Safe{Core} address tags](#safecore-address-tags)
- [Address profile API](#address-profile-api)
- [Address XStar XHS score](#address-xstar-xhs-score)
- [SUAVE chain](#suave-chain)
- [Celo chain](#celo-chain)
- [Ton Application Chain (TAC)](#ton-application-chain-tac)
- [MetaSuites extension](#metasuites-extension)
- [Validators list](#validators-list)
- [Sentry error monitoring](#sentry-error-monitoring)
- [Rollbar error monitoring](#rollbar-error-monitoring)
- [OpenTelemetry](#opentelemetry)
- [DeFi dropdown](#defi-dropdown)
- [Multichain balance button](#multichain-balance-button)
- [Get gas button](#get-gas-button)
- [Save on gas with GasHawk](#save-on-gas-with-gashawk)
- [Rewards service API](#rewards-service-api)
- [DEX pools](#dex-pools)
- [3rd party services configuration](#external-services-configuration)

&nbsp;

Expand Down Expand Up @@ -369,7 +369,7 @@ Settings for meta tags, OG tags and SEO
| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| --- | --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED | `boolean` | Set to true if network has account feature | Required | - | `true` | v1.0.x+ |
| NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY | `boolean` | See [below](ENVS.md#google-recaptcha) | Required | - | `<your-secret>` | v1.0.x+ |
| NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY | `boolean` | See [below](#google-recaptcha) | Required | - | `<your-secret>` | v1.0.x+ |
| NEXT_PUBLIC_AUTH0_CLIENT_ID | `string` | **DEPRECATED** Client id for [Auth0](https://auth0.com/) provider | - | - | `<your-secret>` | v1.0.x+ |
| NEXT_PUBLIC_AUTH_URL | `string` | **DEPRECATED** Account auth base url; it is used for building login URL (`${ NEXT_PUBLIC_AUTH_URL }/auth/auth0`) and logout return URL (`${ NEXT_PUBLIC_AUTH_URL }/auth/logout`); if not provided the base app URL will be used instead | - | - | `https://blockscout.com` | v1.0.x+ |
| NEXT_PUBLIC_LOGOUT_URL | `string` | **DEPRECATED** Account logout url. Required if account is supported for the app instance. | - | - | `https://blockscoutcom.us.auth0.com/v2/logout` | v1.0.x+ |
Expand Down Expand Up @@ -399,7 +399,7 @@ This feature is **enabled by default**. To switch it off pass `NEXT_PUBLIC_ADVAN

### Address verification in "My account"

*Note* all ENV variables required for [My account](ENVS.md#my-account) feature should be passed alongside the following ones:
*Note* all ENV variables required for [My account](#my-account) feature should be passed alongside the following ones:

| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| --- | --- | --- | --- | --- | --- | --- |
Expand All @@ -413,12 +413,12 @@ This feature is **enabled by default**. To switch it off pass `NEXT_PUBLIC_ADVAN
| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| --- | --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID | `string` | Project id for [WalletConnect](https://cloud.walletconnect.com/) integration | Required | - | `<your-secret>` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_RPC_URL | `string` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | Required | - | `https://core.poa.network` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_NAME | `string` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | Required | - | `Gnosis Chain` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_ID | `number` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | Required | - | `99` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_CURRENCY_NAME | `string` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | Required | - | `Ether` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL | `string` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | Required | - | `ETH` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS | `string` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | - | `18` | `6` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_RPC_URL | `string` | See in [Blockchain parameters](#blockchain-parameters) section | Required | - | `https://core.poa.network` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_NAME | `string` | See in [Blockchain parameters](#blockchain-parameters) section | Required | - | `Gnosis Chain` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_ID | `number` | See in [Blockchain parameters](#blockchain-parameters) section | Required | - | `99` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_CURRENCY_NAME | `string` | See in [Blockchain parameters](#blockchain-parameters) section | Required | - | `Ether` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL | `string` | See in [Blockchain parameters](#blockchain-parameters) section | Required | - | `ETH` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS | `string` | See in [Blockchain parameters](#blockchain-parameters) section | - | `18` | `6` | v1.0.x+ |

&nbsp;

Expand Down Expand Up @@ -498,7 +498,7 @@ This feature is **enabled by default** with the `coinzilla` ads provider. To swi

| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| --- | --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY | `string` | See [below](ENVS.md#google-recaptcha) | true | - | `<your-secret>` | v1.0.x+ |
| NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY | `string` | See [below](#google-recaptcha) | true | - | `<your-secret>` | v1.0.x+ |

&nbsp;

Expand Down Expand Up @@ -555,7 +555,7 @@ This feature is **always enabled**, but you can disable it by passing `none` val
| NEXT_PUBLIC_ADMIN_SERVICE_API_HOST | `string` | Admin Service API endpoint url. Can be used instead of NEXT_PUBLIC_MARKETPLACE_CONFIG_URL | - | - | `https://admin-rs.services.blockscout.com` | v1.1.0+ |
| NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM | `string` | Link to form where authors can submit their dapps to the marketplace | Required | - | `https://airtable.com/shrqUAcjgGJ4jU88C` | v1.0.x+ |
| NEXT_PUBLIC_MARKETPLACE_SUGGEST_IDEAS_FORM | `string` | Link to form where users can suggest ideas for the marketplace | - | - | `https://airtable.com/appiy5yijZpMMSKjT/pag3t82DUCyhGRZZO/form` | v1.24.0+ |
| NEXT_PUBLIC_NETWORK_RPC_URL | `string` | See in [Blockchain parameters](ENVS.md#blockchain-parameters) section | Required | - | `https://core.poa.network` | v1.0.x+ |
| NEXT_PUBLIC_NETWORK_RPC_URL | `string` | See in [Blockchain parameters](#blockchain-parameters) section | Required | - | `https://core.poa.network` | v1.0.x+ |
| NEXT_PUBLIC_MARKETPLACE_CATEGORIES_URL | `string` | URL of configuration file (`.json` format only) which contains the list of categories to be displayed on the marketplace page in the specified order. If no URL is provided, then the list of categories will be compiled based on the `categories` fields from the marketplace (apps) configuration file | - | - | `https://example.com/marketplace_categories.json` | v1.23.0+ |
| NEXT_PUBLIC_MARKETPLACE_SECURITY_REPORTS_URL | `string` | URL of configuration file (`.json` format only) which contains app security reports for displaying security scores on the Marketplace page | - | - | `https://example.com/marketplace_security_reports.json` | v1.28.0+ |
| NEXT_PUBLIC_MARKETPLACE_FEATURED_APP | `string` | ID of the featured application to be displayed on the banner on the Marketplace page | - | - | `uniswap` | v1.29.0+ |
Expand Down Expand Up @@ -668,7 +668,7 @@ This feature allows you to submit an application with a public address tag.
| --- | --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_METADATA_SERVICE_API_HOST | `string` | Metadata Service API endpoint url | Required | - | `https://metadata.services.blockscout.com` | v1.30.0+ |
| NEXT_PUBLIC_ADMIN_SERVICE_API_HOST | `string` | Admin Service API endpoint url | Required | - | `https://admin-rs.services.blockscout.com` | v1.1.0+ |
| NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY | `string` | See [below](ENVS.md#google-recaptcha) | true | - | `<your-secret>` | v1.0.x+ |
| NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY | `string` | See [below](#google-recaptcha) | true | - | `<your-secret>` | v1.0.x+ |

&nbsp;

Expand Down Expand Up @@ -900,7 +900,7 @@ The feature enables a "Save with GasHawk" button next to the "Gas used" value on

### Rewards service API

This feature enables Blockscout Merits program. It requires that the [My account](ENVS.md#my-account) and [Blockchain interaction](ENVS.md#blockchain-interaction-writing-to-contract-etc) features are also enabled.
This feature enables Blockscout Merits program. It requires that the [My account](#my-account) and [Blockchain interaction](#blockchain-interaction-writing-to-contract-etc) features are also enabled.

| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| --- | --- | --- | --- | --- | --- | --- |
Expand Down
8 changes: 4 additions & 4 deletions lib/operations/tac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export function getTacOperationStatus(type: tac.OperationType) {
}

export function getTacOperationStage(data: tac.OperationDetails, txHash: string) {
const currentStep = data.status_history.find((step) => step.transactions.some((tx) => tx.hash.toLowerCase() === txHash.toLowerCase()));
if (!currentStep) {
return null;
const currentStep = data.status_history.filter((step) => step.transactions.some((tx) => tx.hash.toLowerCase() === txHash.toLowerCase()));
if (currentStep.length === 0) {
return;
}
return STATUS_LABELS[currentStep.type];
return currentStep.map((step) => STATUS_LABELS[step.type]);
}

export const STATUS_SEQUENCE: Array<tac.OperationStage_StageType> = [
Expand Down
2 changes: 1 addition & 1 deletion playwright/fixtures/mockEnvs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ export const ENVS_MAP: Record<string, Array<[string, string]>> = {
],
tac: [
[ 'NEXT_PUBLIC_TAC_OPERATION_LIFECYCLE_API_HOST', 'http://localhost:3100' ],
[ 'NEXT_PUBLIC_TAC_TON_EXPLORER_URL', 'https://testnet.tonscan.org' ],
[ 'NEXT_PUBLIC_TAC_TON_EXPLORER_URL', 'https://testnet.tonviewer.com' ],
],
};
3 changes: 2 additions & 1 deletion ui/pages/RewardsDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const RewardsDashboard = () => {

return (
<>
<Flex gap={ 3 } justifyContent="space-between">
<Flex gap={ 3 } justifyContent="space-between" mb={ 6 }>
<PageTitle
title="Dashboard"
secondRow={ (
Expand All @@ -58,6 +58,7 @@ const RewardsDashboard = () => {
to earn, spend, and learn more about the program.
</span>
) }
mb={ 0 }
/>
<AdBanner platform="mobile" w="fit-content" flexShrink={ 0 } borderRadius="md" overflow="hidden" display={{ base: 'none', lg: 'block ' }}/>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion ui/shared/entities/address/AddressEntityTacTon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const AddressEntityTacTon = (props: Props) => {
const href = (() => {
switch (props.chainType) {
case tac.BlockchainType.TON:
return tacFeature.explorerUrl + route({
return tacFeature.tonExplorerUrl + route({
pathname: '/address/[hash]',
query: {
...props.query,
Expand Down
2 changes: 1 addition & 1 deletion ui/shared/entities/tx/TxEntityTon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const TxEntityTon = (props: TxEntity.EntityProps) => {
}

const formattedHash = props.hash.replace(/^0x/, '');
const defaultHref = `${ stripTrailingSlash(tacFeature.explorerUrl) }/tx/${ formattedHash }`;
const defaultHref = `${ stripTrailingSlash(tacFeature.tonExplorerUrl) }/transaction/${ formattedHash }`;

return <TxEntity.default { ...props } hash={ formattedHash } href={ props.href ?? defaultHref } icon={{ name: 'brands/ton' }} isExternal/>;
};
Expand Down
6 changes: 3 additions & 3 deletions ui/tx/details/TxDetailsTacOperation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const TxDetailsTacOperation = ({ tacOperations, isLoading, txHash }: Props) => {
>
{ tacOperations.map((tacOperation) => {
const tags = [
getTacOperationStage(tacOperation, txHash),
...(getTacOperationStage(tacOperation, txHash) || []),
getTacOperationStatus(tacOperation.type),
];

Expand All @@ -46,8 +46,8 @@ const TxDetailsTacOperation = ({ tacOperations, isLoading, txHash }: Props) => {
isLoading={ isLoading }
/>
{ tags.length > 0 && (
<HStack flexShrink={ 0 }>
{ tags.map((tag) => <Tag key={ tag } loading={ isLoading }>{ tag }</Tag>) }
<HStack flexShrink={ 0 } flexWrap="wrap">
{ tags.map((tag) => <Tag key={ tag } loading={ isLoading } flexShrink={ 0 }>{ tag }</Tag>) }
</HStack>
) }
</HStack>
Expand Down
Loading