Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteolaf committed May 23, 2024
1 parent 5175de2 commit 7e4f557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pallets/market/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub mod pallet {
region_id: RegionId,
/// New price
new_price: BalanceOf<T>,
}
},
}

#[pallet::error]
Expand Down Expand Up @@ -223,10 +223,10 @@ pub mod pallet {
let who = ensure_signed(origin)?;

let mut listing = Listings::<T>::get(region_id).ok_or(Error::<T>::NotListed)?;

// Only the seller can update the price
ensure!(who == listing.seller, Error::<T>::NotAllowed);

listing.timeslice_price = new_timeslice_price;
Listings::<T>::insert(&region_id, listing);

Expand Down

0 comments on commit 7e4f557

Please sign in to comment.