mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 02:21:03 +00:00
Remove balances migration. (#5224)
* Remove balances migration. * Remove extraneous code * Remove old test
This commit is contained in:
@@ -157,7 +157,6 @@ mod tests_composite;
|
||||
mod tests;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarking;
|
||||
mod migration;
|
||||
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::{cmp, result, mem, fmt::Debug, ops::BitOr, convert::Infallible};
|
||||
@@ -533,28 +532,6 @@ decl_module! {
|
||||
let dest = T::Lookup::lookup(dest)?;
|
||||
<Self as Currency<_>>::transfer(&transactor, &dest, value, KeepAlive)?;
|
||||
}
|
||||
|
||||
fn on_runtime_upgrade() {
|
||||
migration::on_runtime_upgrade::<T, I>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Decode)]
|
||||
struct OldBalanceLock<Balance, BlockNumber> {
|
||||
id: LockIdentifier,
|
||||
amount: Balance,
|
||||
until: BlockNumber,
|
||||
reasons: WithdrawReasons,
|
||||
}
|
||||
|
||||
impl<Balance, BlockNumber> OldBalanceLock<Balance, BlockNumber> {
|
||||
fn upgraded(self) -> (BalanceLock<Balance>, BlockNumber) {
|
||||
(BalanceLock {
|
||||
id: self.id,
|
||||
amount: self.amount,
|
||||
reasons: self.reasons.into(),
|
||||
}, self.until)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user