Skip to content

Conversation

@Niederb
Copy link
Contributor

@Niederb Niederb commented Oct 8, 2024

  • Move Retracted enum value from UnexpectedTxStatus to XtStatus
  • Provide is_final method for TransactionStatus
    • Currently not used, but I think it makes sense to provide it
  • Return from watch method as soon as a final state is reached
  • Provide separate method to populate events for an ExtrinsicReport

@Niederb Niederb self-assigned this Oct 8, 2024
- 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
@Niederb Niederb marked this pull request as ready for review October 9, 2024 06:43
@Niederb Niederb added E2-breaksapi F7-enhancement Enhances an already existing functionality labels Oct 9, 2024
@Niederb Niederb requested a review from haerdib October 9, 2024 07:24
@Niederb Niederb linked an issue Oct 9, 2024 that may be closed by this pull request
@Niederb Niederb requested a review from haerdib October 24, 2024 11:51
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()))
Copy link
Contributor

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?

Copy link
Contributor Author

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

@Niederb Niederb requested a review from haerdib October 28, 2024 08:12
Copy link
Contributor

@haerdib haerdib left a 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]>
@Niederb Niederb merged commit d915763 into master Oct 28, 2024
@Niederb Niederb deleted the tn/transaction-state-handling-2 branch December 9, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

E2-breaksapi F7-enhancement Enhances an already existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

accept retracted XtStatus

3 participants