sdk

Radroots SDK and bindings
git clone https://radroots.dev/git/sdk.git
Log | Files | Refs | README

commit 5e5a352931239d13995790f0095d07d0c3c22f80
parent 79b055e9c7e5c59587152e9494827dfc3096d7cc
Author: triesap <tyson@radroots.org>
Date:   Tue, 16 Jun 2026 00:12:03 -0700

sdk: push queued outbox targets

Diffstat:
Mcrates/sdk/src/sync_runtime.rs | 5-----
Mcrates/sdk/tests/sync_runtime.rs | 25++++---------------------
2 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/crates/sdk/src/sync_runtime.rs b/crates/sdk/src/sync_runtime.rs @@ -191,11 +191,6 @@ impl<'sdk> SyncClient<'sdk> { ) -> Result<PushOutboxReceipt, RadrootsSdkError> { #[cfg(feature = "relay-runtime")] { - if self.sdk.relay_urls().is_empty() { - return Err(RadrootsSdkError::ProductSyncRelaySetupFailure { - message: "sync push requires configured relay URLs".to_owned(), - }); - } let adapter = RadrootsNostrClientPublishAdapter::new(RadrootsNostrClient::new_signerless()); self.push_outbox_with_adapter(&adapter, request).await diff --git a/crates/sdk/tests/sync_runtime.rs b/crates/sdk/tests/sync_runtime.rs @@ -229,8 +229,8 @@ async fn product_push_outbox_without_relay_runtime_returns_structured_error() { #[cfg(feature = "relay-runtime")] #[tokio::test] -async fn product_push_outbox_empty_queue_uses_configured_relays() { - let (_tempdir, sdk) = directory_sdk(&[RELAY_A]).await; +async fn product_push_outbox_empty_queue_does_not_require_builder_relays() { + let (_tempdir, sdk) = directory_sdk(&[]).await; let receipt = sdk .sync() @@ -242,23 +242,6 @@ async fn product_push_outbox_empty_queue_uses_configured_relays() { assert!(receipt.events.is_empty()); } -#[cfg(feature = "relay-runtime")] -#[tokio::test] -async fn product_push_outbox_requires_configured_relays() { - let (_tempdir, sdk) = directory_sdk(&[]).await; - - let error = sdk - .sync() - .push_outbox(PushOutboxRequest::new()) - .await - .expect_err("missing configured relays"); - - assert!(matches!( - error, - RadrootsSdkError::ProductSyncRelaySetupFailure { .. } - )); -} - #[tokio::test] async fn push_outbox_rejects_invalid_limits_before_claiming() { let (_tempdir, sdk) = directory_sdk(&[RELAY_A]).await; @@ -284,8 +267,8 @@ async fn push_outbox_rejects_invalid_limits_before_claiming() { } #[tokio::test] -async fn push_outbox_publishes_signed_listing_and_marks_outbox_published() { - let (_tempdir, sdk) = directory_sdk(&[RELAY_A]).await; +async fn push_outbox_with_adapter_uses_queued_targets_without_builder_relays() { + let (_tempdir, sdk) = directory_sdk(&[]).await; let outbox_event_id = enqueue_listing(&sdk, LISTING_A_D_TAG, "Coffee", &[RELAY_A]).await; let adapter = RadrootsMockRelayPublishAdapter::new();