Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
vgantchev committed Oct 25, 2024
1 parent fd87fe9 commit 8cde540
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 44 deletions.
27 changes: 0 additions & 27 deletions integration-tests/src/exchange_asset.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#![cfg(test)]

use crate::kusama_test_net::*;
use basilisk_runtime::Currencies;
use basilisk_runtime::RuntimeOrigin;
use basilisk_runtime::XYK;
use frame_support::dispatch::GetDispatchInfo;
use frame_support::{assert_ok, pallet_prelude::*};
use hydradx_traits::router::AssetPair;
use hydradx_traits::router::PoolType;
use hydradx_traits::router::Trade;
use orml_traits::currency::MultiCurrency;
use polkadot_xcm::{
opaque::v3::{Junction, Junctions::X2, MultiLocation},
Expand Down Expand Up @@ -288,26 +284,3 @@ fn create_xyk_pool(asset_a: u32, asset_b: u32) {
50 * UNITS,
));
}

fn create_xyk_pool_with_amounts(asset_a: u32, amount_a: u128, asset_b: u32, amount_b: u128) {
assert_ok!(Currencies::update_balance(
RuntimeOrigin::root(),
DAVE.into(),
asset_a,
amount_a as i128,
));

assert_ok!(Currencies::update_balance(
RuntimeOrigin::root(),
DAVE.into(),
asset_b,
amount_b as i128,
));
assert_ok!(XYK::create_pool(
RuntimeOrigin::signed(DAVE.into()),
asset_a,
amount_a,
asset_b,
amount_b,
));
}
15 changes: 1 addition & 14 deletions integration-tests/src/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ use primitives::constants::chain::CORE_ASSET_ID;
pub use xcm_emulator::Network;
use xcm_emulator::{decl_test_networks, decl_test_parachains, decl_test_relay_chains};

pub type Rococo = RococoRelayChain<TestNet>;
pub type Basilisk = BasiliskParachain<TestNet>;
pub type OtherParachain = OtherPara<TestNet>;

Expand Down Expand Up @@ -483,18 +482,6 @@ pub fn expect_basilisk_events(e: Vec<basilisk_runtime::RuntimeEvent>) {
assert_eq!(last_basilisk_events(e.len()), e);
}

pub fn expect_basilisk_event(e: basilisk_runtime::RuntimeEvent) {
let last_10_events = last_basilisk_events(10);
let mut found = false;
for event in last_10_events {
if event == e {
found = true;
break;
}
}
assert!(found, "Event not found in the last 10 basilisk events");
}

#[allow(dead_code)]
pub fn last_parachain_events(n: usize) -> Vec<basilisk_runtime::RuntimeEvent> {
frame_system::Pallet::<basilisk_runtime::Runtime>::events()
Expand Down Expand Up @@ -716,7 +703,7 @@ pub fn set_para_slot_info(number: u64) {
// ));
frame_support::storage::unhashed::put(
&frame_support::storage::storage_prefix(b"AuraExt", b"SlotInfo"),
&((Slot::from(number), 0)),
&(Slot::from(number), 0),
);
}

Expand Down
2 changes: 0 additions & 2 deletions pallets/asset-registry/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![cfg(test)]

use frame_support::parameter_types;
use frame_system as system;
use sp_core::H256;
Expand Down
2 changes: 1 addition & 1 deletion runtime/basilisk/src/governance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl pallet_conviction_voting::Config for Runtime {
}

parameter_types! {
pub const MaxBalance: Balance = Balance::max_value();
pub const MaxBalance: Balance = Balance::MAX;
}
pub type TreasurySpender = EitherOf<EnsureRootWithSuccess<AccountId, MaxBalance>, Spender>;

Expand Down

0 comments on commit 8cde540

Please sign in to comment.