Updating Talisman
diff --git a/apps/extension/src/@talisman/components/ErrorBoundary.tsx b/apps/extension/src/@talisman/components/TalismanErrorBoundary.tsx
similarity index 60%
rename from apps/extension/src/@talisman/components/ErrorBoundary.tsx
rename to apps/extension/src/@talisman/components/TalismanErrorBoundary.tsx
index 76c8d1b0ae..b551d4e279 100644
--- a/apps/extension/src/@talisman/components/ErrorBoundary.tsx
+++ b/apps/extension/src/@talisman/components/TalismanErrorBoundary.tsx
@@ -1,43 +1,52 @@
import { ErrorBoundary as SentryErrorBoundary } from "@sentry/react"
import { TalismanDeadHandIcon } from "@talismn/icons"
import { DexieError } from "dexie"
-import { FC, ReactNode, useCallback } from "react"
+import { ReactNode, useCallback } from "react"
import { Button } from "talisman-ui"
import { DEBUG, DISCORD_TALISMAN_URL } from "@extension/shared"
-const ErrorMessage: FC<{ error: unknown }> = ({ error }) => {
+export const TalismanErrorBoundary = ({ children }: { children?: ReactNode }) => (
+
{children}
+)
+
+function ErrorMessage({ error, eventId }: { error: unknown; eventId?: string }) {
const isDbVersionError = (error as DexieError)?.inner?.name === "VersionError"
const canClearDatabases = DEBUG && isDbVersionError
const errorMessage = isDbVersionError
- ? "Invalid database version."
- : "Sorry, an error occurred in Talisman."
+ ? "Invalid database version"
+ : "Sorry, an error occurred in Talisman"
const clearDatabases = useCallback(() => {
indexedDB.deleteDatabase("Talisman")
indexedDB.deleteDatabase("TalismanBalances")
indexedDB.deleteDatabase("TalismanChaindata")
indexedDB.deleteDatabase("TalismanConnectionMeta")
- alert("Databases cleared. Please click OK for Talisman to reinitialise.")
+ alert("Databases cleared. Please click OK for Talisman to reinitialise")
chrome.runtime.reload()
}, [])
return (
@@ -54,11 +63,3 @@ const ErrorMessage: FC<{ error: unknown }> = ({ error }) => {
)
}
-
-export const ErrorBoundary = ({ children }: { children?: ReactNode }) => {
- return (
-
}>
- {children}
-
- )
-}
diff --git a/apps/extension/src/ui/apps/popup/Layout/PopupLayout.tsx b/apps/extension/src/ui/apps/popup/Layout/PopupLayout.tsx
index b3d5397d65..884f3575be 100644
--- a/apps/extension/src/ui/apps/popup/Layout/PopupLayout.tsx
+++ b/apps/extension/src/ui/apps/popup/Layout/PopupLayout.tsx
@@ -10,8 +10,8 @@ import {
} from "react"
import { useLocation } from "react-router-dom"
-import { ErrorBoundary } from "@talisman/components/ErrorBoundary"
import { ScrollContainer } from "@talisman/components/ScrollContainer"
+import { TalismanErrorBoundary } from "@talisman/components/TalismanErrorBoundary"
import { HandMonoLogo } from "@talisman/theme/logos"
import { api } from "@ui/api"
@@ -89,7 +89,7 @@ export const PopupLayout: FC
= ({ className, children, ...props
{...props}
className={classNames("relative flex h-full w-full flex-col overflow-hidden", className)}
>
- {children}
+ {children}
)
}
diff --git a/apps/extension/src/ui/apps/popup/pages/Portfolio/index.tsx b/apps/extension/src/ui/apps/popup/pages/Portfolio/index.tsx
index e6ce7580d4..1d7aee7236 100644
--- a/apps/extension/src/ui/apps/popup/pages/Portfolio/index.tsx
+++ b/apps/extension/src/ui/apps/popup/pages/Portfolio/index.tsx
@@ -1,10 +1,10 @@
-import { ErrorBoundary } from "@sentry/react"
import { classNames } from "@talismn/util"
import { FC, PropsWithChildren, Suspense, useEffect, useRef } from "react"
import { Route, Routes, useLocation } from "react-router-dom"
import { ScrollContainer } from "@talisman/components/ScrollContainer"
import { SuspenseTracker } from "@talisman/components/SuspenseTracker"
+import { TalismanErrorBoundary } from "@talisman/components/TalismanErrorBoundary"
import { PortfolioContainer } from "@ui/domains/Portfolio/PortfolioContainer"
import BraveWarningPopupBanner from "@ui/domains/Settings/BraveWarning/BraveWarningPopupBanner"
import MigratePasswordAlert from "@ui/domains/Settings/MigratePasswordAlert"
@@ -51,7 +51,7 @@ const Content: FC = ({ children }) => {
export const Portfolio = () => (
-
+
@@ -59,7 +59,7 @@ export const Portfolio = () => (
-
+
)
diff --git a/apps/extension/src/ui/index.tsx b/apps/extension/src/ui/index.tsx
index 6a4d8ceea3..8944dc4e02 100644
--- a/apps/extension/src/ui/index.tsx
+++ b/apps/extension/src/ui/index.tsx
@@ -2,15 +2,15 @@ import "@talisman/theme/styles.css"
import { Subscribe } from "@react-rxjs/core"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
-import React, { ReactNode, Suspense } from "react"
+import { ReactNode, StrictMode, Suspense } from "react"
import { createRoot } from "react-dom/client"
import { HashRouter } from "react-router-dom"
import { FontFamily, preloadFonts } from "talisman-ui"
-import { ErrorBoundary } from "@talisman/components/ErrorBoundary"
import { ErrorBoundaryDatabaseMigration } from "@talisman/components/ErrorBoundaryDatabaseMigration"
import { NotificationsContainer } from "@talisman/components/Notifications/NotificationsContainer"
import { SuspenseTracker } from "@talisman/components/SuspenseTracker"
+import { TalismanErrorBoundary } from "@talisman/components/TalismanErrorBoundary"
import { useKeepBackgroundOpen } from "@ui/hooks/useKeepBackgroundOpen"
import { KeepWalletUnlockedMode, useKeepWalletUnlocked } from "@ui/hooks/useKeepWalletUnlocked"
@@ -50,8 +50,8 @@ export const renderTalisman = (
if (!container) throw new Error("#root element not found.")
const root = createRoot(container)
root.render(
-
-
+
+
}>
@@ -64,7 +64,7 @@ export const renderTalisman = (
-
- ,
+
+ ,
)
}
diff --git a/packages/icons/src/icons/talisman-dead-hand.svg b/packages/icons/src/icons/talisman-dead-hand.svg
index 3e67af75b6..9bc242073d 100644
--- a/packages/icons/src/icons/talisman-dead-hand.svg
+++ b/packages/icons/src/icons/talisman-dead-hand.svg
@@ -1,4 +1,16 @@
-
-