Skip to content

Commit

Permalink
Some other removal of request_id (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkanoider authored Nov 8, 2024
1 parent 8fd10f3 commit 69052b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/app/add_invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ pub async fn add_invoice_action(
my_keys: &Keys,
pool: &Pool<Sqlite>,
) -> Result<()> {
// Get the order message
let order_msg = msg.get_inner_message_kind();
let request_id = msg.get_inner_message_kind().request_id;
// Get the request id
let request_id = order_msg.request_id;
// Get the order
let mut order = if let Some(order_id) = order_msg.id {
match Order::by_id(pool, order_id).await? {
Some(order) => order,
Expand Down
8 changes: 4 additions & 4 deletions src/app/cancel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub async fn cancel_action(
.await;
let counterparty_pubkey = PublicKey::from_str(&counterparty_pubkey)?;
send_new_order_msg(
request_id,
None,
Some(order.id),
Action::CooperativeCancelAccepted,
None,
Expand All @@ -161,7 +161,7 @@ pub async fn cancel_action(
.await;
let counterparty_pubkey = PublicKey::from_str(&counterparty_pubkey)?;
send_new_order_msg(
request_id,
None,
Some(order.id),
Action::CooperativeCancelInitiatedByPeer,
None,
Expand Down Expand Up @@ -215,7 +215,7 @@ pub async fn cancel_add_invoice(
)
.await;
send_new_order_msg(
request_id,
None,
Some(order.id),
Action::Canceled,
None,
Expand Down Expand Up @@ -284,7 +284,7 @@ pub async fn cancel_pay_hold_invoice(
)
.await;
send_new_order_msg(
request_id,
None,
Some(order.id),
Action::Canceled,
None,
Expand Down

0 comments on commit 69052b2

Please sign in to comment.