Skip to content

Commit

Permalink
Merge pull request #30 from cardano-foundation/feat/is-56-fix-incorre…
Browse files Browse the repository at this point in the history
…ct-timestamp-conversion-in-consensus-state-query

feat: IS-56 fix incorrect timestamp conversion in consensus state query
  • Loading branch information
dale-smartosc committed Apr 27, 2024
2 parents fb6c36f + f396238 commit dfed6a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relayer/relayer/chains/cardano/query.go
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 dfed6a0

Please sign in to comment.