Skip to content

Commit

Permalink
chore: remove shared exchanges_config.rs (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts authored Feb 16, 2023
1 parent 2ae7363 commit cac2c2c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 119 deletions.
12 changes: 11 additions & 1 deletion bitfinex-client/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use reqwest::{
};
use ring::hmac;
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use shared::exchanges_config::BitfinexConfig;
use tracing::instrument;

use std::{collections::HashMap, time::Duration};
Expand All @@ -33,6 +33,16 @@ const REST_API_V2_URL: &str = "https://api.bitfinex.com/v2";
const REST_API_R_SIGNATURE_PATH: &str = "/api/v2/auth/r";
const REST_API_W_SIGNATURE_PATH: &str = "/api/v2/auth/w";

#[derive(Serialize, Deserialize, Debug, Clone, Default)]
pub struct BitfinexConfig {
#[serde(default)]
pub api_key: String,
#[serde(default)]
pub secret_key: String,
#[serde(default)]
pub simulated: bool,
}

#[derive(Clone)]
pub struct BitfinexClient {
client: ReqwestClient,
Expand Down
1 change: 0 additions & 1 deletion bitfinex-client/tests/bitfinex_client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use bitfinex_client::*;

use rust_decimal_macros::dec;
use serial_test::serial;
use shared::exchanges_config::BitfinexConfig;

async fn configured_client() -> anyhow::Result<BitfinexClient> {
let api_key = env::var("BITFINEX_API_KEY")?;
Expand Down
116 changes: 0 additions & 116 deletions shared/src/exchanges_config.rs

This file was deleted.

1 change: 0 additions & 1 deletion shared/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
#![cfg_attr(feature = "fail-on-warnings", deny(clippy::all))]

pub mod exchanges_config;
pub mod health;
pub mod macros;
pub mod payload;
Expand Down

0 comments on commit cac2c2c

Please sign in to comment.