1use cosmwasm_std::{Reply, StdError};
2
3use crate::contract::{ProxyResponse, ProxyResult};
4
5pub fn forward_response_data(result: Reply) -> ProxyResult {
7 let res = result.result.into_result().map_err(StdError::generic_err)?;
9
10 let resp = if let Some(data) = res.data {
12 ProxyResponse::new(
13 "forward_response_data_reply",
14 vec![("response_data", "true")],
15 )
16 .set_data(data)
17 } else {
18 ProxyResponse::new(
19 "forward_response_data_reply",
20 vec![("response_data", "false")],
21 )
22 };
23
24 Ok(resp)
25}