Simplify invoices and requests.
- We need only two types: PR_TYPE_ONCHAIN and PR_TYPE_LN - BIP70 is no longer a type, but an optional field in the dict - Invoices in the wallet are indexed by a hash of their serialized list of outputs. - Requests are still indexed by address, because we never generate Paytomany requests. - Add 'clear_invoices' command to CLI - Add 'save invoice' button to Qt
This commit is contained in:
@@ -61,7 +61,6 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
|
||||
self.errors = []
|
||||
self.is_pr = False
|
||||
self.is_alias = False
|
||||
self.is_lightning = False
|
||||
self.update_size()
|
||||
self.payto_address = None
|
||||
self.previous_payto = ''
|
||||
@@ -143,6 +142,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
|
||||
except:
|
||||
pass
|
||||
if self.payto_address:
|
||||
self.win.set_onchain(True)
|
||||
self.win.lock_amount(False)
|
||||
return
|
||||
|
||||
@@ -153,12 +153,13 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
|
||||
except:
|
||||
self.errors.append((i, line.strip()))
|
||||
continue
|
||||
|
||||
outputs.append(output)
|
||||
if output.value == '!':
|
||||
is_max = True
|
||||
else:
|
||||
total += output.value
|
||||
if outputs:
|
||||
self.win.set_onchain(True)
|
||||
|
||||
self.win.max_button.setChecked(is_max)
|
||||
self.outputs = outputs
|
||||
|
||||
Reference in New Issue
Block a user