I am developing a pallet in which I need to check the balance of the account that is making the transaction. How can I check that?
1 Answer
A common way is:
ensure!(T::Currency::free_balance(&who) >= some_value, <Error<T>>::InsufficientBalance);
-
reducible_balance
should be more accurate will deduct locked&ed if necessary– RonCommented Apr 13, 2022 at 10:02