wallet: Load and value completed_at timestamp from DB

This commit is contained in:
Christian Decker
2022-06-09 18:36:00 +02:00
parent daeec66bd7
commit cb3ee0ac2e
20 changed files with 343 additions and 325 deletions

View File

@@ -64,6 +64,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was completed"
},
"groupid": {
"type": "u64",
"description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash"

View File

@@ -40,6 +40,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was completed"
},
"label": {
"type": "string",
"description": "the label, if given to sendpay"
@@ -58,45 +62,6 @@
}
},
"allOf": [
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [
"pending",
"complete"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"amount_sent_msat"
],
"properties": {
"payment_hash": {},
"status": {},
"destination": {},
"created_at": {},
"label": {},
"bolt11": {},
"description": {},
"bolt12": {},
"preimage": {},
"number_of_parts": {},
"amount_msat": {
"type": "msat",
"description": "the amount the destination received, if known"
},
"amount_sent_msat": {
"type": "msat",
"description": "the amount we actually sent, including fees"
}
}
}
},
{
"if": {
"properties": {
@@ -111,6 +76,7 @@
"then": {
"additionalProperties": false,
"required": [
"amount_sent_msat",
"preimage"
],
"properties": {
@@ -118,6 +84,7 @@
"status": {},
"destination": {},
"created_at": {},
"completed_at": {},
"label": {},
"bolt11": {},
"description": {},
@@ -150,7 +117,9 @@
},
"then": {
"additionalProperties": false,
"required": [],
"required": [
"amount_sent_msat"
],
"properties": {
"payment_hash": {},
"status": {},

View File

@@ -108,6 +108,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
@@ -147,6 +148,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},

View File

@@ -47,6 +47,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was completed"
},
"msatoshi_sent": {
"deprecated": true
},
@@ -97,6 +101,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
@@ -137,6 +142,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},

View File

@@ -46,6 +46,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "number",
"description": "the UNIX timestamp showing when this payment was completed"
},
"msatoshi_sent": {
"deprecated": true
},
@@ -96,6 +100,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},