-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlockRewards: Fix how it handle ED for Staking currency. #1802
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,11 @@ | |
pub mod xcm; | ||
|
||
use cfg_primitives::Balance; | ||
use cfg_types::{fee_keys::FeeKey, pools::PoolNav, tokens::CurrencyId}; | ||
use cfg_types::{ | ||
fee_keys::FeeKey, | ||
pools::PoolNav, | ||
tokens::{CurrencyId, StakingCurrency}, | ||
}; | ||
use orml_traits::GetByKey; | ||
use pallet_loans::entities::input::PriceCollectionInput; | ||
use pallet_pool_system::Nav; | ||
|
@@ -81,6 +85,7 @@ | |
fn get(currency_id: &CurrencyId) -> Balance { | ||
match currency_id { | ||
CurrencyId::Native => T::ExistentialDeposit::get(), | ||
CurrencyId::Staking(StakingCurrency::BlockRewards) => T::ExistentialDeposit::get(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we were assuming the I maintain the same |
||
currency_id => orml_asset_registry::Pallet::<T>::metadata(currency_id) | ||
.map(|metadata| metadata.existential_deposit) | ||
.unwrap_or_default(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we were using the CFG existential deposit instead of the one from
StakeCurrencyId