-
Notifications
You must be signed in to change notification settings - Fork 125
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
Implement state handling for Retracted status #807
Conversation
- Provide is_final method for TransactionStatus - Return from watch method as soon as a final state is reached - Provide separate method to populate events for an ExtrinsicReport
src/api/mod.rs
Outdated
/// Returns an error if the events are missing or if one of the events indicates a problem. | ||
pub fn status_based_on_events(&self, metadata: &Metadata) -> Result<()> { | ||
if self.events.is_none() { | ||
return Err(Error::Other("Report does not contain any events".into())) |
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.
Would it make sense adding an extra Error Type like NoEvent
(or something alike) instead of using Other
?
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 added two error types for event related errors
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, thank you very much for your patience! Only one change suggestion left, but you can go on without it as well.
Co-authored-by: Bigna Härdi <[email protected]>
UnexpectedTxStatus
toXtStatus
TransactionStatus
ExtrinsicReport