Skip to content

Commit

Permalink
fix: link to correct account or contract endpoint for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed May 23, 2024
1 parent 97451a3 commit 9dd33f6
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/components/markets/MarketCardCollapse.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -120,15 +121,22 @@ export const MarketCardCollapse: React.FC<MarketCardCollapseProps> = ({
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'
);
}
}}
>
<Box sx={{ margin: '6px', height: '30px' }}>
<Icon src={'/icons/blend_logo.svg'} alt="oracle-icon" isCircle={false} />
<Box sx={{ margin: '6px', height: '30px', width: '30px' }}>
<AdminPanelSettingsIcon sx={{ fontSize: 30 }} />
</Box>
<Box sx={{ padding: '6px', display: 'flex', flexDirection: 'row', height: '30px' }}>
<Box sx={{ paddingRight: '12px', lineHeight: '100%' }}>{`Admin ${toCompactAddress(
Expand Down

0 comments on commit 9dd33f6

Please sign in to comment.