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:
Daniel Karzel 2021-05-07 19:06:58 +10:00
parent 6d3cf0af91
commit 652aae9590
No known key found for this signature in database
GPG key ID: 30C3FC2E438ADB6E
12 changed files with 319 additions and 81 deletions

View file

@ -84,6 +84,7 @@ where
pub fn new(
balance: monero::Amount,
lock_fee: monero::Amount,
min_buy: bitcoin::Amount,
max_buy: bitcoin::Amount,
latest_rate: LR,
resume_only: bool,
@ -93,6 +94,7 @@ where
spot_price: spot_price::Behaviour::new(
balance,
lock_fee,
min_buy,
max_buy,
latest_rate,
resume_only,