mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-15 03:54:21 +01:00
Add zero-amount Receive Chain Swap (#538)
Add support for Zero-Amount Receive Chain Swaps
This commit is contained in:
@@ -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