Skip to content

Commit

Permalink
development: Use balances pallet as democracy currency
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Dec 13, 2023
1 parent f70382b commit 3ce7027
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ impl pallet_democracy::Config for Runtime {
/// Period in blocks where an external proposal may not be re-submitted
/// after being vetoed.
type CooloffPeriod = CooloffPeriod;
type Currency = Tokens;
type Currency = Balances;
/// The minimum period of locking and the period between a proposal being
/// approved and enacted.
///
Expand Down
6 changes: 2 additions & 4 deletions runtime/integration-tests/src/generic/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use codec::Codec;
use fp_self_contained::{SelfContainedCall, UncheckedExtrinsic};
use frame_support::{
dispatch::{DispatchInfo, GetDispatchInfo, PostDispatchInfo, RawOrigin},
traits::{Currency, IsType, OriginTrait},
traits::{IsType, OriginTrait},
Parameter,
};
use liquidity_pools_gateway_routers::DomainRouter;
Expand Down Expand Up @@ -133,7 +133,7 @@ pub trait Runtime:
TokenSwapOrderId = u64,
> + pallet_preimage::Config
+ pallet_collective::Config<CouncilCollective, Proposal = Self::RuntimeCallExt>
+ pallet_democracy::Config<Currency = Self::CurrencyExt>
+ pallet_democracy::Config<Currency = pallet_balances::Pallet<Self>>
+ pallet_evm_chain_id::Config
{
/// Just the RuntimeCall type, but redefined with extra bounds.
Expand Down Expand Up @@ -194,8 +194,6 @@ pub trait Runtime:
+ Into<Result<pallet_ethereum::Origin, <Self as frame_system::Config>::RuntimeOrigin>>
+ From<pallet_liquidity_pools_gateway::GatewayOrigin>;

type CurrencyExt: Currency<Self::AccountId, Balance = Balance>;

/// Block used by the runtime
type Block: Block<
Hash = H256,
Expand Down
1 change: 0 additions & 1 deletion runtime/integration-tests/src/generic/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ macro_rules! impl_runtime {
impl Runtime for $runtime_path::Runtime {
type Api = Self;
type Block = $runtime_path::Block;
type CurrencyExt = <$runtime_path::Runtime as pallet_democracy::Config>::Currency;
type MaxTranchesExt = $runtime_path::MaxTranches;
type RuntimeCallExt = $runtime_path::RuntimeCall;
type RuntimeEventExt = $runtime_path::RuntimeEvent;
Expand Down

0 comments on commit 3ce7027

Please sign in to comment.