Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add interest rate strategy link #1124

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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