def invoice_to_model(self, invoice: Invoice): item = super().invoice_to_model(invoice) item['type'] = 'request' item['key'] = invoice.get_id() if invoice.is_lightning() else invoice.get_address() return item
def invoice_to_model(self, invoice: Invoice): item = super().invoice_to_model(invoice) item['type'] = 'invoice' item['key'] = invoice.get_id() return item