From 3c232d70d1b9333ac19b73da9e7d620bbc4d2c28 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 4 Aug 2023 13:05:56 +0200 Subject: [PATCH] small fixes --- electrum/gui/qml/components/WalletMainView.qml | 4 ---- electrum/plugins/trustedcoin/qt_common.py | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index b594af707..88f5a1779 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -317,10 +317,6 @@ Item { function onOtpRequested() { console.log('OTP requested') var dialog = otpDialog.createObject(mainView) - dialog.accepted.connect(function() { - console.log('accepted ' + dialog.otpauth) - Daemon.currentWallet.finish_otp(dialog.otpauth) - }) dialog.open() } function onBroadcastFailed(txid, code, message) { diff --git a/electrum/plugins/trustedcoin/qt_common.py b/electrum/plugins/trustedcoin/qt_common.py index d8186af30..d9f492051 100644 --- a/electrum/plugins/trustedcoin/qt_common.py +++ b/electrum/plugins/trustedcoin/qt_common.py @@ -222,6 +222,8 @@ class QSignalObject(PluginQObject): @pyqtSlot(str, int) def checkOtp(self, short_id, otp): + assert type(otp) is int # make sure this doesn't fail subtly + def check_otp_task(): try: self.plugin.logger.debug(f'check OTP, shortId={short_id}, otp={otp}')