Unverified Commit c465d249 authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

Backport fix lock (#507)

* Fix locking, from an updated Substrate (#506)

* Fix locking, from an updated Substrate

* Bump runtime version

* Lock file.

* Bump version and extra fix.
parent f35a4db4
Pipeline #55273 passed with stages
in 26 minutes and 54 seconds
This diff is collapsed.
...@@ -207,7 +207,7 @@ decl_module! { ...@@ -207,7 +207,7 @@ decl_module! {
let imb = T::Currency::withdraw( let imb = T::Currency::withdraw(
&owner, &owner,
deposit, deposit,
WithdrawReason::Transfer, WithdrawReason::Transfer.into(),
ExistenceRequirement::AllowDeath, ExistenceRequirement::AllowDeath,
)?; )?;
...@@ -378,7 +378,7 @@ decl_module! { ...@@ -378,7 +378,7 @@ decl_module! {
let _ = T::Currency::resolve_into_existing(&who, T::Currency::withdraw( let _ = T::Currency::resolve_into_existing(&who, T::Currency::withdraw(
&Self::fund_account_id(index), &Self::fund_account_id(index),
balance, balance,
WithdrawReason::Transfer, WithdrawReason::Transfer.into(),
ExistenceRequirement::AllowDeath ExistenceRequirement::AllowDeath
)?); )?);
...@@ -407,14 +407,14 @@ decl_module! { ...@@ -407,14 +407,14 @@ decl_module! {
let _ = T::Currency::resolve_into_existing(&fund.owner, T::Currency::withdraw( let _ = T::Currency::resolve_into_existing(&fund.owner, T::Currency::withdraw(
&account, &account,
fund.deposit, fund.deposit,
WithdrawReason::Transfer, WithdrawReason::Transfer.into(),
ExistenceRequirement::AllowDeath ExistenceRequirement::AllowDeath
)?); )?);
T::OrphanedFunds::on_unbalanced(T::Currency::withdraw( T::OrphanedFunds::on_unbalanced(T::Currency::withdraw(
&account, &account,
fund.raised, fund.raised,
WithdrawReason::Transfer, WithdrawReason::Transfer.into(),
ExistenceRequirement::AllowDeath ExistenceRequirement::AllowDeath
)?); )?);
......
...@@ -540,7 +540,7 @@ impl nicks::Trait for Runtime { ...@@ -540,7 +540,7 @@ impl nicks::Trait for Runtime {
type Currency = Balances; type Currency = Balances;
type ReservationFee = ReservationFee; type ReservationFee = ReservationFee;
type Slashed = Treasury; type Slashed = Treasury;
type KillOrigin = collective::EnsureMember<AccountId, CouncilCollective>; type ForceOrigin = collective::EnsureMember<AccountId, CouncilCollective>;
type MinLength = MinLength; type MinLength = MinLength;
type MaxLength = MaxLength; type MaxLength = MaxLength;
} }
......
...@@ -94,7 +94,7 @@ impl<AccountId, T: Currency<AccountId>> ParachainCurrency<AccountId> for T where ...@@ -94,7 +94,7 @@ impl<AccountId, T: Currency<AccountId>> ParachainCurrency<AccountId> for T where
let _ = T::withdraw( let _ = T::withdraw(
&para_account, &para_account,
amount.into(), amount.into(),
WithdrawReason::Fee, WithdrawReason::Fee.into(),
ExistenceRequirement::KeepAlive, ExistenceRequirement::KeepAlive,
)?; )?;
......
...@@ -506,7 +506,7 @@ impl<T: Trait> Module<T> { ...@@ -506,7 +506,7 @@ impl<T: Trait> Module<T> {
if T::Currency::withdraw( if T::Currency::withdraw(
&bidder.who, &bidder.who,
amount, amount,
WithdrawReason::Fee, WithdrawReason::Fee.into(),
ExistenceRequirement::AllowDeath ExistenceRequirement::AllowDeath
).is_err() { ).is_err() {
continue; continue;
...@@ -543,7 +543,7 @@ impl<T: Trait> Module<T> { ...@@ -543,7 +543,7 @@ impl<T: Trait> Module<T> {
if T::Currency::withdraw( if T::Currency::withdraw(
&para_id.into_account(), &para_id.into_account(),
additional, additional,
WithdrawReason::Fee, WithdrawReason::Fee.into(),
ExistenceRequirement::AllowDeath ExistenceRequirement::AllowDeath
).is_err() { ).is_err() {
continue; continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment