Skip to content

Commit

Permalink
Merge branch 'recovery-epic' into recovery-pending-status
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Nov 28, 2023
2 parents 534395c + e9e0974 commit 9df48ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/components/recovery/CancelRecoveryButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import useSafeInfo from '@/hooks/useSafeInfo'
import useOnboard from '@/hooks/wallets/useOnboard'
import { trackError, Errors } from '@/services/exceptions'
import { asError } from '@/services/exceptions/utils'
import { useIsGuardian } from '@/hooks/useIsGuardian'
import { useRecoveryTxState } from '@/hooks/useRecoveryTxState'
import { RecoveryListItemContext } from '../RecoveryListItem/RecoveryListItemContext'
import type { RecoveryQueueItem } from '@/services/recovery/recovery-state'
Expand All @@ -27,7 +26,6 @@ export function CancelRecoveryButton({
}): ReactElement {
const { setSubmitError } = useContext(RecoveryListItemContext)
const isOwner = useIsSafeOwner()
const isGuardian = useIsGuardian()
const { isExpired, isPending } = useRecoveryTxState(recovery)
const { setTxFlow } = useContext(TxModalContext)
const onboard = useOnboard()
Expand Down Expand Up @@ -59,7 +57,7 @@ export function CancelRecoveryButton({
return (
<CheckWallet allowNonOwner>
{(isOk) => {
const isDisabled = !isOk || isPending || (isGuardian && !isExpired)
const isDisabled = isPending || (isOwner ? !isOk : !isOk || !isExpired)

return compact ? (
<IconButton onClick={onClick} color="error" size="small" disabled={isDisabled}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/Recovery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const headCells = [
label: (
<>
Recovery delay{' '}
<Tooltip title="You can cancel any recovery attempt when it is not needed or wanted within the delay period.">
<Tooltip title="You can cancel any recovery attempt when it is not needed or wanted.">
<span>
<SvgIcon
component={InfoIcon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ export function UpsertRecoveryFlowReview({
title={
<>
Recovery delay
<Tooltip
placement="top"
title="You can cancel any recovery attempt when it is not needed or wanted within the delay period."
>
<Tooltip placement="top" title="You can cancel any recovery attempt when it is not needed or wanted.">
<span>
<SvgIcon
component={InfoIcon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function UpsertRecoveryFlowSettings({
</Typography>

<Typography variant="body2">
You can cancel any recovery attempt when it is not needed or wanted within the delay period.
You can cancel any recovery attempt when it is not needed or wanted.
</Typography>
</div>

Expand Down

0 comments on commit 9df48ac

Please sign in to comment.