fix #4575
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user