@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
30 lines (29 loc) • 1.46 kB
TypeScript
import { FunCheckoutStep } from './FunCheckoutStep';
/**
* Decide whether the checkout-complete success background should paint.
*
* The post-checkout `CHECKOUT_COMPLETE` step is the *page*, which also covers
* pending and failed states — so step alone is not enough. We additionally
* require:
* - the Statsig feature gate to be ON (kill-switch / per-customer rollout),
* - and the underlying checkout/direct-execution to have actually settled.
*
* Pure function (no hooks) so the gating contract is easy to unit-test.
* The caller is responsible for deriving `isCompleted` from whichever hook
* is appropriate for the path (deposit-address checkout vs direct execution).
*/
export declare function selectSuccessScreenBackground({ step, isCompleted, isFeatureGateEnabled, themeBackgroundOverlay, }: {
step: FunCheckoutStep;
/** Whether the underlying checkout/direct-execution has reached COMPLETED. */
isCompleted: boolean;
/** Statsig gate (`enable-checkout-success-screen-background`). */
isFeatureGateEnabled: boolean;
/**
* The theme variable reference for the success-screen overlay
* (`themeVars.colors.modalBackgroundCheckoutComplete`). Resolves at runtime
* to whatever the active theme defines — Aave's translucent gradient
* stack, or by default the regular modal background (which renders as a
* no-op overlay).
*/
themeBackgroundOverlay: string;
}): string | undefined;