Skip to content

Commit

Permalink
fix: Got-It in just updated no longer triggers download and therefore…
Browse files Browse the repository at this point in the history
… error

(cherry picked from commit 97dfcf6)
  • Loading branch information
peter-sanderson authored and MiroslavProchazka committed Nov 19, 2024
1 parent 92289b9 commit b44a924
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { useState, useCallback, useEffect } from 'react';

import { Column, Markdown, NewModal, Paragraph } from '@trezor/components';
import { desktopApi } from '@trezor/suite-desktop-api';
import { spacings } from '@trezor/theme';

import { Translation } from 'src/components/suite';
import { useDispatch } from 'src/hooks/suite';
import { download } from 'src/actions/suite/desktopUpdateActions';

import { Changelog } from './changelogComponents';

Expand All @@ -17,13 +14,6 @@ interface AvailableProps {
export const JustUpdated = ({ onCancel }: AvailableProps) => {
const [changelog, setChangelog] = useState<string | null>(null);

const dispatch = useDispatch();

const downloadUpdate = () => {
dispatch(download());
desktopApi.downloadUpdate();
};

const suiteCurrentVersion = process.env.VERSION || '';

const getReleaseNotes = useCallback(async () => {
Expand All @@ -50,7 +40,7 @@ export const JustUpdated = ({ onCancel }: AvailableProps) => {
onCancel={onCancel}
bottomContent={
<>
<NewModal.Button onClick={downloadUpdate} variant="primary">
<NewModal.Button onClick={onCancel} variant="primary">
<Translation id="TR_GOT_IT" />
</NewModal.Button>
</>
Expand Down

0 comments on commit b44a924

Please sign in to comment.