Commit 4bd43c93 authored by tom's avatar tom

change links to ton explorer

parent dd445832
...@@ -7,12 +7,12 @@ const title = 'Ton Application Chain (TAC)'; ...@@ -7,12 +7,12 @@ const title = 'Ton Application Chain (TAC)';
const tonExplorerUrl = getEnvValue('NEXT_PUBLIC_TAC_TON_EXPLORER_URL'); const tonExplorerUrl = getEnvValue('NEXT_PUBLIC_TAC_TON_EXPLORER_URL');
const config: Feature<{ explorerUrl: string }> = (() => { const config: Feature<{ tonExplorerUrl: string }> = (() => {
if (apis.tac && tonExplorerUrl) { if (apis.tac && tonExplorerUrl) {
return Object.freeze({ return Object.freeze({
title, title,
isEnabled: true, isEnabled: true,
explorerUrl: tonExplorerUrl, tonExplorerUrl,
}); });
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=tac_turin" # 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_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 # Local ENVs
NEXT_PUBLIC_APP_PROTOCOL=http NEXT_PUBLIC_APP_PROTOCOL=http
......
...@@ -107,6 +107,6 @@ export const ENVS_MAP: Record<string, Array<[string, string]>> = { ...@@ -107,6 +107,6 @@ export const ENVS_MAP: Record<string, Array<[string, string]>> = {
], ],
tac: [ tac: [
[ 'NEXT_PUBLIC_TAC_OPERATION_LIFECYCLE_API_HOST', 'http://localhost:3100' ], [ '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' ],
], ],
}; };
...@@ -23,7 +23,7 @@ const AddressEntityTacTon = (props: Props) => { ...@@ -23,7 +23,7 @@ const AddressEntityTacTon = (props: Props) => {
const href = (() => { const href = (() => {
switch (props.chainType) { switch (props.chainType) {
case tac.BlockchainType.TON: case tac.BlockchainType.TON:
return tacFeature.explorerUrl + route({ return tacFeature.tonExplorerUrl + route({
pathname: '/address/[hash]', pathname: '/address/[hash]',
query: { query: {
...props.query, ...props.query,
......
...@@ -14,7 +14,7 @@ const TxEntityTon = (props: TxEntity.EntityProps) => { ...@@ -14,7 +14,7 @@ const TxEntityTon = (props: TxEntity.EntityProps) => {
} }
const formattedHash = props.hash.replace(/^0x/, ''); 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/>; return <TxEntity.default { ...props } hash={ formattedHash } href={ props.href ?? defaultHref } icon={{ name: 'brands/ton' }} isExternal/>;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment