Skip to content

Commit

Permalink
fix xcm tranfers
Browse files Browse the repository at this point in the history
  • Loading branch information
f-gate committed Nov 24, 2023
1 parent 5343cb9 commit 998123f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
6 changes: 3 additions & 3 deletions pallets/proposals/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ pub trait IntoProposal<AccountId, Balance: AtLeast32BitUnsigned, BlockNumber> {
type MaximumContributorsPerProject: Get<u32>;
type MaxMilestonesPerProject: Get<u32>;
type MaxJuryMembers: Get<u32>;
/// Convert the propoerties of a project into a project.

/// Convert the properties of a project into a project.
/// This is the main method when wanting to use pallet_proposals and is how one configures a project.
fn convert_to_proposal(
currency_id: CurrencyId,
Expand All @@ -27,7 +28,6 @@ pub trait IntoProposal<AccountId, Balance: AtLeast32BitUnsigned, BlockNumber> {
on_creation_funding: FundingPath,
) -> Result<(), DispatchError>;

/// Convert a btreemap of contributions to multilocations with the Here junction.
/// Use when the contributors are the refund locations.
fn convert_contributions_to_refund_locations(
contributions: &BoundedBTreeMap<AccountId, Contribution<Balance, BlockNumber>, Self::MaximumContributorsPerProject>,
Expand Down Expand Up @@ -62,7 +62,7 @@ impl<T: crate::Config> ExternalRefundHandler<AccountIdOf<T>, BalanceOf<T>, Curre
pub struct XcmRefundHandler<T, U>(T, U);
impl<T, U> ExternalRefundHandler<AccountIdOf<T>, T::Balance, CurrencyId> for XcmRefundHandler<T, U>
where
[u8; 32]: From<BlockNumberFor<T>>,
[u8; 32]: From<AccountIdOf<T>>,
T: orml_xtokens::Config,
U: XcmTransfer<T::AccountId, T::Balance, CurrencyId>,
{
Expand Down
20 changes: 0 additions & 20 deletions runtime/imbue-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,26 +890,6 @@ impl pallet_fellowship::Config for Runtime {
type WeightInfo = pallet_fellowship::weights::WeightInfo<Runtime>;
}

parameter_types! {
pub MaxCandidatesPerShortlist: u32 = 50;
pub ShortlistPeriod: BlockNumber = 14 * DAYS;
pub MembershipDeposit: Balance = DOLLARS.saturating_mul(500);
pub DepositCurrencyId: CurrencyId = CurrencyId::Native;
}

impl pallet_fellowship::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type MultiCurrency = Currencies;
type ForceAuthority = EnsureRootOr<HalfOfCouncil>;
type MaxCandidatesPerShortlist = MaxCandidatesPerShortlist;
type ShortlistPeriod = ShortlistPeriod;
type MembershipDeposit = MembershipDeposit;
type DepositCurrencyId = DepositCurrencyId;
// Send slashes to the treasury.
type SlashAccount = TreasuryAccount;
type Permissions = pallet_fellowship::impls::VetterAndFreelancerAllPermissions;
type WeightInfo = pallet_fellowship::weights::WeightInfo<Runtime>;
}

pub type DepositId = u64;
pub struct ImbueDepositCalculator;
Expand Down
1 change: 0 additions & 1 deletion runtime/integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ std = [
"sp-io/std",
]
runtime-benchmarks = [
"default",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion runtime/integration-tests/src/xcm_transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn test_xcm_refund_handler_to_kusama() {
let ksm_balance = OrmlTokens::free_balance(CurrencyId::KSM, &DevelopmentReceiver::get());
assert!(ksm_balance > 0);
assert_ok!(
<R as pallet_proposals::Config>::RefundHandler::send_refund_message_to_treasury(
<R as pallet_proposals::Config>::ExternalRefundHandler::send_refund_message_to_treasury(
DevelopmentReceiver::get(),
ksm_balance,
CurrencyId::KSM,
Expand Down

0 comments on commit 998123f

Please sign in to comment.