@@ -18,6 +18,7 @@ import { DEFAULT_FADE_TIMEOUT, MASTER_KEY_DURATION } from 'lib/constants';
1818import { timeout } from 'lib/timeout';
1919import View from 'components/View';
2020import useMultikeyFileGenerator from 'lib/useMultikeyFileGenerator';
21+import { downloadWallet } from 'lib/invite';
2122
2223const MasterKeyDownload = () => {
2324 const {
@@ -45,7 +46,7 @@ const MasterKeyDownload = () => {
4546 Just: p => p.value.toFixed(),
4647 });
4748
48− const { download } = useMultikeyFileGenerator({
49+ const { keyfile, filename } = useMultikeyFileGenerator({
4950 point,
5051 seedWallet: inviteWallet,
5152 });
@@ -62,6 +63,10 @@ const MasterKeyDownload = () => {
6263 [paper, setGenerated]
6364 );
6465
66+ const download = useCallback(async () => {
67+ await downloadWallet(paper.getOrElse([]), keyfile, filename);
68+ }, [paper, keyfile, filename]);
69+
6570 const onDownloadClick = useCallback(async () => {
6671 await download();
6772 setIsIn(false);