Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log failure instead of failing when decoding an event #769

Merged
merged 3 commits into from
Oct 7, 2022

Conversation

pmikolajczyk41
Copy link
Member

Fixes #738

Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

let field = Field::new(String::from("data"), contract_event);
event_entry.fields.push(field);
match transcoder.decode_contract_event(event_data) {
Result::Ok(contract_event) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Result::Ok(contract_event) => {
Ok(contract_event) => {

Copy link
Member Author

Choose a reason for hiding this comment

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

unfortunately, we already import method Ok() from anyhow and there would be a collision

Copy link
Collaborator

Choose a reason for hiding this comment

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

That looks like a mistake, please remove that import.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok :)

@ascjones ascjones merged commit 0b65d42 into use-ink:master Oct 7, 2022
@pmikolajczyk41 pmikolajczyk41 deleted the piomiko/fix-738 branch October 7, 2022 09:00
@ascjones ascjones mentioned this pull request Oct 27, 2022
@ascjones ascjones mentioned this pull request Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo-contract exits on event decoding failure
2 participants