Skip to content

Conversation

@wlawt
Copy link
Contributor

@wlawt wlawt commented Oct 31, 2025

Overview

Introduce BundleTransactions and BundleParams to be shared across Bundle and BundleWithMetadata to easily access utility functions.

Also implement From and TryFrom across these structs to interchange easily

@wlawt wlawt marked this pull request as ready for review November 3, 2025 15:45
@wlawt wlawt requested a review from niran November 3, 2025 15:46
Comment on lines +93 to +98
let uuid = bundle
.replacement_uuid
.clone()
.unwrap_or_else(|| Uuid::new_v4().to_string());

let uuid = Uuid::parse_str(uuid.as_str()).map_err(|_| format!("Invalid UUID: {uuid}"))?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this isn't what I thought was going to happen. I thought replacement_uuid was going to change from an Option<String> to a Option<Uuid>. Then AcceptedBundle::new() would populate its uuid field with replacement_uuid.unwrap_or_else(|| Uuid::new_v4()) (without the to_string).

If ParsedBundle has its own uuid field, the same bundle is going to get multiple uuids assigned over its lifetime.

@wlawt wlawt merged commit 2ff5595 into master Nov 5, 2025
10 checks passed
@wlawt wlawt deleted the bundle-helpers branch November 5, 2025 17:21
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.

4 participants