Skip to content

Commit

Permalink
fix can't set limit to system limit
Browse files Browse the repository at this point in the history
  • Loading branch information
hging committed Jan 25, 2021
1 parent 9512820 commit 22cabd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frame/balances/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,9 @@ decl_module! {
) {
let sender = ensure_signed(origin)?;
let info = limit_info.clone();
ensure!(info.daily_limit < T::DailyLimit::get(), Error::<T, I>::OutOfLimit);
ensure!(info.monthly_limit < T::MonthlyLimit::get(), Error::<T, I>::OutOfLimit);
ensure!(info.yearly_limit < T::YearlyLimit::get(), Error::<T, I>::OutOfLimit);
ensure!(info.daily_limit <= T::DailyLimit::get(), Error::<T, I>::OutOfLimit);
ensure!(info.monthly_limit <= T::MonthlyLimit::get(), Error::<T, I>::OutOfLimit);
ensure!(info.yearly_limit <= T::YearlyLimit::get(), Error::<T, I>::OutOfLimit);
// let limit = match <Limits<T, I>>.get(&sender) {
// Some(mut id) => {
// id.daily_limit = info.daily_limit;
Expand Down

0 comments on commit 22cabd3

Please sign in to comment.