Tip payment is a different withdraw reason. (#3937)

* Tip payment is a different withdraw reason.

* Bump runtime version.

* Test fix.

* Fix lock type
This commit is contained in:
Gavin Wood
2019-10-28 13:04:20 +01:00
committed by GitHub
parent e110cd7ae8
commit ec7655cc7b
11 changed files with 49 additions and 40 deletions
+1 -1
View File
@@ -642,7 +642,7 @@ fn transfer<'a, T: Trait, V: Vm<T>, L: Loader<T>>(
if would_create && value < ctx.config.existential_deposit {
return Err("value too low to create account");
}
T::Currency::ensure_can_withdraw(transactor, value, WithdrawReason::Transfer, new_from_balance)?;
T::Currency::ensure_can_withdraw(transactor, value, WithdrawReason::Transfer.into(), new_from_balance)?;
let new_to_balance = match to_balance.checked_add(&value) {
Some(b) => b,