Skip to content

Commit

Permalink
Merge pull request #185 from juanky201271/dev_new_version_zingo_pc_1_1_0
Browse files Browse the repository at this point in the history
Change wallet - delete wallet fixed
  • Loading branch information
juanky201271 authored Jan 28, 2024
2 parents 48d2366 + 5e048ac commit c160780
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/loadingscreen/LoadingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ class LoadingScreen extends Component<LoadingScreenProps & RouteComponentProps,
if (native.zingolib_wallet_exists(chain)) {
const result: string = native.zingolib_initialize_existing(url, chain);
console.log(`Initialization: ${result}`);
// interrupt syncing, just in case.
const resultInterrupt: string = await native.zingolib_execute_async("interrupt_sync_after_batch", "true");
console.log("Interrupting sync ...", resultInterrupt);
const resultDelete: string = await native.zingolib_execute_async("delete", "");
console.log("deleting ...", resultDelete);

Expand Down
5 changes: 5 additions & 0 deletions src/components/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ExportPrivKeyModal from "./components/ExportPrivKeyModal";
import SidebarMenuItem from "./components/SidebarMenuItem";
import { ContextApp } from "../../context/ContextAppState";
import { Logo } from "../logo";
import native from "../../native.node";

const { ipcRenderer, remote } = window.require("electron");
const fs = window.require("fs");
Expand Down Expand Up @@ -204,6 +205,10 @@ class Sidebar extends PureComponent<SidebarProps & RouteComponentProps, SidebarS
// Reset the info object, it will be refetched
setInfo(new Info());

// interrupt syncing
const resultInterrupt: string = await native.zingolib_execute_async("interrupt_sync_after_batch", "true");
console.log("Interrupting sync ....", resultInterrupt);

this.props.navigateToLoadingScreen(true, "Change to another wallet...", serverUris)
});

Expand Down

0 comments on commit c160780

Please sign in to comment.