Skip to content

Commit

Permalink
feat: add insurance links to trading deposit panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Yavorski committed May 15, 2024
1 parent 9a2901c commit 727a81b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ import {
useMinReceiveText,
} from '@dhedge/core-ui-kit/hooks/trading';
import { formatToUsd } from '@dhedge/core-ui-kit/utils';
import { INSUR_ACE_LINK, OPEN_COVER_LINK } from '@frontend/shared-constants';
import { useLogAnalyticsEvent } from '@frontend/shared-providers';
import { CollapsibleSection, InfoTooltip } from '@frontend/shared-ui';
import {
CollapsibleSection,
InfoTooltip,
TokenIconRevamp,
} from '@frontend/shared-ui';
import {
Box,
CircularProgress,
Divider,
Link,
Stack,
Typography,
} from '@mui/material';
Expand Down Expand Up @@ -146,6 +152,30 @@ export const TradingTransactionOverview: FC<StackProps> = (props) => {
})}
value={minReceivedText}
/>
{isDeposit && (
<OverviewItem
label="Insurance"
tooltipText="Deposits can be covered for certain types of hacks"
value={
<Stack direction="row" gap={1}>
<Link
href={OPEN_COVER_LINK}
target="_blank"
rel="noopener noreferrer"
>
<TokenIconRevamp symbols={['opencover']} />
</Link>
<Link
href={INSUR_ACE_LINK}
target="_blank"
rel="noopener noreferrer"
>
<TokenIconRevamp symbols={['insur']} />
</Link>
</Stack>
}
/>
)}
{showMinRecommendedSlippage && (
<OverviewItem
label={intl.formatMessage({
Expand Down
6 changes: 6 additions & 0 deletions libs/shared/constants/src/mstable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ export const MEDIUM = 'https://medium.com/mstable';
export const EMAIL = 'mailto:[email protected]';
export const MSTABLE_LANDING_PAGE_URL = 'https://mstable.org/';
export const DHEDGE = 'https://dhedge.org/';

export const OPEN_COVER_LINK =
'https://opencover.com/app/?invite=DH100K&cover=126';

export const INSUR_ACE_LINK =
'https://app.insurace.io/Insurance/BuyCovers?referrer=212511352154979513002532245935614371628988752555';

0 comments on commit 727a81b

Please sign in to comment.