Skip to content

Commit

Permalink
feat: borrow warning on metis (#1991)
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem authored Mar 15, 2024
1 parent da5e7c0 commit 1392f57
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/components/transactions/Warnings/MarketWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const WarningMessage = ({ market }: { market: string }) => {
return <Trans>Per the community, the Fantom market has been frozen.</Trans>;
} else if (market === 'Ethereum AMM') {
return <Trans>Per the community, the V2 AMM market has been deprecated.</Trans>;
} else if (market === 'Metis Andromeda') {
return (
<Trans>
Borrowing is temporarily unavailable due to a recent upgrade on the Metis network.
</Trans>
);
} else {
return null;
}
Expand All @@ -35,6 +41,8 @@ const getLink = (market: string, forum: boolean | undefined): string => {
}
} else if (market === 'Ethereum AMM') {
return 'https://governance-v2.aave.com/governance/proposal/239';
} else if (market === 'Metis Andromeda') {
return 'https://governance.aave.com/t/metis-price-oracle-sentinel-using-deprecated-sequencer-issue/16985';
} else {
return '';
}
Expand Down
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 @@ -545,6 +545,10 @@ msgstr "Borrowing is disabled due to an Aave community decision. <0>More details
msgid "Borrowing is not enabled"
msgstr "Borrowing is not enabled"

#: src/components/transactions/Warnings/MarketWarning.tsx
msgid "Borrowing is temporarily unavailable due to a recent upgrade on the Metis network."
msgstr "Borrowing is temporarily unavailable due to a recent upgrade on the Metis network."

#: src/hooks/useReserveActionState.tsx
msgid "Borrowing is unavailable because you’re using Isolation mode. To manage Isolation mode visit your <0>Dashboard</0>."
msgstr "Borrowing is unavailable because you’re using Isolation mode. To manage Isolation mode visit your <0>Dashboard</0>."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ export const BorrowAssetsList = () => {
'asset',
filteredReserves as unknown as DashboardReserve[]
);
const borrowDisabled = !sortedReserves.length && !ghoReserve;
const borrowDisabled =
(!sortedReserves.length && !ghoReserve) || currentNetworkConfig.name === 'Metis Andromeda';

const RenderHeader: React.FC = () => {
return (
Expand Down Expand Up @@ -210,6 +211,9 @@ export const BorrowAssetsList = () => {
subChildrenComponent={
<>
<Box sx={{ px: 6, mb: 4 }}>
{currentNetworkConfig.name === 'Metis Andromeda' && (
<MarketWarning marketName="Metis Andromeda" />
)}
{borrowDisabled && currentNetworkConfig.name === 'Harmony' && (
<MarketWarning marketName="Harmony" />
)}
Expand Down

2 comments on commit 1392f57

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

Please sign in to comment.