diff --git a/apps/renderer/src/lib/utils.ts b/apps/renderer/src/lib/utils.ts index 64769e395..d24ad59fb 100644 --- a/apps/renderer/src/lib/utils.ts +++ b/apps/renderer/src/lib/utils.ts @@ -313,3 +313,13 @@ export const getLevelMultiplier = (level: number) => { return (poolMultiplier / rangeMultiplier).toFixed(0) } + +export const getBlockchainExplorerUrl = () => { + const serverConfigs = getServerConfigs() + + if (serverConfigs?.IS_RSS3_TESTNET) { + return `https://scan.testnet.rss3.io` + } else { + return `https://scan.rss3.io` + } +} diff --git a/apps/renderer/src/modules/power/my-wallet-section/index.tsx b/apps/renderer/src/modules/power/my-wallet-section/index.tsx index 2beda5ea2..c7f8db012 100644 --- a/apps/renderer/src/modules/power/my-wallet-section/index.tsx +++ b/apps/renderer/src/modules/power/my-wallet-section/index.tsx @@ -8,7 +8,7 @@ import { Divider } from "~/components/ui/divider" import { LoadingWithIcon } from "~/components/ui/loading" import { Tooltip, TooltipContent, TooltipPortal, TooltipTrigger } from "~/components/ui/tooltip" import { apiClient } from "~/lib/api-fetch" -import { cn } from "~/lib/utils" +import { cn, getBlockchainExplorerUrl } from "~/lib/utils" import { SettingSectionTitle } from "~/modules/settings/section" import { ActivityPoints } from "~/modules/wallet/activity-points" import { Balance } from "~/modules/wallet/balance" @@ -66,7 +66,7 @@ export const MyWalletSection = () => { ), @@ -76,7 +76,7 @@ export const MyWalletSection = () => {
diff --git a/apps/renderer/src/modules/power/transaction-section/index.tsx b/apps/renderer/src/modules/power/transaction-section/index.tsx index d25ad9f0f..dda1695d2 100644 --- a/apps/renderer/src/modules/power/transaction-section/index.tsx +++ b/apps/renderer/src/modules/power/transaction-section/index.tsx @@ -19,7 +19,7 @@ import { Tabs, TabsList, TabsTrigger } from "~/components/ui/tabs" import { Tooltip, TooltipContent, TooltipPortal, TooltipTrigger } from "~/components/ui/tooltip" import { EllipsisHorizontalTextWithTooltip } from "~/components/ui/typography" import { replaceImgUrlIfNeed } from "~/lib/img-proxy" -import { cn } from "~/lib/utils" +import { cn, getBlockchainExplorerUrl } from "~/lib/utils" import { TransactionTypes } from "~/models/types" import { usePresentUserProfileModal } from "~/modules/profile/hooks" import { SettingSectionTitle } from "~/modules/settings/section" @@ -103,7 +103,7 @@ export const TransactionsSection: Component = ({ className }) => { {row.hash.slice(0, 10)}... @@ -122,7 +122,7 @@ export const TransactionsSection: Component = ({ className }) => { {!!transactions.data?.length && ( {t("wallet.transactions.more")} diff --git a/packages/shared/src/hono.ts b/packages/shared/src/hono.ts index c54b2498c..8448dca6f 100644 --- a/packages/shared/src/hono.ts +++ b/packages/shared/src/hono.ts @@ -4454,6 +4454,7 @@ declare const _routes: hono_hono_base.HonoBase