From d4ea78d2ca1f7921ed7a6778d0fa49219125e6ca Mon Sep 17 00:00:00 2001 From: Evan Gray Date: Wed, 20 Oct 2021 13:04:31 -0400 Subject: [PATCH] bridge_ui: tvl sort and force match error Change-Id: Iddb15929c21b8333214cbef947536958b6a76441 --- .../src/components/SolanaCreateAssociatedAddress.tsx | 9 +++++++++ bridge_ui/src/components/Stats/index.tsx | 2 ++ .../components/Stats/tableComponents/MuiReactTable.jsx | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bridge_ui/src/components/SolanaCreateAssociatedAddress.tsx b/bridge_ui/src/components/SolanaCreateAssociatedAddress.tsx index 6fe8eb5a..5692c30a 100644 --- a/bridge_ui/src/components/SolanaCreateAssociatedAddress.tsx +++ b/bridge_ui/src/components/SolanaCreateAssociatedAddress.tsx @@ -263,6 +263,15 @@ export function SolanaCreateAssociatedAddressAlternate() { content: {parseError(e)}, }); } + } else { + enqueueSnackbar(null, { + content: ( + + Derived address does not match the target address. Do you have the + same wallet connected? + + ), + }); } })(); }, [ diff --git a/bridge_ui/src/components/Stats/index.tsx b/bridge_ui/src/components/Stats/index.tsx index 8eb6a6ad..cd71e31d 100644 --- a/bridge_ui/src/components/Stats/index.tsx +++ b/bridge_ui/src/components/Stats/index.tsx @@ -142,6 +142,7 @@ const StatsRoot: React.FC = () => { }, { Header: "Total Value (USD)", + id: "totalValue", accessor: "totalValue", align: "right", disableGroupBy: true, @@ -235,6 +236,7 @@ const StatsRoot: React.FC = () => { columns={tvlColumns} data={tvl.data} skipPageReset={false} + initialState={{ sortBy: [{ id: "totalValue", desc: true }] }} /> )} diff --git a/bridge_ui/src/components/Stats/tableComponents/MuiReactTable.jsx b/bridge_ui/src/components/Stats/tableComponents/MuiReactTable.jsx index 36dce925..e5de006b 100644 --- a/bridge_ui/src/components/Stats/tableComponents/MuiReactTable.jsx +++ b/bridge_ui/src/components/Stats/tableComponents/MuiReactTable.jsx @@ -28,7 +28,7 @@ const stopProp = (e) => { e.stopPropagation(); }; -const EnhancedTable = ({ columns, data, skipPageReset }) => { +const EnhancedTable = ({ columns, data, skipPageReset, initialState = {} }) => { const { getTableProps, headerGroups, @@ -43,6 +43,7 @@ const EnhancedTable = ({ columns, data, skipPageReset }) => { columns, data, autoResetPage: !skipPageReset, + initialState, }, useGlobalFilter, useGroupBy,