11use cosmwasm_std:: {
22 entry_point, from_json, to_json_vec, Binary , Deps , DepsMut , Empty , Env , Ibc2Msg ,
33 Ibc2PacketReceiveMsg , Ibc2Payload , IbcAcknowledgement , IbcReceiveResponse , MessageInfo ,
4- QueryResponse , Response , StdAck , StdError , StdResult , Timestamp ,
4+ QueryResponse , Response , StdAck , StdError , StdResult ,
55} ;
66
77use crate :: msg:: { IbcPayload , QueryMsg } ;
@@ -42,7 +42,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<QueryResponse> {
4242#[ entry_point]
4343pub fn ibc2_packet_receive (
4444 deps : DepsMut ,
45- _env : Env ,
45+ env : Env ,
4646 msg : Ibc2PacketReceiveMsg ,
4747) -> StdResult < IbcReceiveResponse > {
4848 let binary_payload = & msg. payload . value ;
@@ -62,8 +62,6 @@ pub fn ibc2_packet_receive(
6262 last_packet_seq : msg. packet_sequence ,
6363 } ) ?,
6464 ) ;
65- // Workaround for now.
66- let ts = Timestamp :: from_nanos ( 1_577_933_900 ) ;
6765 let new_payload = Ibc2Payload :: new (
6866 msg. payload . destination_port ,
6967 msg. payload . source_port ,
@@ -74,9 +72,7 @@ pub fn ibc2_packet_receive(
7472 let new_msg = Ibc2Msg :: SendPacket {
7573 channel_id : msg. source_client ,
7674 payloads : vec ! [ new_payload] ,
77- timeout : ts,
78- // This causes "timeout exceeds the maximum expected value" error returned from the ibc-go.
79- // timeout: _env.block.time.plus_seconds(5_u64),
75+ timeout : env. block . time . plus_seconds ( 60_u64 ) ,
8076 } ;
8177
8278 let resp = if json_payload. response_without_ack {
0 commit comments