Skip to content

Commit

Permalink
fix: use bigdecimal exported by sqlx (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
montekki authored Aug 14, 2023
1 parent d876360 commit 7e6cbb3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ sqlx = { version = "0.7", features = [
"runtime-tokio-rustls",
"macros"
] }
bigdecimal = "0.3.1"
num = "0.4.1"

client = { path = "../client" }
Expand Down
2 changes: 1 addition & 1 deletion storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ pub async fn add_withdrawals(pool: &PgPool, events: &[StoredWithdrawal]) -> Resu
&tx_hashes,
&block_numbers,
&tokens,
&amounts,
amounts.as_slice(),
&indices_in_tx,
)
.execute(pool)
Expand Down
2 changes: 1 addition & 1 deletion storage/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bigdecimal::BigDecimal;
use ethers::types::U256;
use num::{bigint::ToBigInt, rational::Ratio, traits::Pow, BigUint};
use sqlx::types::BigDecimal;

/// Converts `U256` into the corresponding `BigUint` value.
fn u256_to_biguint(value: U256) -> BigUint {
Expand Down

0 comments on commit 7e6cbb3

Please sign in to comment.