File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 1+ import { Stake } from '@aave/contract-helpers' ;
12import { Trans } from '@lingui/macro' ;
23import { Typography } from '@mui/material' ;
34import { useRootStore } from 'src/store/root' ;
@@ -7,10 +8,22 @@ import { Link } from '../primitives/Link';
78import { Warning } from '../primitives/Warning' ;
89import { SecondsToString } from '../SecondsToString' ;
910
10- const TWENTY_DAYS = 7 * 24 * 60 * 60 ; // 7 days
11+ const SEVEN_DAYS = 7 * 24 * 60 * 60 ;
12+ const TWENTY_DAYS = 20 * 24 * 60 * 60 ;
1113
12- export const CooldownWarning = ( { cooldownSeconds } : { cooldownSeconds ?: number } ) => {
13- const cooldownTime = cooldownSeconds || TWENTY_DAYS ;
14+ export const CooldownWarning = ( {
15+ cooldownSeconds,
16+ stakeAssetName,
17+ } : {
18+ cooldownSeconds ?: number ;
19+ stakeAssetName ?: Stake ;
20+ } ) => {
21+ const fallbackCooldown = stakeAssetName
22+ ? stakeAssetName === Stake . aave
23+ ? SEVEN_DAYS
24+ : TWENTY_DAYS
25+ : TWENTY_DAYS ;
26+ const cooldownTime = cooldownSeconds || fallbackCooldown ;
1427
1528 const trackEvent = useRootStore ( ( store ) => store . trackEvent ) ;
1629 return (
You can’t perform that action at this time.
0 commit comments