Closed insanedefaults closed 6 years ago
I did a quick test against all delegates to make sure this works. A :true
return indicates success.
iex(49)> import Ark_Elixir.Delegate
Ark_Elixir.Delegate
iex(50)> 51 == get_delegates["delegates"] |> Enum.count(& get_delegate(&1["publicKey"])["delegate"]["username"])
true
I am attempting to address #1 with this small change. The two get_delegate functions have been merged into one. This function uses a case block to determine if the id passed is a username or public key. It then issues the request with the proper field in either case.