-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove usage of deprecated data
field in Neutron SDK ICTX helper for SDK 0.47 chains & update SDK 0.45 helper to backw compat NTRN-223
#134
Conversation
dcc1872
to
8483e61
Compare
data
field in Neutron SDK ICTX helper for SDK 0.47 chains & update SDK 0.45 helper to backw compatdata
field in Neutron SDK ICTX helper for SDK 0.47 chains & update SDK 0.45 helper to backw compat NTRN-223
8483e61
to
b696b8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok(msg) => { | ||
if !msg.msg_responses.is_empty() { | ||
msg.msg_responses | ||
.into_iter() | ||
.map(|any_msg| { | ||
Ok(MsgData { | ||
msg_type: any_msg.type_url, | ||
data: any_msg.value, | ||
}) | ||
}) | ||
.collect::<StdResult<Vec<MsgData>>>() | ||
} else { | ||
// Field `.data` is deprecated since cosmos-sdk v047. | ||
// But for backwards compatibility we still allow that. Given function can be used w both v045 & v047 | ||
#[allow(deprecated)] | ||
Ok(msg.data) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we decided to remove the branch for v047 from here, didn't we?
use cosmwasm_std::{Binary, StdError, StdResult}; | ||
|
||
/// Decodes acknowledgement into `Vec<MsgData>` structure | ||
/// We consider this method as deprecated. Use v047 instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this comment line?
TASK
related prs:
neutron-org/neutron-dev-contracts#43
neutron-org/neutron-integration-tests#271