From a0cc4184bcfb2502900ac7ca24f53f9abfc34480 Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 29 Dec 2023 17:23:44 -0500 Subject: [PATCH] Trim leading and trailing whitespace from rescan height when importing a privkey --- src/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e31fc44..53dfcff 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1324,8 +1324,8 @@ void MainWindow::importPrivKey() { doImport(keysValidated); if (rescan) { - //TODO: verify rescanfrom is a valid integer and trim whitespace - rpc->rescan(pui.rescanfrom->text().toInt() , [=] (QJsonValue response){ + //TODO: verify rescanfrom is a valid integer + rpc->rescan(pui.rescanfrom->text().trimmed().toInt() , [=] (QJsonValue response){ qDebug() << __func__ << ":rescanning from height " << pui.rescanfrom->text().toInt() << " finished" << response; ui->statusBar->showMessage(tr("Rescanning finished"), 5000); });