mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 05:24:42 -04:00
Introduce a minimum buy amount
Introduces a minimum buy Bitcoin amount similar to the maximum amount already present. For the CLI the minimum amount is enforced by waiting until at least the minimum is available as max-giveable amount.
This commit is contained in:
parent
6d3cf0af91
commit
652aae9590
12 changed files with 319 additions and 81 deletions
|
@ -226,6 +226,7 @@ async fn start_alice(
|
|||
|
||||
let current_balance = monero_wallet.get_balance().await.unwrap();
|
||||
let lock_fee = monero_wallet.static_tx_fee_estimate();
|
||||
let min_buy = bitcoin::Amount::from_sat(u64::MIN);
|
||||
let max_buy = bitcoin::Amount::from_sat(u64::MAX);
|
||||
let latest_rate = FixedRate::default();
|
||||
let resume_only = false;
|
||||
|
@ -234,6 +235,7 @@ async fn start_alice(
|
|||
&seed,
|
||||
current_balance,
|
||||
lock_fee,
|
||||
min_buy,
|
||||
max_buy,
|
||||
latest_rate,
|
||||
resume_only,
|
||||
|
@ -248,7 +250,8 @@ async fn start_alice(
|
|||
monero_wallet,
|
||||
db,
|
||||
FixedRate::default(),
|
||||
bitcoin::Amount::ONE_BTC,
|
||||
min_buy,
|
||||
max_buy,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue