Skip to content

Commit aa250ed

Browse files
authored
feat: add interest rate strategy link (#1124)
* feat: add link to interest rate strategy * fix: remove unnecessary typography tag
1 parent 9d1b29c commit aa250ed

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,10 @@ msgstr "Inconsistent flashloan parameters"
842842
msgid "Interest rate rebalance conditions were not met"
843843
msgstr "Interest rate rebalance conditions were not met"
844844

845+
#: src/modules/reserve-overview/ReserveConfiguration.tsx
846+
msgid "Interest rate strategy"
847+
msgstr "Interest rate strategy"
848+
845849
#: src/ui-config/errorMapping.tsx
846850
msgid "Invalid amount to burn"
847851
msgstr "Invalid amount to burn"

src/modules/reserve-overview/ReserveConfiguration.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Trans } from '@lingui/macro';
2-
import { Alert, Box, Divider, SvgIcon, Typography } from '@mui/material';
2+
import { Alert, Box, Button, Divider, SvgIcon, Typography } from '@mui/material';
33
import Paper from '@mui/material/Paper';
44
import { FormattedNumber } from 'src/components/primitives/FormattedNumber';
55
import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
@@ -26,6 +26,7 @@ import { valueToBigNumber } from '@aave/math-utils';
2626
import { ApyGraphContainer } from './graphs/ApyGraphContainer';
2727
import { InteresetRateModelGraphContainer } from './graphs/InterestRateModelGraphContainer';
2828
import { PanelRow, PanelTitle, PanelItem } from './ReservePanels';
29+
import { ExternalLinkIcon } from '@heroicons/react/solid';
2930

3031
type ReserveConfigurationProps = {
3132
reserve: ComputedReserveData;
@@ -613,6 +614,7 @@ export const ReserveConfiguration: React.FC<ReserveConfigurationProps> = ({ rese
613614
display: 'flex',
614615
alignItems: 'center',
615616
flexWrap: 'wrap',
617+
justifyContent: 'space-between',
616618
}}
617619
>
618620
<PanelItem title={<Trans>Utilization Rate</Trans>}>
@@ -623,6 +625,22 @@ export const ReserveConfiguration: React.FC<ReserveConfigurationProps> = ({ rese
623625
compact
624626
/>
625627
</PanelItem>
628+
<Button
629+
href={currentNetworkConfig.explorerLinkBuilder({
630+
address: reserve.interestRateStrategyAddress,
631+
})}
632+
endIcon={
633+
<SvgIcon sx={{ width: 14, height: 14 }}>
634+
<ExternalLinkIcon />
635+
</SvgIcon>
636+
}
637+
component={Link}
638+
size="small"
639+
variant="outlined"
640+
sx={{ verticalAlign: 'top' }}
641+
>
642+
<Trans>Interest rate strategy</Trans>
643+
</Button>
626644
</Box>
627645
<InteresetRateModelGraphContainer reserve={reserve} />
628646
</Box>

0 commit comments

Comments
 (0)