diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml
index 93e8489148..b5b71f8599 100644
--- a/.github/actions/build/action.yml
+++ b/.github/actions/build/action.yml
@@ -45,6 +45,10 @@ inputs:
description: enables cypress
required: false
default: 'true'
+ NEXT_PUBLIC_FUNKIT_API_KEY:
+ description: funkit checkout API key (publishable, client-side). Without it the funkit checkout host stays unmounted.
+ required: false
+ default: ''
runs:
using: 'composite'
@@ -89,3 +93,4 @@ runs:
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: '${{ inputs.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID }}'
NEXT_PUBLIC_NARVAL_CLIENT_ID: '${{ inputs.NEXT_PUBLIC_NARVAL_CLIENT_ID }}'
NEXT_PUBLIC_IS_CYPRESS_ENABLED: '${{ inputs.NEXT_PUBLIC_IS_CYPRESS_ENABLED }}'
+ NEXT_PUBLIC_FUNKIT_API_KEY: '${{ inputs.NEXT_PUBLIC_FUNKIT_API_KEY }}'
diff --git a/.github/workflows/build-test-deploy-dev.yml b/.github/workflows/build-test-deploy-dev.yml
index 0c01ef439e..2858cc2168 100644
--- a/.github/workflows/build-test-deploy-dev.yml
+++ b/.github/workflows/build-test-deploy-dev.yml
@@ -39,6 +39,7 @@ jobs:
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_NARVAL_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_NARVAL_CLIENT_ID }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: ${{ matrix.build.cypress_enabled }}
+ NEXT_PUBLIC_FUNKIT_API_KEY: ${{ secrets.FUNKIT_API_KEY }}
- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml
index afa9fcd468..a4ecd0d1be 100644
--- a/.github/workflows/build-test-deploy.yml
+++ b/.github/workflows/build-test-deploy.yml
@@ -39,6 +39,7 @@ jobs:
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_NARVAL_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_NARVAL_CLIENT_ID }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: ${{ matrix.build.cypress_enabled }}
+ NEXT_PUBLIC_FUNKIT_API_KEY: ${{ secrets.FUNKIT_API_KEY }}
- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
@@ -58,6 +59,7 @@ jobs:
uses: ./.github/actions/build
with:
NEXT_PUBLIC_ENV: 'staging'
+ NEXT_PUBLIC_FUNKIT_API_KEY: ${{ secrets.FUNKIT_API_KEY }}
- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/pages/_app.page.tsx b/pages/_app.page.tsx
index 83df00cbe1..0d86db1a93 100644
--- a/pages/_app.page.tsx
+++ b/pages/_app.page.tsx
@@ -16,7 +16,6 @@ import dynamic from 'next/dynamic';
import Head from 'next/head';
import { ReactNode, useEffect, useState } from 'react';
import { AddressBlocked } from 'src/components/AddressBlocked';
-import { DebugCrashBoundary } from 'src/components/DebugCrashBoundary';
import { Meta } from 'src/components/Meta';
import { TransactionEventHandler } from 'src/components/TransactionEventHandler';
import { GasStationProvider } from 'src/components/transactions/GasStation/GasStationProvider';
@@ -162,60 +161,56 @@ export default function MyApp(props: MyAppProps) {
imageUrl="https://app.aave.com/aave-com-opengraph.png"
/>
- {`DEBUG_CRASH[${this.props.label ?? 'app'}]: ${
- this.state.error.message
- }\n\nCOMPONENT STACK:${this.state.componentStack}\n\nERROR STACK:\n${
- this.state.error.stack
- }`}
-
- );
- }
- return this.props.children;
- }
-}
diff --git a/src/components/transactions/FunCheckout/FunkitCheckout.tsx b/src/components/transactions/FunCheckout/FunkitCheckout.tsx
index ccb0fd71eb..7e2217c607 100644
--- a/src/components/transactions/FunCheckout/FunkitCheckout.tsx
+++ b/src/components/transactions/FunCheckout/FunkitCheckout.tsx
@@ -132,6 +132,18 @@ function InnerCheckout() {
}
export function FunkitCheckout() {
+ // funkit checkout is non-essential and non-functional without an API key
+ // (NEXT_PUBLIC_FUNKIT_API_KEY). FunkitProvider validates the config on render
+ // and throws "Invalid funkitConfig: Missing apiKey." on an empty key — and
+ // because this host is mounted globally in _app, that throw crashes the entire
+ // app on every page in any environment that doesn't inject the key (CI smoke
+ // builds, preview builds, local without .env). Render nothing instead: the
+ // Supply buttons fall back to the native modal because beginFunSupply() returns
+ // false when the island never registers on the bridge.
+ if (!funkitConfig.apiKey) {
+ return null;
+ }
+
return (