unused import

This commit is contained in:
Yostra 2020-09-02 22:14:44 -07:00 committed by Gene Hoffman
parent cb0897ba36
commit 5fec4056b2
2 changed files with 27 additions and 2 deletions

View File

@ -260,6 +260,31 @@ export const log_in_and_import_backup = (fingerprint, file_path) => {
return action;
};
export const log_in_and_import_backup_action = (fingerprint, file_path) => {
return (dispatch) => {
dispatch(selectFingerprint(fingerprint));
return async_api(
dispatch,
log_in_and_import_backup(fingerprint, file_path),
true
).then((response) => {
dispatch(closeProgress());
if (response.data.success) {
// Go to wallet
refreshAllState(dispatch);
} else {
const error = response.data.error;
if (error === "not_initialized") {
dispatch(changeEntranceMenu(presentRestoreBackup));
// Go to restore from backup screen
} else {
dispatch(openDialog("Error", error));
}
}
});
};
};
export const login_and_skip_action = (fingerprint) => {
return (dispatch) => {
dispatch(selectFingerprint(fingerprint));

View File

@ -12,10 +12,10 @@ import {
} from "../../modules/entranceMenu";
import {
add_new_key_action,
log_in_and_import_backup,
add_and_restore_from_backup,
login_and_skip_action,
get_backup_info_action,
log_in_and_import_backup_action,
} from "../../modules/message";
import { Paper, Grid } from "@material-ui/core";
import {
@ -164,7 +164,7 @@ const BackupDetails = () => {
function next() {
if (fingerprint !== null) {
dispatch(log_in_and_import_backup(fingerprint, file_path));
dispatch(log_in_and_import_backup_action(fingerprint, file_path));
} else if (words !== null) {
dispatch(add_and_restore_from_backup(words, file_path));
}