Skip to content

Commit

Permalink
new todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed May 30, 2024
1 parent ce1812d commit 20f6573
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pallets/orders/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,23 @@ pub mod pallet {

Ok(())
}

/// Extrinsic for remove contribution from a cancelled order.
///
/// Callable by signed origin.
///
/// ## Arguments:
/// - `order`: The cancelled order from which the user wants to claim back their contribution.
#[pallet::call_index(3)]
#[pallet::weight(10_000)] // TODO
pub fn remove_contribution(origin: OriginFor<T>, order_id: OrderId) -> DispatchResult {
let who = ensure_signed(origin)?;

// TODO: Users should be able to claim back contributions for cancelled orders.
// We know that an order is cancelled if it can no longer be found in `Orders` map.

Ok(())
}
}

impl<T: Config> Pallet<T> {
Expand Down

0 comments on commit 20f6573

Please sign in to comment.