Skip to content

router-core update_metadata emits metadata_updated event without including the new metadata value #185

@Maki-Zeninn

Description

@Maki-Zeninn

Bug

env.events().publish(
    (Symbol::new(&env, "metadata_updated"),),
    name.clone(),   // ← only route name, no metadata value
);

Fix

Include the new metadata in the event payload:

env.events().publish(
    (Symbol::new(&env, "metadata_updated"),),
    (name.clone(), metadata.clone()),
);

If including the full Option<RouteMetadata> is too large, include a boolean has_metadata:

(name.clone(), metadata.is_some()),

Tests to add

  1. test_metadata_updated_event_includes_metadata — set metadata, assert event data contains the new value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions