Skip to content

fix: inject NEXT_PUBLIC_FUNKIT_API_KEY in CI builds; guard FunkitCheckout against a missing key#3018

Merged
sammdec merged 2 commits into
aave:feat/funkit-integrationfrom
yogurtandjam:fix/funkit-missing-apikey
Jun 16, 2026
Merged

fix: inject NEXT_PUBLIC_FUNKIT_API_KEY in CI builds; guard FunkitCheckout against a missing key#3018
sammdec merged 2 commits into
aave:feat/funkit-integrationfrom
yogurtandjam:fix/funkit-missing-apikey

Conversation

@yogurtandjam

Copy link
Copy Markdown

The funkit checkout host is mounted globally in _app, and FunkitProvider's validateFunkitConfig throws 'Invalid funkitConfig: Missing apiKey.' on an empty apiKey. The CI build pipeline never injected NEXT_PUBLIC_FUNKIT_API_KEY, so every cypress smoke build crashed the whole app on load (all markets) — the dashboard toggle and supply modal never rendered.

  • Inject NEXT_PUBLIC_FUNKIT_API_KEY (from the new FUNKIT_API_KEY repo secret) through the build composite action and every workflow that builds the app (build-test-deploy, build-test-deploy-dev, build-fork, build_staging).
  • Guard FunkitCheckout: render null when funkitConfig.apiKey is empty, so a missing/misconfigured key can never white-screen the app again — Supply falls back to the native modal via the existing beginFunSupply()->false path.
  • Revert the temporary DebugCrashBoundary (chore: add DebugCrashBoundary to capture funkit dashboard crash stack #3017) used to pinpoint this.

Requires the FUNKIT_API_KEY secret to be added to the repo for funkit to be functional (publishable client-side key); without it the app degrades to native supply rather than crashing.

…kout against a missing key

The funkit checkout host is mounted globally in _app, and FunkitProvider's
validateFunkitConfig throws 'Invalid funkitConfig: Missing apiKey.' on an empty
apiKey. The CI build pipeline never injected NEXT_PUBLIC_FUNKIT_API_KEY, so every
cypress smoke build crashed the whole app on load (all markets) — the dashboard
toggle and supply modal never rendered.

- Inject NEXT_PUBLIC_FUNKIT_API_KEY (from the new FUNKIT_API_KEY repo secret)
  through the build composite action and every workflow that builds the app
  (build-test-deploy, build-test-deploy-dev, build-fork, build_staging).
- Guard FunkitCheckout: render null when funkitConfig.apiKey is empty, so a
  missing/misconfigured key can never white-screen the app again — Supply falls
  back to the native modal via the existing beginFunSupply()->false path.
- Revert the temporary DebugCrashBoundary (aave#3017) used to pinpoint this.

Requires the FUNKIT_API_KEY secret to be added to the repo for funkit to be
functional (publishable client-side key); without it the app degrades to native
supply rather than crashing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

@yogurtandjam is attempting to deploy a commit to the Aave Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread .github/workflows/build-fork.yml Outdated
build-fork only produces the out_cypress artifact for the fork-cypress flow
(test-deploy-fork.yml); it is never deployed to users, and the FunkitCheckout
apiKey guard already prevents a crash when the key is absent. The key is only
needed in jobs that deploy a human-facing build (build-test-deploy[/dev]).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sammdec sammdec merged commit d8972d9 into aave:feat/funkit-integration Jun 16, 2026
1 check failed
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