Skip to content

Commit

Permalink
chore: remove swap backup
Browse files Browse the repository at this point in the history
  • Loading branch information
apotdevin committed May 21, 2024
1 parent 96b5b84 commit de5bbf4
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions src/client/src/views/swap/StartSwap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
import {
Card,
DarkSubTitle,
Separation,
SingleLine,
SubTitle,
} from '../../components/generic/Styled';
Expand All @@ -21,7 +20,6 @@ import { useCreateBoltzReverseSwapMutation } from '../../graphql/mutations/__gen
import { toast } from 'react-toastify';
import { getErrorContent } from '../../utils/error';
import { useMutationResultWithReset } from '../../hooks/UseMutationWithReset';
import { saveToPc } from '../../utils/helpers';
import { useSwapsDispatch } from './SwapContext';

type StartSwapProps = {
Expand All @@ -45,8 +43,6 @@ export const StartSwap = ({ max, min }: StartSwapProps) => {
const [isEdit, setIsEdit] = useState<boolean>(false);
const [address, setAddress] = useState<string>();

const [download, setDownload] = useState<boolean>(true);

const dispatch = useSwapsDispatch();

const [getQuote, { data: _data, loading }] =
Expand All @@ -61,15 +57,9 @@ export const StartSwap = ({ max, min }: StartSwapProps) => {
type: 'add',
swap: data.createBoltzReverseSwap,
});
download &&
saveToPc(
JSON.stringify(data.createBoltzReverseSwap),
`Swap-${data.createBoltzReverseSwap.id}`,
false,
true
);

resetMutation();
}, [data, dispatch, resetMutation, download]);
}, [data, dispatch, resetMutation]);

return (
<Card mobileCardPadding={'0'} mobileNoBackground={true}>
Expand Down Expand Up @@ -129,17 +119,7 @@ export const StartSwap = ({ max, min }: StartSwapProps) => {
inputCallback={value => setAddress(value)}
/>
)}
<Separation />
<InputWithDeco title={'Download Backup'} noInput={true}>
<MultiButton>
<SingleButton selected={download} onClick={() => setDownload(true)}>
Yes
</SingleButton>
<SingleButton selected={!download} onClick={() => setDownload(false)}>
No
</SingleButton>
</MultiButton>
</InputWithDeco>

<ColorButton
disabled={!amount || loading}
loading={loading}
Expand Down

0 comments on commit de5bbf4

Please sign in to comment.