fix unreserve_all_named (#9042)

This commit is contained in:
Xiliang Chen
2021-06-08 20:59:19 +12:00
committed by GitHub
parent 60256d752e
commit a032d62239
2 changed files with 74 additions and 1 deletions
@@ -166,7 +166,7 @@ pub trait NamedReservableCurrency<AccountId>: ReservableCurrency<AccountId> {
/// Is a no-op if the value to be unreserved is zero.
fn unreserve_all_named(id: &Self::ReserveIdentifier, who: &AccountId) -> Self::Balance {
let value = Self::reserved_balance_named(id, who);
Self::slash_reserved_named(id, who, value);
Self::unreserve_named(id, who, value);
value
}