From 07ac452527db3500f0dbbc501fcbce955960a810 Mon Sep 17 00:00:00 2001 From: mootz12 Date: Wed, 22 May 2024 09:25:28 -0400 Subject: [PATCH 1/3] chore: add better pool details and link backstop token --- public/icons/pageicons/blnd_usdc_pair.svg | 1 + src/components/markets/MarketCardCollapse.tsx | 51 ++++++++++++++++--- src/pages/backstop-token.tsx | 28 +++++++++- 3 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 public/icons/pageicons/blnd_usdc_pair.svg diff --git a/public/icons/pageicons/blnd_usdc_pair.svg b/public/icons/pageicons/blnd_usdc_pair.svg new file mode 100644 index 00000000..4623b473 --- /dev/null +++ b/public/icons/pageicons/blnd_usdc_pair.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/markets/MarketCardCollapse.tsx b/src/components/markets/MarketCardCollapse.tsx index 1e9f082b..dd521ded 100644 --- a/src/components/markets/MarketCardCollapse.tsx +++ b/src/components/markets/MarketCardCollapse.tsx @@ -40,12 +40,7 @@ export const MarketCardCollapse: React.FC = ({ }} {...props} > - + = ({ + + = ({ + + window.open( + `${process.env.NEXT_PUBLIC_STELLAR_EXPERT_URL}/contract/${poolData.config.oracle}`, + '_blank' + ) + } + > + + + + + {`Admin ${toCompactAddress( + poolData.config.admin + )}`} + + + + + = ({ @@ -170,6 +202,11 @@ export const MarketCardCollapse: React.FC = ({ text={toPercentage(backstopPoolData.estimates.q4wPercentage)} sx={{ width: '50%', color: theme.palette.backstop.main }} /> + diff --git a/src/pages/backstop-token.tsx b/src/pages/backstop-token.tsx index cc22c8a5..1130534a 100644 --- a/src/pages/backstop-token.tsx +++ b/src/pages/backstop-token.tsx @@ -1,4 +1,5 @@ -import { Typography, useTheme } from '@mui/material'; +import OpenInNewIcon from '@mui/icons-material/OpenInNew'; +import { IconButton, Typography, useTheme } from '@mui/material'; import type { NextPage } from 'next'; import { BackstopExitAnvil } from '../components/backstop/BackstopExitAnvil'; import { BackstopJoinAnvil } from '../components/backstop/BackstopJoinAnvil'; @@ -37,11 +38,34 @@ const BackstopToken: NextPage = () => { } }; + const title = viewType === ViewType.MOBILE ? 'BLND-USDC LP' : '80:20 BLND-USDC Liquidity Pool'; + return ( <> - 80:20 BLND-USDC Liquidity Pool + + {title} + + window.open( + `${process.env.NEXT_PUBLIC_STELLAR_EXPERT_URL}/contract/${backstopData?.config?.backstopTkn}`, + '_blank' + ) + } + size="small" + sx={{ + marginLeft: '6px', + color: theme.palette.text.secondary, + }} + > + + From 97451a35b385145de23f4d119293b7c9d3343e18 Mon Sep 17 00:00:00 2001 From: mootz12 Date: Wed, 22 May 2024 13:40:44 -0400 Subject: [PATCH 2/3] chore: update button name to access backstop token management page --- src/pages/backstop.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/backstop.tsx b/src/pages/backstop.tsx index f7b28cab..521afea0 100644 --- a/src/pages/backstop.tsx +++ b/src/pages/backstop.tsx @@ -235,7 +235,7 @@ const Backstop: NextPage = () => { > - Get More + Manage Date: Thu, 23 May 2024 15:53:05 -0400 Subject: [PATCH 3/3] fix: link to correct account or contract endpoint for admin --- src/components/markets/MarketCardCollapse.tsx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/markets/MarketCardCollapse.tsx b/src/components/markets/MarketCardCollapse.tsx index dd521ded..4dd4d9fe 100644 --- a/src/components/markets/MarketCardCollapse.tsx +++ b/src/components/markets/MarketCardCollapse.tsx @@ -1,4 +1,5 @@ import { BackstopPool, Pool } from '@blend-capital/blend-sdk'; +import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettings'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import OpenInNewIcon from '@mui/icons-material/OpenInNew'; import { Box, BoxProps, Typography, useTheme } from '@mui/material'; @@ -120,15 +121,22 @@ export const MarketCardCollapse: React.FC = ({ color: theme.palette.text.secondary, cursor: 'default', }} - onClick={() => - window.open( - `${process.env.NEXT_PUBLIC_STELLAR_EXPERT_URL}/contract/${poolData.config.oracle}`, - '_blank' - ) - } + onClick={() => { + if (poolData.config.admin.charAt(0) === 'G') { + window.open( + `${process.env.NEXT_PUBLIC_STELLAR_EXPERT_URL}/account/${poolData.config.admin}`, + '_blank' + ); + } else { + window.open( + `${process.env.NEXT_PUBLIC_STELLAR_EXPERT_URL}/contract/${poolData.config.admin}`, + '_blank' + ); + } + }} > - - + + {`Admin ${toCompactAddress(