Related to this ticket. Fixes to be made so that Nabla modals should show up as transferrable balance.
Our chain extension exposes functions conforming to the ERC-20 interface. In ERC-20, the only function to get the balance of an address is using the balanceOf() call. At the moment, we are returning the 'free' balance of a user, see here. However, the free_balance is not necessarily the transferable balance, as it does not take into account the locked or reserved tokens.
See the relation of the system::account() query to the transferable amount.
TODO
Change the balance_of function of the chain extension to return the transferable amount ie. free - reserved - frozen.
Context
Related to this ticket. Fixes to be made so that Nabla modals should show up as transferrable balance.
Our chain extension exposes functions conforming to the ERC-20 interface. In ERC-20, the only function to get the balance of an address is using the
balanceOf()
call. At the moment, we are returning the 'free' balance of a user, see here. However, thefree_balance
is not necessarily the transferable balance, as it does not take into account the locked or reserved tokens.See the relation of the
system::account()
query to the transferable amount.TODO
Change the
balance_of
function of the chain extension to return the transferable amount ie.free - reserved - frozen
.