Skip to content

fix(env): make kongSwapUrl optional#7780

Closed
yhabib wants to merge 3 commits intomainfrom
fix/env-variable
Closed

fix(env): make kongSwapUrl optional#7780
yhabib wants to merge 3 commits intomainfrom
fix/env-variable

Conversation

@yhabib
Copy link
Contributor

@yhabib yhabib commented Mar 10, 2026

Motivation

When the canister is installed in some environments, the app crashes because the kongSwapUrl environment variable is missing from the HTML meta tag. KongSwap is only a fallback ticker provider (ICP Swap is primary), so it shouldn't be mandatory.

Changes

  • Made kongSwapUrl optional in the EnvironmentVars type and removed it from mandatory env var keys.
  • Added an early check in queryKongSwapTickers to throw a clear error when the URL is not configured, which is caught by loadTickers gracefully.
  • Updated the env-vars test to assert that Kong Swap URL is not mandatory.

Tests

  • ...

Todos

  • Accessibility (a11y) – any impact?
  • Changelog – is it needed?

Copy link
Contributor

@0xFFrancesco 0xFFrancesco left a comment

Choose a reason for hiding this comment

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

The same logic should apply to IcpSwap then?

IIUC it was fixed with DFX 0.31, so we could rather say to use the new DFX version.

wdyt?

@yhabib yhabib closed this Mar 11, 2026
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.

2 participants