diff --git a/src/pages/trade/ui/chart.tsx b/src/pages/trade/ui/chart.tsx
index bf626b00..76c13ee4 100644
--- a/src/pages/trade/ui/chart.tsx
+++ b/src/pages/trade/ui/chart.tsx
@@ -7,6 +7,7 @@ import { useCandles } from '../api/candles';
import { observer } from 'mobx-react-lite';
import { DurationWindow, durationWindows } from '@/shared/utils/duration.ts';
import { CandleWithVolume } from '@/shared/api/server/candles/utils';
+import { BlockchainError } from '@/shared/ui/blockchain-error';
const ChartLoadingState = () => {
return (
@@ -260,7 +261,13 @@ export const Chart = observer(() => {
))}
- {error &&
Error loading pair selector: ${String(error)}
}
+ {error && (
+
+
+ console.log('Details clicked')} />
+
+
+ )}
{isLoading &&
}
diff --git a/src/pages/trade/ui/summary.tsx b/src/pages/trade/ui/summary.tsx
index 6779ba2a..0cec209e 100644
--- a/src/pages/trade/ui/summary.tsx
+++ b/src/pages/trade/ui/summary.tsx
@@ -8,6 +8,7 @@ import { ValueViewComponent } from '@penumbra-zone/ui/ValueView';
import { round } from '@penumbra-zone/types/round';
import { Density } from '@penumbra-zone/ui/Density';
import { SummaryData } from '@/shared/api/server/summary/types.ts';
+import { BlockchainError } from '@/shared/ui/blockchain-error';
const SummaryCard = ({
title,
@@ -49,9 +50,7 @@ export const Summary = () => {
if (error) {
return (
-
- {String(error)}
-
+
);
}
@@ -95,7 +94,7 @@ export const Summary = () => {
{data && 'directVolume' in data ? (
-
+
) : (
diff --git a/src/shared/ui/blockchain-error.tsx b/src/shared/ui/blockchain-error.tsx
new file mode 100644
index 00000000..cd4bf51e
--- /dev/null
+++ b/src/shared/ui/blockchain-error.tsx
@@ -0,0 +1,26 @@
+import { Ban } from 'lucide-react';
+import { Button } from '@penumbra-zone/ui/Button';
+import { Density } from '@penumbra-zone/ui/Density';
+import { Text } from '@penumbra-zone/ui/Text';
+
+interface BlockchainErrorProps {
+ message?: string;
+ onDetailsClick?: () => void;
+}
+
+export function BlockchainError({
+ message = 'An error occurred when loading data from the blockchain',
+ onDetailsClick,
+}: BlockchainErrorProps) {
+ return (
+
+
+
+
+ {message}
+
+
+
+
+ );
+}