Skip to content

Commit

Permalink
Fixing benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
hbulgarini committed Mar 7, 2024
1 parent bbd08d7 commit 7edda5c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pallets/payments/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,17 @@ mod benchmarks {
create_and_mint_asset::<T>(&sender, &beneficiary, &asset)?;
let amount = <BalanceOf<T>>::from(100000_u32);

assert_ok!(Payments::<T>::request_payment(
RawOrigin::Signed(beneficiary.clone()).into(),
sender_lookup,
asset,
amount
));
let Event::PaymentRequestCreated { payment_id } = last_event::<T>() else {
unreachable!()
};
let (payment_id, _) = Payments::<T>::create_payment(
&sender,
beneficiary,
asset.clone(),
amount.clone(),
PaymentState::PaymentRequested,
T::IncentivePercentage::get(),
None,
)?;

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

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

0 comments on commit 7edda5c

Please sign in to comment.