public void onDeleteWallet(object sender, EventArgs e) { if (Node.walletStorage.deleteWallet()) { Node.walletStorage = new WalletStorage(Path.Combine(Config.spixiUserFolder, Config.walletFile)); // Also delete the account onDeleteAccount(); // Stop network activity Node.stop(); Application.Current.Properties.Remove("onboardingComplete"); Application.Current.SavePropertiesAsync(); // Force-save properties for compatibility with WPF SpixiLocalization.addCustomString("OnboardingComplete", "false"); Node.localStorage.deleteTransactionCacheFile(); TransactionCache.clearAllTransactions(); Node.tiv.clearCache(); // Show the launch page Navigation.PushAsync(new LaunchPage(), Config.defaultXamarinAnimations); // Remove the settings page Navigation.RemovePage(this); // Todo: also remove the parent page without causing memory leaks } else { displaySpixiAlert(SpixiLocalization._SL("settings-deletew-error-title"), SpixiLocalization._SL("settings-deletew-error-text"), SpixiLocalization._SL("global-dialog-ok")); } }