Skip to content

Commit

Permalink
remove migration impl of transaction-payment (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjj9219 authored and xlc committed Aug 6, 2021
1 parent 8525006 commit 66ea441
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions modules/transaction-payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,6 @@ pub mod module {
#[pallet::getter(fn next_fee_multiplier)]
pub type NextFeeMultiplier<T: Config> = StorageValue<_, Multiplier, ValueQuery, DefaultFeeMultiplier>;

/// TODO: remove it after migrate
/// The default fee currency for accounts.
///
/// DefaultFeeCurrencyId: AccountId => Option<CurrencyId>
#[pallet::storage]
#[pallet::getter(fn default_fee_currency_id)]
pub type DefaultFeeCurrencyId<T: Config> = StorageMap<_, Twox64Concat, T::AccountId, CurrencyId, OptionQuery>;

/// The alternative fee swap path of accounts.
#[pallet::storage]
#[pallet::getter(fn alternative_fee_swap_path)]
Expand Down Expand Up @@ -369,15 +361,6 @@ pub mod module {
);
})
}

// remove after runtime upgraded
fn on_runtime_upgrade() -> Weight {
let remove_count = match DefaultFeeCurrencyId::<T>::remove_all(None) {
sp_io::KillStorageResult::AllRemoved(n) => n,
sp_io::KillStorageResult::SomeRemaining(n) => n,
};
T::DbWeight::get().reads_writes(0, remove_count.into())
}
}

#[pallet::call]
Expand Down

0 comments on commit 66ea441

Please sign in to comment.