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

@@ -324,6 +324,7 @@ message SendpayResponse {
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
optional uint64 completed_at = 15;
Amount amount_sent_msat = 8;
optional string label = 9;
optional uint64 partid = 10;
@@ -918,6 +919,7 @@ message WaitsendpayResponse {
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
optional double completed_at = 14;
Amount amount_sent_msat = 8;
optional string label = 9;
optional uint64 partid = 10;
@@ -1263,6 +1265,7 @@ message ListpaysPays {
ListpaysPaysStatus status = 2;
optional bytes destination = 3;
uint64 created_at = 4;
optional uint64 completed_at = 12;
optional string label = 5;
optional string bolt11 = 6;
optional string description = 11;

View File

@@ -232,6 +232,7 @@ impl From<&responses::SendpayResponse> for pb::SendpayResponse {
amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat?
destination: c.destination.as_ref().map(|v| v.to_vec()), // Rule #2 for type pubkey?
created_at: c.created_at.clone(), // Rule #2 for type u64
completed_at: c.completed_at.clone(), // Rule #2 for type u64?
amount_sent_msat: Some(c.amount_sent_msat.into()), // Rule #2 for type msat
label: c.label.clone(), // Rule #2 for type string?
partid: c.partid.clone(), // Rule #2 for type u64?
@@ -683,6 +684,7 @@ impl From<&responses::WaitsendpayResponse> for pb::WaitsendpayResponse {
amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat?
destination: c.destination.as_ref().map(|v| v.to_vec()), // Rule #2 for type pubkey?
created_at: c.created_at.clone(), // Rule #2 for type u64
completed_at: c.completed_at.clone(), // Rule #2 for type number?
amount_sent_msat: Some(c.amount_sent_msat.into()), // Rule #2 for type msat
label: c.label.clone(), // Rule #2 for type string?
partid: c.partid.clone(), // Rule #2 for type u64?
@@ -924,6 +926,7 @@ impl From<&responses::ListpaysPays> for pb::ListpaysPays {
status: c.status as i32,
destination: c.destination.as_ref().map(|v| v.to_vec()), // Rule #2 for type pubkey?
created_at: c.created_at.clone(), // Rule #2 for type u64
completed_at: c.completed_at.clone(), // Rule #2 for type u64?
label: c.label.clone(), // Rule #2 for type string?
bolt11: c.bolt11.clone(), // Rule #2 for type string?
description: c.description.clone(), // Rule #2 for type string?