-
- Please read and accept the following terms
-
-
-
-
- I certify that I have read and accept the updated{" "}
-
- Terms of Use
- {" "}
- and{" "}
-
- Privacy Policy
-
- .
-
- }
- className="mb-4"
- >
-
-
-
- {!simplifiedTerms && (
- <>
-
-
-
-
-
-
-
- >
- )}
-
-
-
-
- Next
-
-
-
- );
-}
diff --git a/packages/babylon-wallet-connector/src/components/WalletProvider/components/Screen.tsx b/packages/babylon-wallet-connector/src/components/WalletProvider/components/Screen.tsx
index 56305f4cf..9240eb2dc 100644
--- a/packages/babylon-wallet-connector/src/components/WalletProvider/components/Screen.tsx
+++ b/packages/babylon-wallet-connector/src/components/WalletProvider/components/Screen.tsx
@@ -4,7 +4,6 @@ import { ChainsContainer as Chains } from "@/components/Chains/container";
import { ErrorContainer as Error } from "@/components/Error/container";
import { InscriptionsContainer as Inscriptions } from "@/components/Inscriptions/container";
import { LoaderScreen } from "@/components/Loader";
-import { TermsOfServiceContainer as TermsOfService } from "@/components/TermsOfService/container";
import { WalletsContainer as Wallets } from "@/components/Wallets/container";
import type { Screen } from "@/context/State.context";
import type { IChain, IWallet } from "@/core/types";
@@ -16,17 +15,12 @@ interface ScreenProps {
widgets?: Record;
onSelectWallet?: (chain: IChain, wallet: IWallet) => void;
onDisconnectWallet?: (chainId: string) => void;
- onAccepTermsOfService?: () => void;
onToggleInscriptions?: (value: boolean, showAgain: boolean) => void;
onClose?: () => void;
onConfirm?: () => void;
- simplifiedTerms?: boolean;
}
const SCREENS = {
- TERMS_OF_SERVICE: ({ className, onClose, onAccepTermsOfService, simplifiedTerms }: ScreenProps) => (
-
- ),
CHAINS: ({ className, onClose, onConfirm, onDisconnectWallet }: ScreenProps) => (
),
diff --git a/packages/babylon-wallet-connector/src/components/WalletProvider/components/WalletDialog.tsx b/packages/babylon-wallet-connector/src/components/WalletProvider/components/WalletDialog.tsx
index cdf85de81..326c061c5 100644
--- a/packages/babylon-wallet-connector/src/components/WalletProvider/components/WalletDialog.tsx
+++ b/packages/babylon-wallet-connector/src/components/WalletProvider/components/WalletDialog.tsx
@@ -3,6 +3,7 @@ import { useCallback } from "react";
import { ResponsiveDialog } from "@/components/ResponsiveDialog/ResponsiveDialog";
import { useChainProviders } from "@/context/Chain.context";
import { useInscriptionProvider } from "@/context/Inscriptions.context";
+import { useLifeCycleHooks } from "@/context/LifecycleHooks.context";
import { HashMap } from "@/core/types";
import { useWalletConnect } from "@/hooks/useWalletConnect";
import { useWalletConnectors } from "@/hooks/useWalletConnectors";
@@ -16,23 +17,19 @@ interface WalletDialogProps {
storage: HashMap;
config: any;
persistent: boolean;
- simplifiedTerms?: boolean;
}
const ANIMATION_DELAY = 1000;
-export function WalletDialog({ persistent, storage, config, onError, simplifiedTerms }: WalletDialogProps) {
- const { visible, screen, confirmed, close, confirm, displayChains } = useWidgetState();
+export function WalletDialog({ persistent, storage, config, onError }: WalletDialogProps) {
+ const { visible, screen, confirmed, selectedWallets, close, confirm, displayChains } = useWidgetState();
const { toggleShowAgain, toggleLockInscriptions } = useInscriptionProvider();
+ const { acceptTermsOfService } = useLifeCycleHooks();
const connectors = useChainProviders();
const walletWidgets = useWalletWidgets(connectors, config, onError);
const { connect, disconnect } = useWalletConnectors({ persistent, accountStorage: storage, onError });
const { disconnect: disconnectAll } = useWalletConnect();
- const handleAccepTermsOfService = useCallback(() => {
- displayChains?.();
- }, [displayChains]);
-
const handleToggleInscriptions = useCallback(
(lockInscriptions: boolean, showAgain: boolean) => {
toggleShowAgain?.(showAgain);
@@ -49,10 +46,22 @@ export function WalletDialog({ persistent, storage, config, onError, simplifiedT
}
}, [close, disconnectAll, confirmed]);
- const handleConfirm = useCallback(() => {
+ const handleConfirm = useCallback(async () => {
+ const btcWallet = selectedWallets["BTC"];
+ if (btcWallet?.account?.address && btcWallet.account.publicKeyHex) {
+ try {
+ await acceptTermsOfService?.({
+ address: btcWallet.account.address,
+ public_key: btcWallet.account.publicKeyHex,
+ });
+ } catch (e) {
+ onError?.(e as Error);
+ return;
+ }
+ }
confirm?.();
close?.();
- }, [confirm]);
+ }, [confirm, close, selectedWallets, acceptTermsOfService, onError]);
return (
@@ -63,11 +72,9 @@ export function WalletDialog({ persistent, storage, config, onError, simplifiedT
onClose={handleClose}
onConfirm={handleConfirm}
onSelectWallet={connect}
- onAccepTermsOfService={handleAccepTermsOfService}
onToggleInscriptions={handleToggleInscriptions}
onDisconnectWallet={disconnect}
- simplifiedTerms={simplifiedTerms}
/>
);
-}
\ No newline at end of file
+}
diff --git a/packages/babylon-wallet-connector/src/components/WalletProvider/index.tsx b/packages/babylon-wallet-connector/src/components/WalletProvider/index.tsx
index b1c070971..c734fa9b1 100644
--- a/packages/babylon-wallet-connector/src/components/WalletProvider/index.tsx
+++ b/packages/babylon-wallet-connector/src/components/WalletProvider/index.tsx
@@ -48,11 +48,6 @@ interface WalletProviderProps {
* Provide eth and/or btc properties to enable respective chains
*/
appKitConfig?: AppKitModalConfig;
- /**
- * When true, only show the T&C checkbox in the terms of service dialog
- * instead of all three checkboxes (inscriptions, hardware wallet warnings)
- */
- simplifiedTerms?: boolean;
disableTomo?: boolean;
}
@@ -68,7 +63,6 @@ export function WalletProvider({
disabledWallets = [],
requiredChains,
appKitConfig,
- simplifiedTerms = false,
disableTomo = false,
}: PropsWithChildren) {
const networkMap = useMemo(() => deriveNetworkMap(config), [config]);
@@ -113,7 +107,7 @@ export function WalletProvider({
>
)}
-
+
);
diff --git a/packages/babylon-wallet-connector/src/context/State.context.tsx b/packages/babylon-wallet-connector/src/context/State.context.tsx
index f2b9820e3..6488a36a5 100644
--- a/packages/babylon-wallet-connector/src/context/State.context.tsx
+++ b/packages/babylon-wallet-connector/src/context/State.context.tsx
@@ -9,7 +9,6 @@ export type Screen = {
export type Screens =
| Screen<"LOADER">
- | Screen<"TERMS_OF_SERVICE">
| Screen<"CHAINS">
| Screen<"WALLETS">
| Screen<"INSCRIPTIONS">
@@ -30,7 +29,6 @@ export interface Actions {
displayChains?: () => void;
displayWallets?: (chain: string) => void;
displayInscriptions?: () => void;
- displayTermsOfService?: () => void;
displayError?: (params: {
icon?: JSX.Element;
title: string;
@@ -49,7 +47,7 @@ export interface Actions {
const defaultState: State = {
confirmed: false,
visible: false,
- screen: { type: "TERMS_OF_SERVICE" },
+ screen: { type: "CHAINS" },
chains: {},
selectedWallets: {},
};
@@ -105,10 +103,6 @@ export function StateProvider({ children, chains }: PropsWithChildren ({ ...state, screen: { type: "LOADER", params: { message } } }));
},
- displayTermsOfService: () => {
- setState((state) => ({ ...state, screen: { type: "TERMS_OF_SERVICE" } }));
- },
-
displayChains: () => {
setState((state) => ({ ...state, screen: { type: "CHAINS" } }));
},
diff --git a/packages/babylon-wallet-connector/src/hooks/useWalletConnectors.tsx b/packages/babylon-wallet-connector/src/hooks/useWalletConnectors.tsx
index e07227974..dfa1ac742 100644
--- a/packages/babylon-wallet-connector/src/hooks/useWalletConnectors.tsx
+++ b/packages/babylon-wallet-connector/src/hooks/useWalletConnectors.tsx
@@ -30,7 +30,7 @@ export function useWalletConnectors({ persistent, accountStorage, onError }: Pro
chains: chainMap,
} = useWidgetState();
const { showAgain } = useInscriptionProvider();
- const { verifyBTCAddress, acceptTermsOfService } = useLifeCycleHooks();
+ const { verifyBTCAddress } = useLifeCycleHooks();
// Connecting event
useEffect(() => {
@@ -66,11 +66,6 @@ export function useWalletConnectors({ persistent, accountStorage, onError }: Pro
validateAddress(connector.config.network, connectedWallet.account.address);
- await acceptTermsOfService?.({
- address: connectedWallet.account.address,
- public_key: connectedWallet.account.publicKeyHex,
- });
-
const goToNextScreen = () => void (showAgain ? displayInscriptions?.() : displayChains?.());
if (
diff --git a/services/vault/.env.example b/services/vault/.env.example
index e2347a531..9f14c5d7b 100644
--- a/services/vault/.env.example
+++ b/services/vault/.env.example
@@ -38,8 +38,6 @@ NEXT_PUBLIC_TBV_SIDECAR_API_URL=https://sidecar-api.canon-devnet.babylonlabs.io
# NEXT_PUBLIC_FF_DISABLE_VAULT_CAP=true
# Shows the position notifications debug panel for testing notification scenarios
# NEXT_PUBLIC_FF_POSITION_DEBUG_PANEL=true
-# Show only the T&C checkbox in the wallet connection dialog instead of all three.
-# NEXT_PUBLIC_FF_SIMPLIFIED_TERMS=true
# Added by sync-env from devnet
diff --git a/services/vault/README.md b/services/vault/README.md
index 25ce447b3..7bf813f01 100644
--- a/services/vault/README.md
+++ b/services/vault/README.md
@@ -83,10 +83,6 @@ Create a `.env` file with the following variables:
- Set to `"true"` to disable borrowing functionality
- When disabled, users will see "Borrowing Unavailable" and the borrow button will be disabled
-- `NEXT_PUBLIC_FF_SIMPLIFIED_TERMS` - Controls whether the wallet connection dialog shows simplified terms
- - Default: `false` (all three checkboxes shown unless explicitly set to `"true"`)
- - Set to `"true"` to show only the Terms of Use & Privacy Policy checkbox, hiding the inscriptions and hardware wallet warnings
-
- `NEXT_PUBLIC_FF_FORCE_PARTIAL_LIQUIDATION_SPLIT` - Forces partial liquidation split to always be suggested, even with active vaults
- Default: `false` (disabled unless explicitly set to `"true"`)
- Set to `"true"` to bypass the active-vaults check — useful for dev/QA testing of the split deposit flow
diff --git a/services/vault/src/config/featureFlags.ts b/services/vault/src/config/featureFlags.ts
index 137098a97..530118d78 100644
--- a/services/vault/src/config/featureFlags.ts
+++ b/services/vault/src/config/featureFlags.ts
@@ -33,17 +33,6 @@ export default {
return process.env.NEXT_PUBLIC_FF_DISABLE_BORROW === "true";
},
- /**
- * SIMPLIFIED_TERMS feature flag
- *
- * Purpose: Controls whether the wallet connection dialog shows simplified terms
- * Why needed: When enabled, only the T&C checkbox is shown instead of all three
- * Default: false (all three checkboxes are shown unless explicitly set to "true")
- */
- get isSimplifiedTermsEnabled() {
- return process.env.NEXT_PUBLIC_FF_SIMPLIFIED_TERMS === "true";
- },
-
/**
* FORCE_PARTIAL_LIQUIDATION feature flag
*
diff --git a/services/vault/src/context/wallet/VaultWalletConnectionProvider.tsx b/services/vault/src/context/wallet/VaultWalletConnectionProvider.tsx
index 36ce315ba..7f08a1e84 100644
--- a/services/vault/src/context/wallet/VaultWalletConnectionProvider.tsx
+++ b/services/vault/src/context/wallet/VaultWalletConnectionProvider.tsx
@@ -10,7 +10,6 @@ import { useTheme } from "next-themes";
import { useCallback, useMemo, useRef, type PropsWithChildren } from "react";
import { getNetworkConfigBTC } from "@/config";
-import featureFlags from "@/config/featureFlags";
import { getNetworkConfigETH } from "@/config/network";
import { logger } from "@/infrastructure";
@@ -116,7 +115,6 @@ export const WalletConnectionProvider = ({ children }: PropsWithChildren) => {
onError={onError}
disabledWallets={DISABLED_WALLETS}
requiredChains={["BTC", "ETH"]}
- simplifiedTerms={featureFlags.isSimplifiedTermsEnabled}
disableTomo
>
{children}