Skip to content

Commit

Permalink
feat: fix incorrect timestamp conversion in consensus state query
Browse files Browse the repository at this point in the history
  • Loading branch information
sonhs-smartosc committed Apr 26, 2024
1 parent 8f13a58 commit 7f1a4c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relayer/relayer/chains/cardano/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ func (cc *CardanoProvider) QueryClientConsensusState(ctx context.Context, chainH
if err != nil {
return nil, err
}
timeStampSeconds := consensusState.Timestamp.Seconds / 1e6

state := &tmclient.ConsensusState{
Timestamp: time.Unix(timeStampSeconds, int64(0)).UTC(),
Timestamp: time.Unix(consensusState.Timestamp.Seconds, int64(consensusState.Timestamp.Nanos)).UTC(),
Root: *consensusState.Root,
NextValidatorsHash: consensusState.NextValidatorsHash,
}
Expand Down

0 comments on commit 7f1a4c9

Please sign in to comment.