Skip to content

Commit

Permalink
Last clippy run
Browse files Browse the repository at this point in the history
  • Loading branch information
ueco-jb committed Dec 1, 2023
1 parent 6e6441a commit 343ec25
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion contracts/pool/src/mock_querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::marker::PhantomData;
use coreum_wasm_sdk::core::CoreumQueries;
use cosmwasm_std::testing::{MockApi, MockQuerier, MockStorage, MOCK_CONTRACT_ADDR};
use cosmwasm_std::{
from_json, from_json, to_json_binary, Addr, Coin, Decimal, OwnedDeps, Querier, QuerierResult,
from_json, to_json_binary, Addr, Coin, Decimal, OwnedDeps, Querier, QuerierResult,
QueryRequest, SystemError, SystemResult, Uint128, WasmQuery,
};

Expand Down
2 changes: 1 addition & 1 deletion contracts/pool_stable/src/mock_querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::marker::PhantomData;
use coreum_wasm_sdk::core::CoreumQueries;
use cosmwasm_std::testing::{MockApi, MockQuerier, MockStorage, MOCK_CONTRACT_ADDR};
use cosmwasm_std::{
from_json, from_json, to_json_binary, Addr, Coin, Decimal, OwnedDeps, Querier, QuerierResult,
from_json, to_json_binary, Addr, Coin, Decimal, OwnedDeps, Querier, QuerierResult,
QueryRequest, SystemError, SystemResult, Uint128, WasmQuery,
};

Expand Down
29 changes: 14 additions & 15 deletions contracts/pool_stable/src/testing.rs
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
use coreum_wasm_sdk::{assetft, core::CoreumMsg};
use cosmwasm_std::testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR};
use cosmwasm_std::{
coin, to_json_binary, Addr, BlockInfo, Coin, Decimal, Env, ReplyOn, Timestamp, Uint128,
testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR},
{coin, to_json_binary, Addr, BlockInfo, Coin, Decimal, Env, ReplyOn, Timestamp, Uint128},
};
use cw20::Cw20ReceiveMsg;

use dex::asset::{Asset, AssetInfo, AssetInfoValidated, MINIMUM_LIQUIDITY_AMOUNT};

use dex::fee_config::FeeConfig;

use dex::pool::MigrateMsg;
use dex::pool::{
ContractError, Cw20HookMsg, ExecuteMsg, InstantiateMsg, StablePoolParams, StakeConfig,
LP_TOKEN_PRECISION,
use dex::{
asset::{Asset, AssetInfo, AssetInfoValidated, MINIMUM_LIQUIDITY_AMOUNT},
fee_config::FeeConfig,
pool::{
ContractError, Cw20HookMsg, ExecuteMsg, InstantiateMsg, MigrateMsg, StablePoolParams,
StakeConfig, LP_TOKEN_PRECISION,
},
};

use crate::contract::{execute, instantiate, migrate};
use crate::state::CONFIG;
// TODO: Copied here just as a temporary measure
use crate::mock_querier::mock_dependencies;
use crate::{
contract::{execute, instantiate, migrate},
mock_querier::mock_dependencies,
state::CONFIG,
};

pub type Response = cosmwasm_std::Response<CoreumMsg>;
pub type SubMsg = cosmwasm_std::SubMsg<CoreumMsg>;

fn default_stake_config() -> StakeConfig {
Expand Down
4 changes: 2 additions & 2 deletions contracts/stake/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ mod tests {

// make sure distribution logic is set up properly
let raw = query(deps.as_ref(), mock_env(), QueryMsg::DistributionData {}).unwrap();
let res: DistributionDataResponse = from_json(&raw).unwrap();
let res: DistributionDataResponse = from_json(raw).unwrap();
assert_eq!(
res.distributions,
vec![(
Expand All @@ -1426,7 +1426,7 @@ mod tests {
},
)
.unwrap();
let res: WithdrawAdjustmentDataResponse = from_json(&raw).unwrap();
let res: WithdrawAdjustmentDataResponse = from_json(raw).unwrap();
assert_eq!(
res,
WithdrawAdjustment {
Expand Down

0 comments on commit 343ec25

Please sign in to comment.