Fix fetching wallet balance

This commit is contained in:
Andrey Mayorov 2018-07-17 16:49:36 +03:00
parent 0a4c47a36e
commit c1d350b91c

View File

@ -243,7 +243,7 @@ create_wallet(Params = #{<<"identity">> := IdenityId}, Context) ->
get_wallet_account(WalletId, Context) ->
do(fun () ->
{Amounts, Currency} = unwrap(ff_transaction:balance(
unwrap(ff_wallet:account(ff_wallet_machine:wallet(get_state(wallet, WalletId, Context))))
ff_account:pm_account(ff_wallet:account(ff_wallet_machine:wallet(get_state(wallet, WalletId, Context))))
)),
to_swag(wallet_account, {ff_indef:current(Amounts), ff_indef:expmin(Amounts), Currency})
end).