mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Check unreserve and transfer returnvalues in debug code (#8398)
* Check `unreserve` and `transfer` returnvalues in debug code fixes #8106 * few more Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f93d7b874e
commit
9a72134188
@@ -324,7 +324,8 @@ decl_module! {
|
||||
let winning_number = Self::choose_winner(ticket_count);
|
||||
let winner = Tickets::<T>::get(winning_number).unwrap_or(lottery_account);
|
||||
// Not much we can do if this fails...
|
||||
let _ = T::Currency::transfer(&Self::account_id(), &winner, lottery_balance, KeepAlive);
|
||||
let res = T::Currency::transfer(&Self::account_id(), &winner, lottery_balance, KeepAlive);
|
||||
debug_assert!(res.is_ok());
|
||||
|
||||
Self::deposit_event(RawEvent::Winner(winner, lottery_balance));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user