Index request by ID instead of receiving address.
Replace get_key_for_outgoing_invoice, get_key_for_incoming_request with Invoice.get_id() When a new request is created, reuse addresses of expired requests (fixes #7927) The API is changed for the following commands: get_request, get_invoice, list_requests, list_invoices, delete_request, delete_invoice
This commit is contained in:
@@ -389,7 +389,7 @@ class QEInvoiceParser(QEInvoice):
|
||||
if not self._effectiveInvoice:
|
||||
return
|
||||
# TODO detect duplicate?
|
||||
self.key = self._wallet.wallet.get_key_for_outgoing_invoice(self._effectiveInvoice)
|
||||
self.key = self._effectiveInvoice.get_id()
|
||||
self._wallet.wallet.save_invoice(self._effectiveInvoice)
|
||||
self.invoiceSaved.emit()
|
||||
|
||||
@@ -486,7 +486,7 @@ class QEUserEnteredPayment(QEInvoice):
|
||||
self.invoiceCreateError.emit('fatal', _('Error creating payment') + ':\n' + str(e))
|
||||
return
|
||||
|
||||
self.key = self._wallet.wallet.get_key_for_outgoing_invoice(invoice)
|
||||
self.key = invoice.get_id()
|
||||
self._wallet.wallet.save_invoice(invoice)
|
||||
self.invoiceSaved.emit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user