1
0
This commit is contained in:
SomberNight
2018-07-21 23:09:46 +02:00
parent f8e13c5c33
commit 4284f4feb3
5 changed files with 33 additions and 9 deletions

View File

@@ -31,6 +31,9 @@ from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import qrcode
from qrcode import exceptions
from electrum.bitcoin import base_encode
from electrum.i18n import _
from electrum.plugin import run_hook
@@ -183,8 +186,11 @@ class TxDialog(QDialog, MessageBoxMixin):
text = base_encode(text, base=43)
try:
self.main_window.show_qrcode(text, 'Transaction', parent=self)
except qrcode.exceptions.DataOverflowError:
self.show_error(_('Failed to display QR code.') + '\n' +
_('Transaction is too large in size.'))
except Exception as e:
self.show_message(str(e))
self.show_error(_('Failed to display QR code.') + '\n' + str(e))
def sign(self):
def sign_done(success):