Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Oct 11, 2021
1 parent d22584c commit 3a8efcb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/bin/zksync_api/src/api_server/rest/v02/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,15 @@ mod tests {
token_id: TokenId,
config: &ZkSyncConfig,
) -> anyhow::Result<bool> {
let market_volume = TokenDBCache::get_token_market_volume(storage, token_id).await?;
let min_market_volume = Ratio::from(
BigUint::from_f64(config.ticker.liquidity_volume)
.expect("TickerConfig::liquidity_volume must be positive"),
);
Ok(market_volume
.map(|volume| volume.market_volume.ge(&min_market_volume))
.unwrap_or(false))
let filtered = storage
.tokens_schema()
.filter_tokens_by_market_volume(vec![token_id], &min_market_volume)
.await?;
Ok(!filtered.is_empty())
}

#[actix_rt::test]
Expand Down

0 comments on commit 3a8efcb

Please sign in to comment.