Skip to content

Commit

Permalink
make sure cancellation is transactional
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Jan 4, 2022
1 parent 05f6091 commit 9aa9748
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frame/bonded-finance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ pub mod pallet {
///
/// Emits a `OfferCancelled`.
#[pallet::weight(10_000)]
#[transactional]
pub fn cancel(origin: OriginFor<T>, offer_id: T::BondOfferId) -> DispatchResult {
let (issuer, offer) = Self::get_offer(offer_id)?;
match (ensure_signed(origin.clone()), T::AdminOrigin::ensure_origin(origin)) {
Expand Down

0 comments on commit 9aa9748

Please sign in to comment.