Skip to content

Commit

Permalink
Compatible with new and old versions of getBalances
Browse files Browse the repository at this point in the history
  • Loading branch information
gordon-sero committed Oct 30, 2019
1 parent c9ce992 commit f8258f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ethapi/api_exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ func (s *PublicExchangeAPI) GetMaxAvailable(pk address.PKAddress, currency Smbol

func (s *PublicExchangeAPI) GetBalances(ctx context.Context, pk address.PKAddress) map[string]interface{} {
result := map[string]*Big{}

ret := make(map[string]interface{})
balances, tickets := s.b.GetBalances(pk.ToUint512())
for k, v := range balances {
result[k] = (*Big)(v)
ret[k] = (*Big)(v)
}
ret := make(map[string]interface{})
ret["tkn"] = result
ret["tkt"] = tickets
return ret
Expand Down

0 comments on commit f8258f9

Please sign in to comment.