1
0

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:
ThomasV
2022-08-15 14:14:25 +02:00
parent 7d317761da
commit 14e96f4d53
11 changed files with 114 additions and 101 deletions

View File

@@ -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()