Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: look for URL in channel before falling back to default (#440)
This fixes #344 and makes it possible to connect to staging services with w3ui. This PR obsoletes #404 per @alanshaw's suggestion in #404 (comment) based on reasoning in storacha/ucanto#214 (comment) which points out that some sort of conditional or casting is probably unavoidable here. My solution casts the channel to have an optional `url` field and looks in that field for a URL before falling back to the default `HOST`. Have tested this locally with w3ui and verified it makes it possible to connect to staging services from w3ui - huzzah!
- Loading branch information