Skip to content

Commit

Permalink
compare in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
blasrodri committed Nov 6, 2023
1 parent 35607f5 commit fe0470f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion light-clients/ics10-grandpa-cw/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
match get_consensus_state(deps, &client_id, height) {
Ok(consensus_state_raw) => {
let consensus_state = Context::decode_consensus_state(&consensus_state_raw)?;
if client_state.expired(env.block.time - consensus_state.timestamp) {
if client_state.expired(env.block.time.as_secs() - consensus_state.timestamp.as_seconds()) {
return to_binary(&QueryResponse::status("Expired".to_string()));
}
to_binary(&QueryResponse::status("Active".to_string()))
Expand Down

0 comments on commit fe0470f

Please sign in to comment.