Skip to content

Commit

Permalink
tips
Browse files Browse the repository at this point in the history
  • Loading branch information
amiyatulu committed Nov 4, 2023
1 parent 4f58dc4 commit f1b9d45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions pallets/project-tips/src/extras.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::*;


impl<T: Config> Pallet<T> {

pub(super) fn get_phase_data() -> PhaseData<T> {
Expand Down
2 changes: 2 additions & 0 deletions pallets/project-tips/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use schelling_game_shared::types::{Period, RangePoint, SchellingGameType, PhaseD
use schelling_game_shared_link::SchellingGameSharedLink;
use shared_storage_link::SharedStorageLink;
use sortition_sum_game::types::SumTreeName;
use types::TippingName;
type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
type BalanceOf<T> = <<T as Config>::Currency as Currency<AccountIdOf<T>>>::Balance;
pub type BlockNumberOf<T> = <T as frame_system::Config>::BlockNumber;
Expand Down Expand Up @@ -77,6 +78,7 @@ pub mod pallet {
type Currency: ReservableCurrency<Self::AccountId>;
}


// The pallet's runtime storage items.
// https://docs.substrate.io/main-docs/build/runtime-storage/
#[pallet::storage]
Expand Down
14 changes: 2 additions & 12 deletions pallets/project-tips/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use super::*;
use codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
use frame_system::Origin;
use scale_info::TypeInfo;
use frame_support::pallet_prelude::*;
use frame_support::error::BadOrigin;



#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug, TypeInfo)]
pub enum TippingName {
SmallTipper,
BigTipper,
Expand All @@ -23,13 +23,3 @@ fn max_value_of_tipping_name(tipping: TippingName) -> u32 {
TippingName::BigSpender => 10_000_000,
}
}

// pub fn ensure_custom_origin<OuterOrigin>(o: OuterOrigin) -> Result<InternalStruct, BadOrigin>
// where
// OuterOrigin: Into<Result<Origin, OuterOrigin>>,
// {
// match o.into() {
// Ok(Origin::CustomOrigin(internal)) => Ok(internal),
// _ => Err(BadOrigin),
// }
// }

0 comments on commit f1b9d45

Please sign in to comment.