Skip to content

Commit

Permalink
fix mocks and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Nov 1, 2023
1 parent 57ce0a9 commit 5080f1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
16 changes: 3 additions & 13 deletions parachain/pallets/control/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate as snowbridge_control;
use frame_support::{
parameter_types,
traits::{tokens::fungible::Mutate, ConstU128, ConstU16, ConstU64, ConstU8, Contains},
traits::{tokens::fungible::Mutate, ConstU128, ConstU16, ConstU64, ConstU8},
weights::IdentityFee,
PalletId,
};
Expand Down Expand Up @@ -132,6 +132,7 @@ impl pallet_balances::Config for Test {
type FreezeIdentifier = ();
type MaxFreezes = ();
type RuntimeHoldReason = ();
type RuntimeFreezeReason = ();
type MaxHolds = ();
}

Expand Down Expand Up @@ -201,23 +202,12 @@ impl BenchmarkHelper<RuntimeOrigin> for () {
}
}

pub struct AllowSiblingsOnly;
impl Contains<MultiLocation> for AllowSiblingsOnly {
fn contains(location: &MultiLocation) -> bool {
if let MultiLocation { parents: 1, interior: X1(Parachain(_)) } = location {
true
} else {
false
}
}
}

impl crate::Config for Test {
type RuntimeEvent = RuntimeEvent;
type OwnParaId = OwnParaId;
type OutboundQueue = OutboundQueue;
type MessageHasher = BlakeTwo256;
type SiblingOrigin = pallet_xcm_origin::EnsureXcm<AllowSiblingsOnly>;
type SiblingOrigin = pallet_xcm_origin::EnsureXcm<snowbridge_control::AllowSiblingsOnly>;
type AgentIdOf = HashedDescription<AgentId, DescribeFamily<DescribeAllTerminal>>;
type TreasuryAccount = TreasuryAccount;
type Token = Balances;
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/inbound-queue/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl pallet_balances::Config for Test {
type FreezeIdentifier = ();
type MaxFreezes = ();
type RuntimeHoldReason = ();
type RuntimeFreezeReason = ();
type MaxHolds = ();
}

Expand Down

0 comments on commit 5080f1e

Please sign in to comment.