Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hbulgarini committed Mar 7, 2024
1 parent 7edda5c commit 477642f
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions pallets/payments/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ macro_rules! assert_has_event {
};
}

fn last_event<T: Config>() -> pallet::Event<T> {
let Ok(e) = <T as Config>::RuntimeEvent::from(
frame_system::Pallet::<T>::events()
.last()
.expect("An event occurred")
.event
.clone(),
)
.try_into() else {
unreachable!()
};
e
}

fn create_accounts<T: Config>() -> (T::AccountId, T::AccountId, AccountIdLookupOf<T>, AccountIdLookupOf<T>) {
let sender: T::AccountId = account("Alice", 0, 10);
let beneficiary: T::AccountId = account("Bob", 0, 11);
Expand Down Expand Up @@ -243,7 +229,7 @@ mod benchmarks {

#[benchmark]
fn accept_and_pay() -> Result<(), BenchmarkError> {
let (sender, beneficiary, sender_lookup, _beneficiary_lookup) = create_accounts::<T>();
let (sender, beneficiary, _sender_lookup, _beneficiary_lookup) = create_accounts::<T>();
let asset: AssetIdOf<T> = <AssetIdOf<T>>::zero();
create_and_mint_asset::<T>(&sender, &beneficiary, &asset)?;
let amount = <BalanceOf<T>>::from(100000_u32);
Expand All @@ -258,8 +244,6 @@ mod benchmarks {
None,
)?;

assert_has_event!(Event::PaymentRequestCreated { .. });

#[extrinsic_call]
_(RawOrigin::Signed(sender.clone()), payment_id);

Expand Down

0 comments on commit 477642f

Please sign in to comment.