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

@@ -267,7 +267,7 @@ class ElectrumGui(BaseElectrumGui, EventListener):
fmt = self.format_column_width(x, [-20, '*', 15, 25])
headers = fmt % ("Date", "Description", "Amount", "Status")
for req in self.wallet.get_unpaid_invoices():
key = self.wallet.get_key_for_outgoing_invoice(req)
key = req.get_id()
status = self.wallet.get_invoice_status(req)
status_str = req.get_status_str(status)
timestamp = req.get_time()
@@ -287,7 +287,7 @@ class ElectrumGui(BaseElectrumGui, EventListener):
fmt = self.format_column_width(x, [-20, '*', 15, 25])
headers = fmt % ("Date", "Description", "Amount", "Status")
for req in self.wallet.get_unpaid_requests():
key = self.wallet.get_key_for_receive_request(req)
key = req.get_id()
status = self.wallet.get_invoice_status(req)
status_str = req.get_status_str(status)
timestamp = req.get_time()