Skip to content

Commit

Permalink
PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazharski committed Feb 3, 2025
1 parent 8ea4b09 commit a2a91c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.4.4] - 2025-02-03

### Added
- Logic to get token info and token chart from zerion

## [0.4.3] - 2025-01-23

### Added
Expand Down
1 change: 0 additions & 1 deletion internal/dao/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ func (s *Service) GetTokenInfo(id uuid.UUID) (*zerion.FungibleData, error) {
if err != nil {
return nil, fmt.Errorf("failed to get token info: %w", err)
}
log.Info().Msgf("data: %v", data)

return data, nil
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/sdk/zerion/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func (p *Point) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &v); err != nil {
return fmt.Errorf("failed to parse data: %w", err)
}
if len(v) != 2 {
return fmt.Errorf("incorrect elements in point object %v", v)
}
p.Time = time.Unix(int64(v[0].(float64)), 0)
p.Price = v[1].(float64)
return nil
Expand Down

0 comments on commit a2a91c8

Please sign in to comment.