mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
Wizard: Delete old wallet object before creating new
This commit is contained in:
parent
c873da75f2
commit
776a591190
1 changed files with 14 additions and 12 deletions
|
@ -71,19 +71,21 @@ Item {
|
||||||
// TODO: create wallet in temporary filename and a) move it to the path specified by user after the final
|
// 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
|
// page submitted or b) delete it when program closed before reaching final page
|
||||||
|
|
||||||
var wallet_filename = oshelper.temporaryFilename();
|
// Always delete the wallet object before creating new - we could be stepping back from recovering wallet
|
||||||
if (typeof settingsObject.wallet === 'undefined') {
|
if (typeof settingsObject.wallet !== 'undefined') {
|
||||||
//var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.language)
|
settingsObject.wallet.destroy()
|
||||||
var testnet = appWindow.persistentSettings.testnet;
|
console.log("deleting wallet")
|
||||||
var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.wallet_language,
|
|
||||||
testnet)
|
|
||||||
uiItem.wordsTextItem.memoText = wallet.seed
|
|
||||||
// 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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var wallet_filename = oshelper.temporaryFilename();
|
||||||
|
//var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.language)
|
||||||
|
var testnet = appWindow.persistentSettings.testnet;
|
||||||
|
var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.wallet_language,
|
||||||
|
testnet)
|
||||||
|
uiItem.wordsTextItem.memoText = wallet.seed
|
||||||
|
// 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
|
||||||
settingsObject.wallet_filename = wallet_filename
|
settingsObject.wallet_filename = wallet_filename
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue