mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 03:42:05 +02:00
settings: don't call parseFloat, isFinite to parse height
This commit is contained in:
parent
3aa6da058a
commit
15ac299fef
@ -31,7 +31,6 @@ import QtQuick.Layouts 1.1
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
import "../../js/Utils.js" as Utils
|
|
||||||
import "../../version.js" as Version
|
import "../../version.js" as Version
|
||||||
import "../../components" as MoneroComponents
|
import "../../components" as MoneroComponents
|
||||||
|
|
||||||
@ -167,9 +166,8 @@ Rectangle {
|
|||||||
inputDialog.labelText = qsTr("Set a new restore height:") + translationManager.emptyString;
|
inputDialog.labelText = qsTr("Set a new restore height:") + translationManager.emptyString;
|
||||||
inputDialog.inputText = currentWallet ? currentWallet.walletCreationHeight : "0";
|
inputDialog.inputText = currentWallet ? currentWallet.walletCreationHeight : "0";
|
||||||
inputDialog.onAcceptedCallback = function() {
|
inputDialog.onAcceptedCallback = function() {
|
||||||
var _restoreHeight = inputDialog.inputText;
|
var _restoreHeight = parseInt(inputDialog.inputText);
|
||||||
if(Utils.isNumeric(_restoreHeight)){
|
if (!isNaN(_restoreHeight)) {
|
||||||
_restoreHeight = parseInt(_restoreHeight);
|
|
||||||
if(_restoreHeight >= 0) {
|
if(_restoreHeight >= 0) {
|
||||||
currentWallet.walletCreationHeight = _restoreHeight
|
currentWallet.walletCreationHeight = _restoreHeight
|
||||||
// Restore height is saved in .keys file. Set password to trigger rewrite.
|
// Restore height is saved in .keys file. Set password to trigger rewrite.
|
||||||
|
Loading…
Reference in New Issue
Block a user