提交 5b7c5fb7 编写于 作者: K Khaled Al-Hassanieh

Moved checks location in transfer

上级 5ea2ab87
......@@ -75,12 +75,12 @@ void token::transfer( account_name from,
require_recipient( from );
require_recipient( to );
if ( quantity.symbol.precision() != st.supply.symbol.precision() )
quantity.adjust_precision( st.supply.symbol );
eosio_assert( quantity.is_valid(), "invalid quantity" );
eosio_assert( quantity.amount > 0, "must transfer positive quantity" );
if ( quantity.symbol.precision() != st.supply.symbol.precision() )
quantity.adjust_precision( st.supply.symbol );
sub_balance( from, quantity, st );
add_balance( to, quantity, st, from );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册