diff --git a/shapeshift.go b/shapeshift.go index d67531b..65e9739 100644 --- a/shapeshift.go +++ b/shapeshift.go @@ -252,7 +252,7 @@ func CoinsAsList() ([]Coin, error) { return nil, err } - // User json.RawMessage to delay marshalling to support arbitrary top level keys + // Use json.RawMessage to delay marshalling to support arbitrary top level keys var coinmap map[string]*json.RawMessage if err := json.Unmarshal(r, &coinmap); err != nil { return coins, err diff --git a/shapeshift_test.go b/shapeshift_test.go index e6a819d..3342776 100644 --- a/shapeshift_test.go +++ b/shapeshift_test.go @@ -132,6 +132,18 @@ func TestDepositStatus(t *testing.T) { } +func TestGetCoinsAsList(t *testing.T) { + + coins, err := CoinsAsList() + if err != nil || len(coins) == 0 { + t.Fail() + } + + t.Log("Coin: ", coins[0].Name) + t.Log("Status: ", coins[0].Status) + +} + func TestGetSupportedCoins(t *testing.T) { coins, err := Coins()