fix: only load funkit checkout on pages with Supply actions#3064
Open
yogurtandjam wants to merge 1 commit into
Open
fix: only load funkit checkout on pages with Supply actions#3064yogurtandjam wants to merge 1 commit into
yogurtandjam wants to merge 1 commit into
Conversation
|
@yogurtandjam is attempting to deploy a commit to the Aave Team on Vercel. A member of the Team first needs to authorize it. |
206ca83 to
7aa741d
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
❌ CI run has failed! |
7aa741d to
926c3d0
Compare
The funkit checkout host was mounted app-globally, so the @funkit/connect runtime chunk loaded and ran on every route — including the markets page, where that background activity degraded navigation. Scope the host to the two routes that actually have Supply buttons (dashboard, reserve-overview); other pages (markets, history, etc.) no longer load the SDK at all. Supply clicks fall back to the native supply modal until the checkout is available. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
926c3d0 to
d6c9ceb
Compare
|
❌ CI run has failed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The funkit checkout host (
@funkit/connect) was mounted app-globally in_app, so its runtime chunk loaded and ran on every route — including the markets page, where that background activity noticeably degraded navigation.This scopes the checkout host to the only two routes that actually have Supply buttons — dashboard and reserve-overview — each mounting
<FunkitCheckout />when the page renders. All other pages (markets, history, staking, governance, …) no longer load the SDK at all. Supply clicks fall back to the native supply modal if the checkout isn't ready yet, matching existing behavior.Test plan
tsc --noEmit/ lint cleanPerformanceObserver('longtask'))🤖 Generated with Claude Code