Skip to content

fix: update default community template url#130

Merged
sdbondi merged 1 commit into
mainfrom
update-url
Apr 28, 2026
Merged

fix: update default community template url#130
sdbondi merged 1 commit into
mainfrom
update-url

Conversation

@sdbondi
Copy link
Copy Markdown
Member

@sdbondi sdbondi commented Apr 28, 2026

Description

Motivation and Context

How Has This Been Tested?

What process can a PR reviewer use to test or verify this change?

Breaking Changes

  • No
  • Yes - Please specify

@sdbondi sdbondi merged commit df8a54b into main Apr 28, 2026
4 of 5 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request bumps the workspace and package versions to 0.16.2 and updates the default metadata server URL for the Esmeralda network. A critical issue was identified regarding the new URL: the absence of a trailing slash may cause the 'community-templates' path segment to be discarded during URL joining operations in the codebase, potentially breaking metadata publishing.


pub const DEFAULT_WALLET_DAEMON_URL: &str = "http://127.0.0.1:5100/json_rpc";
pub const DEFAULT_METADATA_SERVER_URL_ESMERALDA: &str = "https://ootle-templates-esme.tari.com/";
pub const DEFAULT_METADATA_SERVER_URL_ESMERALDA: &str = "https://ootle.tari.com/community-templates";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The new URL includes a path segment (/community-templates) but lacks a trailing slash. When using the url crate, Url::join will replace the last path segment of the base URL if it does not end with a slash. Additionally, the current implementation of metadata publishing (e.g., in crates/cli/src/cli/commands/metadata/publish.rs) uses .join() with a leading slash (e.g., .join("/api/...")). In the url crate, joining a string with a leading slash treats it as an absolute path from the domain root, which will cause the /community-templates segment to be discarded, resolving to https://ootle.tari.com/api/... instead. If the API is intended to be hosted under the /community-templates/ path, this change will break metadata publishing. You should add a trailing slash here and ensure that the strings passed to .join() in the publishing logic do not start with a leading slash.

Suggested change
pub const DEFAULT_METADATA_SERVER_URL_ESMERALDA: &str = "https://ootle.tari.com/community-templates";
pub const DEFAULT_METADATA_SERVER_URL_ESMERALDA: &str = "https://ootle.tari.com/community-templates/";

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.

1 participant