Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Harald Heckmann <mail@haraldheckmann.de>
  • Loading branch information
maltekliemann and sea212 authored Apr 7, 2024
1 parent d59edfd commit 9e54353
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions zrml/prediction-markets/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ benchmarks! {
).unwrap();
}

let close_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let call = Call::<T>::admin_move_market_to_resolved { market_id };
}: {
call.dispatch_bypass_filter(close_origin)?
call.dispatch_bypass_filter(resolve_origin)?
} verify {
assert_last_event::<T>(Event::MarketResolved::<T>(
market_id,
Expand Down Expand Up @@ -316,10 +316,10 @@ benchmarks! {
).unwrap();
}

let close_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let call = Call::<T>::admin_move_market_to_resolved { market_id };
}: {
call.dispatch_bypass_filter(close_origin)?
call.dispatch_bypass_filter(resolve_origin)?
} verify {
assert_last_event::<T>(Event::MarketResolved::<T>(
market_id,
Expand Down Expand Up @@ -368,10 +368,10 @@ benchmarks! {
).unwrap();
}

let close_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let call = Call::<T>::admin_move_market_to_resolved { market_id };
}: {
call.dispatch_bypass_filter(close_origin)?
call.dispatch_bypass_filter(resolve_origin)?
} verify {
assert_last_event::<T>(Event::MarketResolved::<T>(
market_id,
Expand Down Expand Up @@ -421,10 +421,10 @@ benchmarks! {
).unwrap();
}

let close_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let resolve_origin = T::ResolveOrigin::try_successful_origin().unwrap();
let call = Call::<T>::admin_move_market_to_resolved { market_id };
}: {
call.dispatch_bypass_filter(close_origin)?
call.dispatch_bypass_filter(resolve_origin)?
} verify {
assert_last_event::<T>(Event::MarketResolved::<T>(
market_id,
Expand Down Expand Up @@ -529,10 +529,10 @@ benchmarks! {
.dispatch_bypass_filter(RawOrigin::Signed(caller.clone()).into())?;
let market_id = zrml_market_commons::Pallet::<T>::latest_market_id()?;

let approve_origin = T::RequestEditOrigin::try_successful_origin().unwrap();
let request_edit_origin = T::RequestEditOrigin::try_successful_origin().unwrap();
let edit_reason = vec![0_u8; 1024];
Call::<T>::request_edit{ market_id, edit_reason }
.dispatch_bypass_filter(approve_origin)?;
.dispatch_bypass_filter(request_edit_origin)?;

for i in 0..m {
MarketIdsPerCloseTimeFrame::<T>::try_mutate(
Expand Down

0 comments on commit 9e54353

Please sign in to comment.