mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-29 23:26:24 +01:00
Wizard: Delete old wallet object before creating new
This commit is contained in:
parent
c873da75f2
commit
776a591190
@ -71,8 +71,13 @@ Item {
|
||||
// TODO: create wallet in temporary filename and a) move it to the path specified by user after the final
|
||||
// page submitted or b) delete it when program closed before reaching final page
|
||||
|
||||
// Always delete the wallet object before creating new - we could be stepping back from recovering wallet
|
||||
if (typeof settingsObject.wallet !== 'undefined') {
|
||||
settingsObject.wallet.destroy()
|
||||
console.log("deleting wallet")
|
||||
}
|
||||
|
||||
var wallet_filename = oshelper.temporaryFilename();
|
||||
if (typeof settingsObject.wallet === 'undefined') {
|
||||
//var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.language)
|
||||
var testnet = appWindow.persistentSettings.testnet;
|
||||
var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.wallet_language,
|
||||
@ -81,9 +86,6 @@ Item {
|
||||
// saving wallet in "global" settings object
|
||||
// TODO: wallet should have a property pointing to the file where it stored or loaded from
|
||||
settingsObject.wallet = wallet
|
||||
} else {
|
||||
print("wallet already created. we just stepping back");
|
||||
}
|
||||
settingsObject.wallet_filename = wallet_filename
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user