From: tobtoht Date: Fri, 9 Jul 2021 21:48:43 +0000 (+0200) Subject: Trezor: handle PIN requests in MainWindow X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=f818812c12e5d327899c6ccb10339fceff1c3d3a;p=gamesguru%2Ffeather.git Trezor: handle PIN requests in MainWindow --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index e1c7b962..8d5aa73a 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1170,9 +1170,20 @@ void MainWindow::onDeviceError(const QString &error) { } void MainWindow::onDeviceButtonRequest(quint64 code) { + qDebug() << "DeviceButtonRequest, code: " << code; + if (m_ctx->wallet->isTrezor()) { switch (code) { + case 1: + { + m_splashDialog->setMessage("Action required on device: Enter your PIN to continue"); + m_splashDialog->setIcon(QPixmap(":/assets/images/key.png")); + m_splashDialog->show(); + m_splashDialog->setEnabled(true); + break; + } case 8: + default: { // Annoyingly, this code is used for a variety of actions, including: // Confirm refresh: Do you really want to start refresh?