feat(router): add kv implementation for address for payment flows (#2177)

This commit is contained in:
Sai Harsha Vardhan
2023-09-21 15:13:48 +05:30
committed by GitHub
parent eb10aca631
commit afff3e1789
20 changed files with 434 additions and 129 deletions

View File

@@ -148,6 +148,7 @@ async fn drainer(
let payment_intent = "payment_intent";
let payment_attempt = "payment_attempt";
let refund = "refund";
let address = "address";
match db_op {
// TODO: Handle errors
kv::DBOperation::Insert { insertable } => {
@@ -170,6 +171,9 @@ async fn drainer(
kv::Insertable::Refund(a) => {
macro_util::handle_resp!(a.insert(&conn).await, insert_op, refund)
}
kv::Insertable::Address(addr) => {
macro_util::handle_resp!(addr.insert(&conn).await, insert_op, address)
}
}
})
.await;