Skip to content

Commit

Permalink
Use max(10 x dust, 0.00777) as min_volume + minor API additions #849 #…
Browse files Browse the repository at this point in the history
…838 #833 (#858)

* WIP.

* WIP. Refactor.

* WIP.

* WIP. Refactoring.

* WIP. Add maker_order_timeout to MM2 json conf.

* WIP. Add my_order_uuid to my_swap_status.

* Fix tests.

* WIP. Tests fail.

* Calculate min_volume using min_tx_amount on setprice.

* Replace match with unwrap_or_else.
  • Loading branch information
artemii235 authored Mar 15, 2021
1 parent 5b76d52 commit 4716289
Show file tree
Hide file tree
Showing 9 changed files with 741 additions and 532 deletions.
2 changes: 1 addition & 1 deletion mm2src/coins/test_coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct TestCoin {}
#[mockable]
#[allow(clippy::forget_ref, clippy::forget_copy, clippy::cast_ref_to_mut)]
impl MarketCoinOps for TestCoin {
fn ticker(&self) -> &str { unimplemented!() }
fn ticker(&self) -> &str { "test" }

fn my_address(&self) -> Result<String, String> { unimplemented!() }

Expand Down
5 changes: 3 additions & 2 deletions mm2src/docker_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2496,12 +2496,13 @@ mod docker_tests {
"rel": "MYCOIN1",
"price": 1,
"volume": 1,
"timeout": 2,
})))
.unwrap();
assert!(rc.0.is_success(), "!sell: {}", rc.1);

log!("Give Bob 35 seconds to convert order to maker");
thread::sleep(Duration::from_secs(35));
log!("Give Bob 4 seconds to convert order to maker");
thread::sleep(Duration::from_secs(4));

let rc = block_on(mm_alice.rpc(json! ({
"userpass": mm_alice.userpass,
Expand Down
Loading

0 comments on commit 4716289

Please sign in to comment.