diff --git a/app/components/common/Version.tsx b/app/components/common/Version.tsx index 389c1f852..ec4face74 100644 --- a/app/components/common/Version.tsx +++ b/app/components/common/Version.tsx @@ -21,9 +21,6 @@ import { getNetworkInfo } from '../../redux/network/selectors'; import { checkUpdates as checkUpdatesIco } from '../../assets/images'; import { AppThDispatch } from '../../types'; import updaterSlice from '../../redux/updater/slice'; -import { SECOND } from '../../../shared/constants'; -import { Loader } from '../../basicComponents'; -import UpdateApplicationWarningModal from '../../screens/modal/UpdateApplicationWarningModal'; import FeedbackButton from './Feedback'; const Container = styled.div` @@ -197,29 +194,6 @@ const UpdateStatus = () => { const isDownloading = useSelector(isUpdateDownloading); const isDownloaded = useSelector(isUpdateDownloaded); const error = useSelector(getError); - const [ - isOpenUpdateApplicationWarningModal, - setIsOpenUpdateApplicationWarningModal, - ] = useState(false); - const [ - showUpdateApplicationLoader, - setShowUpdateApplicationLoader, - ] = useState(false); - - const handleRestartNow = () => { - setIsOpenUpdateApplicationWarningModal(false); - setShowUpdateApplicationLoader(true); - eventsService.installUpdate(); - - setTimeout(() => { - setShowUpdateApplicationLoader(false); - }, 10 * SECOND); - }; - - const handlePostpone = () => { - setIsOpenUpdateApplicationWarningModal(false); - }; - if (!isDownloading && !isDownloaded) return null; if (progress !== null && !isDownloaded) { @@ -233,19 +207,9 @@ const UpdateStatus = () => { return ( <> Update is ready to install - setIsOpenUpdateApplicationWarningModal(true)} - > + eventsService.installUpdate()}> Restart Smapp - - {showUpdateApplicationLoader && ( - - )} ); } diff --git a/app/screens/modal/UpdateApplicationWarningModal.tsx b/app/screens/modal/UpdateApplicationWarningModal.tsx deleted file mode 100644 index 541eccd44..000000000 --- a/app/screens/modal/UpdateApplicationWarningModal.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import styled from 'styled-components'; -import Modal from '../../components/common/Modal'; -import { Button } from '../../basicComponents'; -import { smColors } from '../../vars'; - -const ButtonsWrapper = styled.div` - display: flex; - flex-direction: row; - justify-content: space-between; - margin: auto 0 15px 0; - padding-top: 30px; -`; - -const Message = styled.pre` - font-size: 14px; - line-height: 1.33em; - word-wrap: break-word; - white-space: pre-wrap; - overflow-y: auto; - margin-top: 15px; - - ul { - list-style: none; - margin-left: 10px; - } - li { - margin: 10px 0; - } - li:before { - content: '• '; - padding: 5px; - } -`; - -const UpdateApplicationWarningModal = ({ isOpen, onApprove, onCancel }) => { - if (!isOpen) return null; - - return ( - - -

- Restarting now is CRITICAL and may impact your node’s - performance and rewards. -

-
    -
  • - Click RESTART NOW to apply - the update immediately. Delaying the update could result in - potential loss of rewards. -
  • -
  • - Click POSTPONE to delay - the update. Be aware that postponing may slow down your node’s - performance and future rewards. -
  • -
-
- -