aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2018-10-29 19:01:46 +0000
committerxiphon <xiphon@protonmail.com>2018-10-29 19:01:46 +0000
commit15ac299fef93ccf0425cc170ca8c925feadfbd6f (patch)
tree4c5a404d049eba7cca416bc85fdb8606c04ea8d4
parent3aa6da058a697378d8b6ee0864a559c207a332e2 (diff)
downloadmonzero-gui-15ac299fef93ccf0425cc170ca8c925feadfbd6f.tar.gz
monzero-gui-15ac299fef93ccf0425cc170ca8c925feadfbd6f.tar.xz
monzero-gui-15ac299fef93ccf0425cc170ca8c925feadfbd6f.zip
settings: don't call parseFloat, isFinite to parse height
-rw-r--r--pages/settings/SettingsInfo.qml6
1 files changed, 2 insertions, 4 deletions
diff --git a/pages/settings/SettingsInfo.qml b/pages/settings/SettingsInfo.qml
index bd8847e0..2d56c297 100644
--- a/pages/settings/SettingsInfo.qml
+++ b/pages/settings/SettingsInfo.qml
@@ -31,7 +31,6 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
-import "../../js/Utils.js" as Utils
import "../../version.js" as Version
import "../../components" as MoneroComponents
@@ -167,9 +166,8 @@ Rectangle {
inputDialog.labelText = qsTr("Set a new restore height:") + translationManager.emptyString;
inputDialog.inputText = currentWallet ? currentWallet.walletCreationHeight : "0";
inputDialog.onAcceptedCallback = function() {
- var _restoreHeight = inputDialog.inputText;
- if(Utils.isNumeric(_restoreHeight)){
- _restoreHeight = parseInt(_restoreHeight);
+ var _restoreHeight = parseInt(inputDialog.inputText);
+ if (!isNaN(_restoreHeight)) {
if(_restoreHeight >= 0) {
currentWallet.walletCreationHeight = _restoreHeight
// Restore height is saved in .keys file. Set password to trigger rewrite.