]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Trezor: handle PIN requests in MainWindow
authortobtoht <thotbot@protonmail.com>
Fri, 9 Jul 2021 21:48:43 +0000 (23:48 +0200)
committertobtoht <thotbot@protonmail.com>
Fri, 9 Jul 2021 21:48:43 +0000 (23:48 +0200)
src/MainWindow.cpp

index e1c7b962bcb0d83217a7f4729c7cba078e6d47a0..8d5aa73a39abe44979c23678a136c3cb1c58a486 100644 (file)
@@ -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?