1
1
use cosmwasm_std:: {
2
2
entry_point, from_json, to_json_vec, Binary , Deps , DepsMut , Empty , Env , Ibc2Msg ,
3
3
Ibc2PacketReceiveMsg , Ibc2Payload , IbcAcknowledgement , IbcReceiveResponse , MessageInfo ,
4
- QueryResponse , Response , StdAck , StdError , StdResult , Timestamp ,
4
+ QueryResponse , Response , StdAck , StdError , StdResult ,
5
5
} ;
6
6
7
7
use crate :: msg:: { IbcPayload , QueryMsg } ;
@@ -42,7 +42,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<QueryResponse> {
42
42
#[ entry_point]
43
43
pub fn ibc2_packet_receive (
44
44
deps : DepsMut ,
45
- _env : Env ,
45
+ env : Env ,
46
46
msg : Ibc2PacketReceiveMsg ,
47
47
) -> StdResult < IbcReceiveResponse > {
48
48
let binary_payload = & msg. payload . value ;
@@ -62,8 +62,6 @@ pub fn ibc2_packet_receive(
62
62
last_packet_seq : msg. packet_sequence ,
63
63
} ) ?,
64
64
) ;
65
- // Workaround for now.
66
- let ts = Timestamp :: from_nanos ( 1_577_933_900 ) ;
67
65
let new_payload = Ibc2Payload :: new (
68
66
msg. payload . destination_port ,
69
67
msg. payload . source_port ,
@@ -74,9 +72,7 @@ pub fn ibc2_packet_receive(
74
72
let new_msg = Ibc2Msg :: SendPacket {
75
73
channel_id : msg. source_client ,
76
74
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 ) ,
80
76
} ;
81
77
82
78
let resp = if json_payload. response_without_ack {
0 commit comments