-
Notifications
You must be signed in to change notification settings - Fork 123
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
SubmitAndWatch: Return ExtrinsicReport
instead of block hash
#386
Conversation
report
instead of block hashExtrinsicReport
instead of block hash
…s/substrate-api-client into bh/return-report-instead-hash
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.
LGTM
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.
Looks very nice and clean, I like it. I have just some questions. :)
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.
Very nice, I only have a comment left.
src/api/rpc_api/subscribe_events.rs
Outdated
DispatchError::decode_from(event_details.field_bytes(), self.metadata()); | ||
return Err(Error::Dispatch(dispatch_error)) | ||
} | ||
event_details.check_failed()?; |
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.
I am uncertain if I agree with the naming. I propose a few here:
- check_if_failed
- xt_successful
- xt_failed
What do you think?
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.
I was thinking about the first one as well. Let me adapt.
…s/substrate-api-client into bh/return-report-instead-hash
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.
Thanks, looks good to me now!
❗ Breaks
submit_and_watch_extrinsic
andsubmit_extrinsic
interfaces:submit_and_watch_extrinsic
has been updated toExtrinsicReport
which includes the extrinsic hash, the (maybe) block hash, the transaction status and, possibly, the associated events. This has the following advantages:submit_extrinsic
) and the block hash previously returned.Preparatory step for #288.