cardano-community / koios-go-client

Go Client library for Koios API
https://pkg.go.dev/github.com/cardano-community/koios-go-client/v3
Apache License 2.0
10 stars 4 forks source link

fix: manage unix timestamp as Time #33

Closed safanaj closed 2 years ago

safanaj commented 2 years ago

Description

Recently the koios.rest API changed transaction bock_time and tx_timestamp from string to unix timestamp as integer. This PR just adapt the wrapped time.Time to be able to unmarshal also unix timestamp.

Where should the reviewer start?

koios.Time UnmashalJSON was changed to attempt to parse integer as unix timestamp.

Motivation and context

Recently parsing response from /tx_info started to fail.

Which issue it fixes?

Closes #32