- * {isWalletConnected ? (
- * <>
- *
Connected to: {address}
- *
Balance: {balance?.formatted} {balance?.symbol}
- *
- *
- * >
- * ) : (
- *
Wallet not connected
- * )}
- *
- * );
- * ```
- */
-export const useWeb3Status = () => {
- const {
- address,
- chainId: walletChainId,
- isConnected: isWalletConnected,
- isConnecting: connectingWallet,
- } = useAccount()
- const appChainId = useChainId() as ChainsIds
- const { isPending: switchingChain, switchChain } = useSwitchChain()
- const readOnlyClient = usePublicClient()
- const { data: walletClient } = useWalletClient()
- const { data: balance } = useBalance()
- const { disconnect } = useDisconnect()
-
- const isWalletSynced = isWalletConnected && walletChainId === appChainId
-
- const appWeb3Status: AppWeb3Status = {
- readOnlyClient,
- appChainId,
- }
-
- const walletWeb3Status: WalletWeb3Status = {
- address,
- balance,
- isWalletConnected,
- connectingWallet,
- switchingChain,
- walletClient,
- isWalletSynced,
- walletChainId,
- }
-
- const web3Actions: Web3Actions = {
- switchChain: (chainId: number = chains[0].id) => switchChain({ chainId }), // default to the first chain in the config
- disconnect: disconnect,
- }
-
- const web3Connection: Web3Status = {
- ...appWeb3Status,
- ...walletWeb3Status,
- ...web3Actions,
- }
-
- return web3Connection
-}
diff --git a/src/main.tsx b/src/main.tsx
index a246ed66..c15a44ca 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -2,6 +2,13 @@ import { createRouter, RouterProvider } from '@tanstack/react-router'
import { StrictMode } from 'react'
import ReactDOM from 'react-dom/client'
+// BigInt is not serializable by JSON.stringify. React 19 dev mode tries to serialize
+// component props for dev tools logging, which crashes when props contain BigInt values
+// (e.g., TransactionParams with value: parseEther('0.1')). This polyfill prevents the crash.
+;(BigInt.prototype as unknown as { toJSON: () => string }).toJSON = function () {
+ return this.toString()
+}
+
import NotFound404 from '@/src/components/pageComponents/NotFound404'
import { routeTree } from '@/src/routeTree.gen'
import { printAppInfo } from '@/src/utils/printAppInfo'
diff --git a/src/providers/TransactionNotificationProvider.tsx b/src/providers/TransactionNotificationProvider.tsx
deleted file mode 100644
index debaa4b5..00000000
--- a/src/providers/TransactionNotificationProvider.tsx
+++ /dev/null
@@ -1,237 +0,0 @@
-import { createContext, type FC, type PropsWithChildren, type ReactNode, useContext } from 'react'
-import type {
- Hash,
- ReplacementReturnType,
- SignMessageErrorType,
- TransactionExecutionError,
-} from 'viem'
-import { ExplorerLink } from '@/src/components/sharedComponents/ExplorerLink'
-import {
- NotificationToast,
- notificationToaster,
-} from '@/src/components/sharedComponents/NotificationToast'
-import { useWeb3Status } from '@/src/hooks/useWeb3Status'
-
-type WatchSignatureArgs = {
- successMessage?: string
- message: ReactNode | string
- signaturePromise: Promise