dimitri-xyz / haskell-coinbase-pro

A Haskell client for the Coinbase Pro API
MIT License
11 stars 6 forks source link

Replace `FromJSON` instance for `EntryId` to fix failing test #22

Open ericpashman opened 4 years ago

ericpashman commented 4 years ago

This replaces the derived FromJSON instance for EntryId with a hand-written instance that is exactly parallel to the existing instance for TradeId, which is also a newtype over Word64. This fixes the failing getUSDAccountLedger test; see #18.

I don't know when or why this test started to fail. It seems odd that the instances for EntryId and TradeId were different. I believe Coinbase's JSON has used strings for everything, including numbers, as long as I've been paying attention.

We can merge this now or wait to see whether there's anything we can do to fix the rest of the tests, whatever you think makes sense.