Skip to content

Commit

Permalink
chore: replace big-decimal dep to hp-float
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-wright committed Jun 28, 2023
1 parent 5a723f0 commit 8fa7331
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2332,11 +2332,11 @@ dependencies = [
"affair",
"anyhow",
"async-trait",
"big-decimal",
"draco-application",
"draco-interfaces",
"draco-test-utils",
"fleek-crypto",
"hp-float",
"serde",
"tokio",
]
Expand All @@ -2348,9 +2348,9 @@ dependencies = [
"affair",
"anyhow",
"async-trait",
"big-decimal",
"draco-interfaces",
"fleek-crypto",
"hp-float",
"rand 0.8.5",
"scc",
"serde",
Expand Down
2 changes: 1 addition & 1 deletion core/signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ affair.workspace = true

[dev-dependencies]
draco-test-utils = {path="../test-utils"}
big-decimal.workspace = true
hp-float.workspace = true
6 changes: 3 additions & 3 deletions core/signer/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::{collections::BTreeMap, time::Duration};

use affair::Socket;
use anyhow::{anyhow, Result};
use big_decimal::BigDecimal;
use draco_application::{app::Application, config::Config as AppConfig};
use draco_interfaces::{
application::{ApplicationInterface, BlockExecutionResponse},
Expand All @@ -17,6 +16,7 @@ use draco_interfaces::{
};
use draco_test_utils::consensus::{Config as ConsensusConfig, MockConsensus};
use fleek_crypto::{AccountOwnerPublicKey, AccountOwnerSignature, NodePublicKey};
use hp_float::unsigned::HpUfloat;

use crate::{config::Config, Signer};

Expand All @@ -34,7 +34,7 @@ fn get_update_request_account(
}

async fn deposit(
amount: BigDecimal<18>,
amount: HpUfloat<18>,
token: Tokens,
sender: AccountOwnerPublicKey,
update_socket: &Socket<Block, BlockExecutionResponse>,
Expand Down Expand Up @@ -65,7 +65,7 @@ async fn run_transaction(
}

async fn stake(
amount: BigDecimal<18>,
amount: HpUfloat<18>,
node_public_key: NodePublicKey,
sender: AccountOwnerPublicKey,
update_socket: &Socket<Block, BlockExecutionResponse>,
Expand Down
2 changes: 1 addition & 1 deletion core/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ rand.workspace = true
serde.workspace = true
tokio.workspace = true
scc.workspace = true
big-decimal.workspace = true
hp-float.workspace = true

0 comments on commit 8fa7331

Please sign in to comment.