Skip to content

Commit

Permalink
update explorers
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsley-einstein committed Feb 10, 2025
1 parent ca5aa2c commit 6f229b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Modal/TransactionInfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import TXFailedImage from "@/assets/images/tx_failed.svg";
import TXSuccessImage from "@/assets/images/tx_success.svg";
import { __EXPLORERs__ } from "@/config/constants";
import {
cn,
Modal,
Expand All @@ -12,6 +13,7 @@ import {
import Image from "next/image";
import Link from "next/link";
import { FC } from "react";
import { useChainId } from "wagmi";
import { Button } from "../ui/button";

type Props = {
Expand All @@ -27,6 +29,7 @@ export const TransactionInfoModal: FC<Props> = ({
type = "success",
txHash,
}) => {
const chainId = useChainId();
return (
<Modal
isOpen={isOpen}
Expand Down Expand Up @@ -63,7 +66,7 @@ export const TransactionInfoModal: FC<Props> = ({

{txHash && (
<Link
href={`https://bartio.beratrail.io/tx/${txHash}`}
href={`${__EXPLORERs__[chainId]}/tx/${txHash}`}
target="_blank"
className="uppercase underline"
>
Expand Down
4 changes: 4 additions & 0 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export const __API_CHAIN_NAMES__ = {
[__CHAIN_IDS__.bera_testnet]: "bartio",
[__CHAIN_IDS__.bera]: "berachain",
};
export const __EXPLORERs__ = {
[__CHAIN_IDS__.bera_testnet]: "https://bartio.beratrail.io",
[__CHAIN_IDS__.bera]: "https://berascan.com",
};
export const __POOL__GRAPH__URLs__ = {
[__CHAIN_IDS__.bera_testnet]:
"api.goldsky.com/api/public/project_clws3jv71bgap01u93r59ccbm/subgraphs/moniswap-bartio-pools/v1.0.0/gn",
Expand Down

0 comments on commit 6f229b8

Please sign in to comment.