Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some other removal of request_id #387

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading