diff --git a/nym-wallet/src/pages/delegate/SuccessView.tsx b/nym-wallet/src/pages/delegate/SuccessView.tsx index 28afc7aaa2..82258e6088 100644 --- a/nym-wallet/src/pages/delegate/SuccessView.tsx +++ b/nym-wallet/src/pages/delegate/SuccessView.tsx @@ -17,7 +17,7 @@ export const SuccessView: React.FC<{ details?: { amount: string; address: string diff --git a/nym-wallet/src/pages/delegate/index.tsx b/nym-wallet/src/pages/delegate/index.tsx index c65bdd0177..73871c0a92 100644 --- a/nym-wallet/src/pages/delegate/index.tsx +++ b/nym-wallet/src/pages/delegate/index.tsx @@ -1,11 +1,9 @@ -import React, { useEffect, useState } from 'react' -import { Alert, AlertTitle, Box, Button, CircularProgress, Link, Typography } from '@mui/material' +import React, { useState } from 'react' +import { Alert, AlertTitle, Box, Button, Link, Typography } from '@mui/material' import { DelegateForm } from './DelegateForm' import { Layout } from '../../layouts' import { NymCard } from '../../components' import { EnumRequestStatus, RequestStatus } from '../../components/RequestStatus' -import { TFee } from '../../types' -import { getGasFee } from '../../requests' import { SuccessView } from './SuccessView' import { Delegate as DelegateIcon } from '../../svg-icons' import { urls } from '../../context/main' @@ -17,64 +15,72 @@ export const Delegate = () => { return ( - - <> - {status === EnumRequestStatus.initial && ( - { - setStatus(EnumRequestStatus.error) - setError(message) - }} - onSuccess={(details) => { - setStatus(EnumRequestStatus.success) - setSuccessDetails(details) - }} - /> - )} - {status !== EnumRequestStatus.initial && ( - <> - - Delegation failed - An error occurred with the request: - {error} - - } - Success={} - /> - `1px solid ${theme.palette.grey[200]}`, - bgcolor: 'grey.100', - p: 3, - pt: 0, + <> + + <> + {status === EnumRequestStatus.initial && ( + { + setStatus(EnumRequestStatus.error) + setError(message) }} - > - - - - )} - - - - Checkout the{' '} - - list of mixnodes - {' '} - for uptime and performances to help make delegation decisions - + + + + )} + + + + Checkout the{' '} + + list of mixnodes + {' '} + for uptime and performances to help make delegation decisions + + ) } diff --git a/nym-wallet/src/pages/unbond/index.tsx b/nym-wallet/src/pages/unbond/index.tsx index c66078b196..f1ecadbd3c 100644 --- a/nym-wallet/src/pages/unbond/index.tsx +++ b/nym-wallet/src/pages/unbond/index.tsx @@ -22,36 +22,38 @@ export const Unbond = () => { return ( - {ownership?.hasOwnership && ( - { - setIsLoading(true) - await unbond(ownership.nodeType) - await userBalance.fetchBalance() - await getBondDetails() - await checkOwnership() - setIsLoading(false) - }} - color="inherit" - > - Unbond - - } - sx={{ m: 2 }} - > - {`Looks like you already have a ${ownership.nodeType} bonded.`} - - )} - - - - {!ownership.hasOwnership && ( + {ownership?.hasOwnership ? ( + <> + { + setIsLoading(true) + await unbond(ownership.nodeType) + await userBalance.fetchBalance() + await getBondDetails() + await checkOwnership() + setIsLoading(false) + }} + color="inherit" + > + Unbond + + } + sx={{ m: 2 }} + > + {`Looks like you already have a ${ownership.nodeType} bonded.`} + + + + + + + ) : ( You don't currently have a bonded node