mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-18 13:34:22 +01:00
Add zero-amount Receive Chain Swap (#538)
Add support for Zero-Amount Receive Chain Swaps
This commit is contained in:
4
cli/Cargo.lock
generated
4
cli/Cargo.lock
generated
@@ -1,6 +1,6 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
@@ -609,7 +609,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "boltz-client"
|
||||
version = "0.1.3"
|
||||
source = "git+https://github.com/SatoshiPortal/boltz-rust?branch=trunk#19e01071f5722c21f80ae9b34edef5c3972e9e0b"
|
||||
source = "git+https://github.com/SatoshiPortal/boltz-rust?branch=trunk#68ff15b0f80abfa54d8dca4c11c8c2794e4b6921"
|
||||
dependencies = [
|
||||
"bip39",
|
||||
"bitcoin 0.31.2",
|
||||
|
||||
@@ -271,13 +271,21 @@ pub(crate) async fn handle_command(
|
||||
})
|
||||
.await?;
|
||||
|
||||
wait_confirmation!(
|
||||
format!(
|
||||
"Fees: {} sat. Are the fees acceptable? (y/N) ",
|
||||
prepare_response.fees_sat
|
||||
),
|
||||
"Payment receive halted"
|
||||
);
|
||||
let fees = prepare_response.fees_sat;
|
||||
let confirmation_msg = match payer_amount_sat {
|
||||
Some(_) => format!("Fees: {fees} sat. Are the fees acceptable? (y/N)"),
|
||||
None => {
|
||||
let min = prepare_response.min_payer_amount_sat;
|
||||
let max = prepare_response.max_payer_amount_sat;
|
||||
let service_feerate = prepare_response.service_feerate;
|
||||
format!(
|
||||
"Fees: {fees} sat + {service_feerate:?}% of the sent amount. \
|
||||
Sender should send between {min:?} sat and {max:?} sat. \
|
||||
Are the fees acceptable? (y/N)"
|
||||
)
|
||||
}
|
||||
};
|
||||
wait_confirmation!(confirmation_msg, "Payment receive halted");
|
||||
|
||||
let response = sdk
|
||||
.receive_payment(&ReceivePaymentRequest {
|
||||
|
||||
Reference in New Issue
Block a user