Skip to content

Commit d646d85

Browse files
committed
PR fixes
1 parent 55a21b7 commit d646d85

File tree

4 files changed

+7
-27
lines changed

4 files changed

+7
-27
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openlimits"
3-
version = "0.1.7"
3+
version = "0.1.6"
44
authors = ["steffel <2143646+steffenix@users.noreply.github.com>", "Ethan Fast <ethan@nash.io>"]
55
edition = "2018"
66
description = "A open source Rust high performance cryptocurrency trading API with support for multiple exchanges and language wrappers. Focused in safety, correctness and speed."

src/coinbase/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pub type Result<T> = std::result::Result<T, OpenLimitsError>;
1+
pub type Result<T> = std::result::Result<T, OpenLimitsError>;

src/nash/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,12 @@ impl From<nash_protocol::types::Trade> for Trade {
467467
let price = Decimal::from_str(&resp.limit_price.to_string())
468468
.expect("Couldn't parse Decimal from string.");
469469

470-
let (fees, _order_id) = match resp.account_side {
471-
nash_protocol::types::AccountTradeSide::Taker => (
470+
let fees = match resp.account_side {
471+
nash_protocol::types::AccountTradeSide::Taker => {
472472
Decimal::from_str(&resp.taker_fee.to_string())
473-
.expect("Couldn't parse Decimal from string."),
474-
resp.taker_order_id.clone(),
475-
),
476-
_ => (Decimal::from(0), resp.maker_order_id.clone()),
473+
.expect("Couldn't parse Decimal from string.")
474+
}
475+
_ => Decimal::from(0),
477476
};
478477

479478
let (buyer_order_id, seller_order_id) = match resp.direction {

tests/nash/account.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use openlimits::{
1414
};
1515
use rust_decimal::prelude::{Decimal, FromStr};
1616
use std::env;
17-
use std::sync::Arc;
1817
use std::time::Duration as NativeDuration;
1918

2019
// FIXME: https://github.com/nash-io/openlimits/issues/157
@@ -197,7 +196,6 @@ async fn get_order_history() {
197196
let exchange = init().await;
198197
let req = GetOrderHistoryRequest {
199198
market_pair: Some(String::from("eth_btc")),
200-
order_status: None,
201199
paginator: None,
202200
};
203201

@@ -208,23 +206,6 @@ async fn get_order_history() {
208206
println!("{:?}", resp);
209207
}
210208

211-
#[tokio::test]
212-
async fn test_concurrent_requests() {
213-
let exchange = init().await;
214-
let client = Arc::new(exchange);
215-
async fn make_request(client: Arc<Nash>, i: u64) {
216-
let req = client.get_account_balances(None).await;
217-
if !req.is_err() {
218-
println!("completed req {}", i);
219-
}
220-
}
221-
let mut tasks = Vec::new();
222-
for i in 0..10 {
223-
tasks.push(tokio::spawn(make_request(client.clone(), i)));
224-
}
225-
futures::future::join_all(tasks).await;
226-
}
227-
228209
// #[tokio::test]
229210
// async fn get_all_open_orders() {
230211
// let mut exchange = init().await;

0 commit comments

Comments
 (0)