diff --git a/coordinator/src/routes.rs b/coordinator/src/routes.rs index 64f17309b..d1b0ca7d0 100644 --- a/coordinator/src/routes.rs +++ b/coordinator/src/routes.rs @@ -623,7 +623,7 @@ async fn create_invoice( let invoice_params = invoice_params.value; let invoice_amount = invoice_params.amt_sats; - let hash = invoice_params.r_hash.clone(); + let r_hash = invoice_params.r_hash.clone(); let mut connection = state .pool @@ -635,15 +635,15 @@ async fn create_invoice( .create_invoice(InvoiceParams { value: invoice_amount, memo: "Fund your 10101 position".to_string(), - expiry: 10 * 60, // 10 minutes - hash: hash.clone(), + expiry: 5 * 60, // 5 minutes + hash: r_hash.clone(), }) .await .map_err(|e| AppError::InternalServerError(format!("{e:#}")))?; db::hodl_invoice::create_hodl_invoice( &mut connection, - hash.as_str(), + r_hash.as_str(), public_key, invoice_amount, ) @@ -660,7 +660,7 @@ async fn create_invoice( tracing::info!( trader_pubkey = public_key.to_string(), - hash, + r_hash, amount_sats = invoice_amount, "Started watching for hodl invoice" ); diff --git a/mobile/native/src/hodl_invoice.rs b/mobile/native/src/hodl_invoice.rs index 17dd77c6b..94f0f5ff0 100644 --- a/mobile/native/src/hodl_invoice.rs +++ b/mobile/native/src/hodl_invoice.rs @@ -11,7 +11,7 @@ pub struct HodlInvoice { pub payment_request: String, pub pre_image: String, pub r_hash: String, - pub amt_sats: Amount, + pub amount: Amount, } pub async fn get_hodl_invoice_from_coordinator(amount: Amount) -> Result { @@ -42,7 +42,8 @@ pub async fn get_hodl_invoice_from_coordinator(amount: Amount) -> Result