Skip to content

Commit

Permalink
chore: rename outer event in mocks
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Nov 11, 2022
1 parent 767a708 commit 484df9b
Show file tree
Hide file tree
Showing 16 changed files with 81 additions and 85 deletions.
10 changes: 3 additions & 7 deletions crates/annuity/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -115,7 +115,7 @@ parameter_types! {

impl Config for Test {
type AnnuityPalletId = AnnuityPalletId;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BlockRewardProvider = MockBlockRewardProvider;
type BlockNumberToBalance = Identity;
Expand All @@ -124,11 +124,7 @@ impl Config for Test {
type WeightInfo = ();
}

pub type TestEvent = Event;
// pub type TestError = Error<Test>;

// pub const ALICE: AccountId = 1;
// pub const BOB: AccountId = 2;
pub type TestEvent = RuntimeEvent;

pub struct ExtBuilder;

Expand Down
8 changes: 4 additions & 4 deletions crates/btc-relay/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand All @@ -75,7 +75,7 @@ parameter_types! {
}

impl Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type ParachainBlocksPerBitcoinBlock = ParachainBlocksPerBitcoinBlock;
type WeightInfo = ();
}
Expand All @@ -92,10 +92,10 @@ impl pallet_timestamp::Config for Test {
}

impl security::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;
pub type TestError = Error<Test>;

pub struct ExtBuilder;
Expand Down
6 changes: 3 additions & 3 deletions crates/clients-info/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand All @@ -59,10 +59,10 @@ impl frame_system::Config for Test {
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;

impl Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}

Expand Down
4 changes: 2 additions & 2 deletions crates/currency/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -129,7 +129,7 @@ parameter_types! {
pub const MinimumPeriod: Moment = 5;
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;

pub struct ExtBuilder;

Expand Down
6 changes: 3 additions & 3 deletions crates/escrow/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -84,7 +84,7 @@ parameter_types! {
}

impl Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockNumberToBalance = Identity;
type Currency = Balances;
type Span = Span;
Expand All @@ -93,7 +93,7 @@ impl Config for Test {
type WeightInfo = ();
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;
pub type TestError = Error<Test>;

pub const ALICE: AccountId = 1;
Expand Down
10 changes: 5 additions & 5 deletions crates/fee/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -118,7 +118,7 @@ impl orml_tokens::Config for Test {
}

impl reward::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type RewardId = VaultId<AccountId, CurrencyId>;
type CurrencyId = CurrencyId;
Expand All @@ -127,7 +127,7 @@ impl reward::Config for Test {
}

impl staking::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type SignedInner = SignedInner;
type CurrencyId = CurrencyId;
Expand All @@ -146,7 +146,7 @@ impl pallet_timestamp::Config for Test {
}

impl security::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
}

pub struct CurrencyConvert;
Expand Down Expand Up @@ -188,7 +188,7 @@ impl Config for Test {
type MaxExpectedValue = MaxExpectedValue;
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;

#[allow(dead_code)]
pub type TestError = Error<Test>;
Expand Down
18 changes: 9 additions & 9 deletions crates/issue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -128,7 +128,7 @@ impl orml_tokens::Config for Test {
}

impl reward::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type RewardId = VaultId<AccountId, CurrencyId>;
type CurrencyId = CurrencyId;
Expand All @@ -150,7 +150,7 @@ where

impl vault_registry::Config for Test {
type PalletId = VaultPalletId;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type WeightInfo = ();
type GetGriefingCollateralCurrencyId = GetNativeCurrencyId;
Expand Down Expand Up @@ -184,7 +184,7 @@ impl currency::Config for Test {
}

impl staking::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type SignedInner = SignedInner;
type CurrencyId = CurrencyId;
Expand All @@ -196,13 +196,13 @@ parameter_types! {
}

impl btc_relay::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type ParachainBlocksPerBitcoinBlock = ParachainBlocksPerBitcoinBlock;
type WeightInfo = ();
}

impl security::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
}

parameter_types! {
Expand All @@ -217,7 +217,7 @@ impl pallet_timestamp::Config for Test {
}

impl oracle::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}

Expand Down Expand Up @@ -248,12 +248,12 @@ impl Convert<BlockNumber, Balance> for BlockNumberToBalance {
}

impl Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockNumberToBalance = BlockNumberToBalance;
type WeightInfo = ();
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;
pub type TestError = Error<Test>;
pub type VaultRegistryError = vault_registry::Error<Test>;

Expand Down
16 changes: 8 additions & 8 deletions crates/nomination/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -133,7 +133,7 @@ impl orml_tokens::Config for Test {
}

impl reward::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type RewardId = VaultId<AccountId, CurrencyId>;
type CurrencyId = CurrencyId;
Expand All @@ -155,7 +155,7 @@ where

impl vault_registry::Config for Test {
type PalletId = VaultPalletId;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type WeightInfo = ();
type GetGriefingCollateralCurrencyId = GetNativeCurrencyId;
Expand Down Expand Up @@ -189,15 +189,15 @@ impl currency::Config for Test {
}

impl staking::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type SignedInner = SignedInner;
type CurrencyId = CurrencyId;
type GetNativeCurrencyId = GetNativeCurrencyId;
}

impl security::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
}

parameter_types! {
Expand Down Expand Up @@ -230,16 +230,16 @@ impl fee::Config for Test {
}

impl oracle::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}

impl Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;
pub type TestError = Error<Test>;

pub const ALICE: VaultId<AccountId, CurrencyId> = VaultId {
Expand Down
10 changes: 5 additions & 5 deletions crates/oracle/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl frame_system::Config for Test {
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
type Version = ();
type PalletInfo = PalletInfo;
Expand Down Expand Up @@ -137,7 +137,7 @@ impl currency::Config for Test {
}

impl Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}

Expand All @@ -153,18 +153,18 @@ impl pallet_timestamp::Config for Test {
}

impl security::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
}

impl staking::Config for Test {
type Event = TestEvent;
type RuntimeEvent = RuntimeEvent;
type SignedFixedPoint = SignedFixedPoint;
type SignedInner = SignedInner;
type CurrencyId = CurrencyId;
type GetNativeCurrencyId = GetNativeCurrencyId;
}

pub type TestEvent = Event;
pub type TestEvent = RuntimeEvent;
pub type TestError = Error<Test>;

pub struct ExtBuilder;
Expand Down
Loading

0 comments on commit 484df9b

Please sign in to comment.