Skip to content
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

Merged
merged 8 commits into from
Mar 14, 2024

Conversation

quasisamurai
Copy link
Contributor

@quasisamurai quasisamurai commented Feb 28, 2024

@quasisamurai quasisamurai force-pushed the feat/deprecated-data-field-ictx branch from dcc1872 to 8483e61 Compare February 28, 2024 12:39
@quasisamurai quasisamurai changed the title Remove usage of deprecated data field in Neutron SDK ICTX helper for SDK 0.47 chains & update SDK 0.45 helper to backw compat 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 Feb 28, 2024
@quasisamurai quasisamurai force-pushed the feat/deprecated-data-field-ictx branch from 8483e61 to b696b8e Compare February 28, 2024 12:47
@quasisamurai quasisamurai changed the base branch from main to feat/v047-icq February 28, 2024 12:47
Copy link
Contributor

@sotnikov-s sotnikov-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 17 to 34
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)
}
}
Copy link
Contributor

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.
Copy link
Contributor

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?

@pr0n00gler pr0n00gler merged commit 6809cf9 into feat/v047-icq Mar 14, 2024
10 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants