예제 #1
0
 def send(self, window, addr):
     from electrum_dash import paymentrequest
     r = window.wallet.receive_requests.get(addr)
     message = r.get('memo', '')
     if r.get('signature'):
         pr = paymentrequest.serialize_request(r)
     else:
         pr = paymentrequest.make_request(self.config, r)
     if not pr:
         return
     recipient, ok = QInputDialog.getText(window, 'Send request',
                                          'Email invoice to:')
     if not ok:
         return
     recipient = str(recipient)
     payload = pr.SerializeToString()
     self.print_error('sending mail to', recipient)
     try:
         # FIXME this runs in the GUI thread and blocks it...
         self.processor.send(recipient, message, payload)
     except BaseException as e:
         traceback.print_exc(file=sys.stderr)
         window.show_message(str(e))
     else:
         window.show_message(_('Request sent.'))
예제 #2
0
    def send(self, addr):
        from electrum_dash import paymentrequest
        r = self.wallet.receive_requests.get(addr)
        message = r.get('memo', '')
        if r.get('signature'):
            pr = paymentrequest.serialize_request(r)
        else:
            pr = paymentrequest.make_request(self.config, r)
        if not pr:
            return
        recipient, ok = QtGui.QInputDialog.getText(self.win, 'Send request', 'Email invoice to:')
        if not ok:
            return
        recipient = str(recipient)
        payload = pr.SerializeToString()
        self.print_error('sending mail to', recipient)
        try:
            self.processor.send(recipient, message, payload)
        except BaseException as e:
            self.win.show_message(str(e))
            return

        self.win.show_message(_('Request sent.'))
예제 #3
0
파일: qt.py 프로젝트: ivansib/electrum-sib
 def send(self, window, addr):
     from electrum_dash import paymentrequest
     r = window.wallet.receive_requests.get(addr)
     message = r.get('memo', '')
     if r.get('signature'):
         pr = paymentrequest.serialize_request(r)
     else:
         pr = paymentrequest.make_request(self.config, r)
     if not pr:
         return
     recipient, ok = QInputDialog.getText(window, 'Send request', 'Email invoice to:')
     if not ok:
         return
     recipient = str(recipient)
     payload = pr.SerializeToString()
     self.print_error('sending mail to', recipient)
     try:
         # FIXME this runs in the GUI thread and blocks it...
         self.processor.send(recipient, message, payload)
     except BaseException as e:
         traceback.print_exc(file=sys.stderr)
         window.show_message(str(e))
     else:
         window.show_message(_('Request sent.'))
예제 #4
0
    def send(self, addr):
        from electrum_dash import paymentrequest
        r = self.wallet.receive_requests.get(addr)
        message = r.get('memo', '')
        if r.get('signature'):
            pr = paymentrequest.serialize_request(r)
        else:
            pr = paymentrequest.make_request(self.config, r)
        if not pr:
            return
        recipient, ok = QtGui.QInputDialog.getText(self.win, 'Send request',
                                                   'Email invoice to:')
        if not ok:
            return
        recipient = str(recipient)
        payload = pr.SerializeToString()
        self.print_error('sending mail to', recipient)
        try:
            self.processor.send(recipient, message, payload)
        except BaseException as e:
            self.win.show_message(str(e))
            return

        self.win.show_message(_('Request sent.'))