Skip to content

Commit

Permalink
fix transaction hash href
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Sep 24, 2023
1 parent ec4bb1f commit d65c803
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/apps/src/components/transaction-hash.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Network } from "@/types/chain";
import CopyIcon from "@/ui/copy-icon";
import { getChainConfig } from "@/utils/chain";
import path from "path";

interface Props {
chain?: Network | null;
Expand All @@ -16,7 +15,7 @@ export function TransactionHash({ chain, txHash }: Props) {
{chainConfig?.blockExplorers ? (
<a
className="text-primary text-sm font-normal transition hover:underline"
href={path.join(chainConfig.blockExplorers.default.url, "tx", txHash)}
href={new URL(`tx/${txHash}`, chainConfig.blockExplorers.default.url).href}
rel="noopener noreferrer"
target="_blank"
>
Expand Down

0 comments on commit d65c803

Please sign in to comment.