mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 10:56:14 +03:00
unused import
This commit is contained in:
parent
cb0897ba36
commit
5fec4056b2
@ -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));
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user