Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix sc balances
Browse files Browse the repository at this point in the history
  • Loading branch information
vihu committed Mar 11, 2020
1 parent dcbbdbb commit c33d954
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/blockchain_api/schema/state_channel_close.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ defmodule BlockchainAPI.Schema.StateChannelCloseTxn do
balances = sc0
|> :blockchain_state_channel_v1.balances()
|> Enum.map(
fn({h, b}) ->
%{hotspot: Util.bin_to_string(h), num_bytes: b}
fn(balance) ->
payee = :blockchain_state_channel_balance_v1:payee(balance)
num_bytes = :blockchain_state_channel_balance_v1:balance(balance)
%{hotspot: Util.bin_to_string(payee), num_bytes: num_bytes}
end)

sc = %{
Expand Down

0 comments on commit c33d954

Please sign in to comment.