Skip to content

Commit

Permalink
feat: add interest rate strategy link (#1124)
Browse files Browse the repository at this point in the history
* feat: add link to interest rate strategy

* fix: remove unnecessary typography tag
  • Loading branch information
defispartan authored Sep 16, 2022
1 parent 9d1b29c commit aa250ed
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/locales/en/messages.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,10 @@ msgstr "Inconsistent flashloan parameters"
msgid "Interest rate rebalance conditions were not met"
msgstr "Interest rate rebalance conditions were not met"

#: src/modules/reserve-overview/ReserveConfiguration.tsx
msgid "Interest rate strategy"
msgstr "Interest rate strategy"

#: src/ui-config/errorMapping.tsx
msgid "Invalid amount to burn"
msgstr "Invalid amount to burn"
Expand Down
20 changes: 19 additions & 1 deletion src/modules/reserve-overview/ReserveConfiguration.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Trans } from '@lingui/macro';
import { Alert, Box, Divider, SvgIcon, Typography } from '@mui/material';
import { Alert, Box, Button, Divider, SvgIcon, Typography } from '@mui/material';
import Paper from '@mui/material/Paper';
import { FormattedNumber } from 'src/components/primitives/FormattedNumber';
import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
Expand All @@ -26,6 +26,7 @@ import { valueToBigNumber } from '@aave/math-utils';
import { ApyGraphContainer } from './graphs/ApyGraphContainer';
import { InteresetRateModelGraphContainer } from './graphs/InterestRateModelGraphContainer';
import { PanelRow, PanelTitle, PanelItem } from './ReservePanels';
import { ExternalLinkIcon } from '@heroicons/react/solid';

type ReserveConfigurationProps = {
reserve: ComputedReserveData;
Expand Down Expand Up @@ -613,6 +614,7 @@ export const ReserveConfiguration: React.FC<ReserveConfigurationProps> = ({ rese
display: 'flex',
alignItems: 'center',
flexWrap: 'wrap',
justifyContent: 'space-between',
}}
>
<PanelItem title={<Trans>Utilization Rate</Trans>}>
Expand All @@ -623,6 +625,22 @@ export const ReserveConfiguration: React.FC<ReserveConfigurationProps> = ({ rese
compact
/>
</PanelItem>
<Button
href={currentNetworkConfig.explorerLinkBuilder({
address: reserve.interestRateStrategyAddress,
})}
endIcon={
<SvgIcon sx={{ width: 14, height: 14 }}>
<ExternalLinkIcon />
</SvgIcon>
}
component={Link}
size="small"
variant="outlined"
sx={{ verticalAlign: 'top' }}
>
<Trans>Interest rate strategy</Trans>
</Button>
</Box>
<InteresetRateModelGraphContainer reserve={reserve} />
</Box>
Expand Down

0 comments on commit aa250ed

Please sign in to comment.