diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 7b26bd9d..160b4af8 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -916,7 +916,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): fileName = self.getSaveFileName(_("Select where to save your payment request"), name, "*.bip70") if fileName: with open(fileName, "wb+") as f: - f.write(str(pr)) + f.write(util.to_bytes(pr)) self.show_message(_("Request saved successfully")) self.saved = True diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py index 51fbcbe9..9fb76591 100644 --- a/lib/paymentrequest.py +++ b/lib/paymentrequest.py @@ -320,7 +320,7 @@ def make_unsigned_request(req): pd.memo = memo pr = pb2.PaymentRequest() pr.serialized_payment_details = pd.SerializeToString() - pr.signature = '' + pr.signature = util.to_bytes('') return pr