wizard: empty seed box on page load

This commit is contained in:
Jacob Brydolf 2016-10-30 21:33:14 +01:00
parent 776a591190
commit e6fe9d3045
No known key found for this signature in database
GPG Key ID: DE46246550D2F3C5

View File

@ -43,6 +43,8 @@ Item {
function onPageOpened(settingsObject) { function onPageOpened(settingsObject) {
checkNextButton(); checkNextButton();
// Empty seedText when restoring multiple times in one session
uiItem.wordsTextItem.memoText = "";
} }
function checkNextButton() { function checkNextButton() {
@ -54,7 +56,8 @@ Item {
settingsObject['account_name'] = uiItem.accountNameText settingsObject['account_name'] = uiItem.accountNameText
settingsObject['words'] = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText) settingsObject['words'] = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText)
settingsObject['wallet_path'] = uiItem.walletPath settingsObject['wallet_path'] = uiItem.walletPath
settingsObject['restore_height'] = parseInt(uiItem.restoreHeight) var restoreHeight = parseInt(uiItem.restoreHeight);
settingsObject['restore_height'] = isNaN(restoreHeight)? 0 : restoreHeight
var walletFullPath = wizard.createWalletPath(uiItem.walletPath,uiItem.accountNameText); var walletFullPath = wizard.createWalletPath(uiItem.walletPath,uiItem.accountNameText);
if(wizard.walletExists(walletFullPath)){ if(wizard.walletExists(walletFullPath)){
return false return false