diff --git a/src/components/Header/web3/SelectWallet.tsx b/src/components/Header/web3/SelectWallet.tsx index a29a92947a..094b1e455d 100644 --- a/src/components/Header/web3/SelectWallet.tsx +++ b/src/components/Header/web3/SelectWallet.tsx @@ -198,7 +198,7 @@ function Web3StatusInner() { id={TutorialIds.BUTTON_CONNECT_WALLET} data-testid="button-connect-wallet" > - Connect Wallet + Connect ) } diff --git a/src/components/Header/web3/WalletModal/index.tsx b/src/components/Header/web3/WalletModal/index.tsx index 6e23129f31..0986a50436 100644 --- a/src/components/Header/web3/WalletModal/index.tsx +++ b/src/components/Header/web3/WalletModal/index.tsx @@ -32,7 +32,6 @@ import { useWalletModalToggle, } from 'state/application/hooks' import { useIsConnectingWallet } from 'state/authen/hooks' -import { useIsAcceptedTerm } from 'state/user/hooks' import { ExternalLink } from 'theme' import { isEVMWallet, isOverriddenWallet, isSolanaWallet } from 'utils' @@ -62,7 +61,7 @@ const ContentWrapper = styled.div` ` const TermAndCondition = styled.div` - padding: 8px; + padding: 8px 16px; font-size: 12px; font-weight: 500; line-height: 16px; @@ -158,8 +157,6 @@ export default function WalletModal() { const previousAccount = usePrevious(account) - const [isAcceptedTerm, setIsAcceptedTerm] = useIsAcceptedTerm() - const location = useLocation() const { mixpanelHandler } = useMixpanel() @@ -316,36 +313,19 @@ export default function WalletModal() { {(walletView === WALLET_VIEWS.ACCOUNT || walletView === WALLET_VIEWS.CHANGE_WALLET) && ( - { - if (!isAcceptedTerm) { - mixpanelHandler(MIXPANEL_TYPE.WALLET_CONNECT_ACCEPT_TERM_CLICK) - } - setIsAcceptedTerm(!isAcceptedTerm) - }} - > - { - // - }} - type="checkbox" - checked={isAcceptedTerm} - data-testid="accept-term" - style={{ marginRight: '12px', height: '14px', width: '14px', minWidth: '14px', cursor: 'pointer' }} - /> + - Accept {' '} - e.stopPropagation()}> - KyberSwap‘s Terms of Use - {' '} - and{' '} - e.stopPropagation()}> - Privacy Policy - - {'. '} - - Last updated: {dayjs(TERM_FILES_PATH.VERSION).format('DD MMM YYYY')} - + + By connecting a wallet, you accept{' '} + e.stopPropagation()}> + KyberSwap‘s Terms of Use + {' '} + and consent to its{' '} + e.stopPropagation()}> + Privacy Policy + + . Last updated: {dayjs(TERM_FILES_PATH.VERSION).format('DD MMM YYYY')} + )} diff --git a/src/components/Menu/FaucetModal.tsx b/src/components/Menu/FaucetModal.tsx index 3a74446dfa..6e60406dd8 100644 --- a/src/components/Menu/FaucetModal.tsx +++ b/src/components/Menu/FaucetModal.tsx @@ -177,7 +177,7 @@ function FaucetModal() { }} style={{ borderRadius: '24px', height: '44px' }} > - Connect Wallet + Connect )} diff --git a/src/components/SwapForm/SwapActionButton/index.tsx b/src/components/SwapForm/SwapActionButton/index.tsx index bd418a4a99..a6557f8303 100644 --- a/src/components/SwapForm/SwapActionButton/index.tsx +++ b/src/components/SwapForm/SwapActionButton/index.tsx @@ -194,7 +194,7 @@ const SwapActionButton: React.FC = ({ if (!account) { return ( - Connect Wallet + Connect ) } diff --git a/src/components/YieldPools/ListItem.tsx b/src/components/YieldPools/ListItem.tsx index c242210afb..8bffef527c 100644 --- a/src/components/YieldPools/ListItem.tsx +++ b/src/components/YieldPools/ListItem.tsx @@ -708,7 +708,7 @@ const ListItem = ({ farm }: ListItemProps) => { {!account ? ( - Connect Wallet + Connect ) : ( approvalState === ApprovalState.UNKNOWN && diff --git a/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx b/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx index 080cf51828..a888ba69dc 100644 --- a/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx +++ b/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx @@ -75,7 +75,7 @@ export default function ActionButtonLimitOrder({ if (!account) return ( - Connect Wallet + Connect ) diff --git a/src/pages/AddLiquidity/TokenPair.tsx b/src/pages/AddLiquidity/TokenPair.tsx index 6098b2241d..17d934722c 100644 --- a/src/pages/AddLiquidity/TokenPair.tsx +++ b/src/pages/AddLiquidity/TokenPair.tsx @@ -682,7 +682,7 @@ const TokenPair = ({ {!account ? ( - Connect Wallet + Connect ) : ( diff --git a/src/pages/AddLiquidity/ZapIn.tsx b/src/pages/AddLiquidity/ZapIn.tsx index 5d61485169..25db3f3be8 100644 --- a/src/pages/AddLiquidity/ZapIn.tsx +++ b/src/pages/AddLiquidity/ZapIn.tsx @@ -727,7 +727,7 @@ const ZapIn = ({ {!account ? ( - Connect Wallet + Connect ) : ( diff --git a/src/pages/AddLiquidityV2/index.tsx b/src/pages/AddLiquidityV2/index.tsx index 645db2817e..a1fa8e9fa8 100644 --- a/src/pages/AddLiquidityV2/index.tsx +++ b/src/pages/AddLiquidityV2/index.tsx @@ -731,7 +731,7 @@ export default function AddLiquidity() { const Buttons = () => !account ? ( - Connect Wallet + Connect ) : ( - Connect Wallet + Connect ) : ( showApproveFlow && ( diff --git a/src/pages/BuyCrypto/index.tsx b/src/pages/BuyCrypto/index.tsx index a7d9680b72..e0400f8428 100644 --- a/src/pages/BuyCrypto/index.tsx +++ b/src/pages/BuyCrypto/index.tsx @@ -473,7 +473,7 @@ function BuyCrypto() { {!account ? ( - Connect your wallet + Connect ) : (
diff --git a/src/pages/Campaign/CampaignContent.tsx b/src/pages/Campaign/CampaignContent.tsx index 75d9c85f69..27a96703e6 100644 --- a/src/pages/Campaign/CampaignContent.tsx +++ b/src/pages/Campaign/CampaignContent.tsx @@ -571,7 +571,7 @@ export default function Campaign({ refreshListCampaign, ...props }: CampaignProp style={{ gridColumn: '1 / -1', padding: '8px', margin: '0', borderRadius: '18px' }} onClick={toggleWalletModal} > - Connect Wallet + Connect ) ) : ( diff --git a/src/pages/CreatePool/index.tsx b/src/pages/CreatePool/index.tsx index 7a6dd7ba4b..98ded952d9 100644 --- a/src/pages/CreatePool/index.tsx +++ b/src/pages/CreatePool/index.tsx @@ -744,7 +744,7 @@ export default function CreatePool() { {!account ? ( - Connect Wallet + Connect ) : ( diff --git a/src/pages/CrossChain/SwapForm/index.tsx b/src/pages/CrossChain/SwapForm/index.tsx index 89c84d1348..fb6e2165e4 100644 --- a/src/pages/CrossChain/SwapForm/index.tsx +++ b/src/pages/CrossChain/SwapForm/index.tsx @@ -386,7 +386,7 @@ export default function SwapForm() { /> ) : ( - Connect Wallet + Connect )} diff --git a/src/pages/IncreaseLiquidity/index.tsx b/src/pages/IncreaseLiquidity/index.tsx index 6d53224488..b54ee8d6e2 100644 --- a/src/pages/IncreaseLiquidity/index.tsx +++ b/src/pages/IncreaseLiquidity/index.tsx @@ -352,7 +352,7 @@ export default function IncreaseLiquidity() { ) : !account ? ( - Connect Wallet + Connect ) : ( <> diff --git a/src/pages/KyberDAO/KNCUtility/GasRefundBox.tsx b/src/pages/KyberDAO/KNCUtility/GasRefundBox.tsx index 13795b8949..3028053716 100644 --- a/src/pages/KyberDAO/KNCUtility/GasRefundBox.tsx +++ b/src/pages/KyberDAO/KNCUtility/GasRefundBox.tsx @@ -199,7 +199,7 @@ export default function GasRefundBox() { ) ) : ( - Connect Wallet + Connect ) ) : selectedTab === KNCUtilityTabs.Pending && nextCycleStartTime ? ( diff --git a/src/pages/KyberDAO/StakeKNC/MigrateModal.tsx b/src/pages/KyberDAO/StakeKNC/MigrateModal.tsx index 5b70004289..5e4881eb66 100644 --- a/src/pages/KyberDAO/StakeKNC/MigrateModal.tsx +++ b/src/pages/KyberDAO/StakeKNC/MigrateModal.tsx @@ -166,7 +166,7 @@ export default function MigrateModal({ ) : ( - Connect Wallet + Connect )} diff --git a/src/pages/KyberDAO/StakeKNC/StakeKNCComponent.tsx b/src/pages/KyberDAO/StakeKNC/StakeKNCComponent.tsx index 508b059a16..59350bfcef 100644 --- a/src/pages/KyberDAO/StakeKNC/StakeKNCComponent.tsx +++ b/src/pages/KyberDAO/StakeKNC/StakeKNCComponent.tsx @@ -529,7 +529,7 @@ export default function StakeKNCComponent() { style={{ marginRight: '5px' }} placement="top" /> - Connect Wallet + Connect )} @@ -603,7 +603,7 @@ export default function StakeKNCComponent() { style={{ marginRight: '5px' }} placement="top" /> - Connect Wallet + Connect )} diff --git a/src/pages/KyberDAO/Vote/ProposalItem/index.tsx b/src/pages/KyberDAO/Vote/ProposalItem/index.tsx index 6396527f5e..52066e78d7 100644 --- a/src/pages/KyberDAO/Vote/ProposalItem/index.tsx +++ b/src/pages/KyberDAO/Vote/ProposalItem/index.tsx @@ -178,7 +178,7 @@ const VoteButton = ({ ) : ( - Connect Wallet + Connect ) ) : ( diff --git a/src/pages/KyberDAO/Vote/index.tsx b/src/pages/KyberDAO/Vote/index.tsx index bb81c5d198..c0c671a9fd 100644 --- a/src/pages/KyberDAO/Vote/index.tsx +++ b/src/pages/KyberDAO/Vote/index.tsx @@ -421,7 +421,7 @@ export default function Vote() { ) ) : ( - Connect Your Wallet + Connect )} diff --git a/src/pages/MyEarnings/Placeholder.tsx b/src/pages/MyEarnings/Placeholder.tsx index 214ca89e7c..8bc296ddf7 100644 --- a/src/pages/MyEarnings/Placeholder.tsx +++ b/src/pages/MyEarnings/Placeholder.tsx @@ -65,7 +65,7 @@ const Placeholder = () => { }} onClick={toggleWalletModal} > - Connect Wallet + Connect diff --git a/src/pages/RemoveLiquidity/TokenPair.tsx b/src/pages/RemoveLiquidity/TokenPair.tsx index 9e0b968a48..f622f9924c 100644 --- a/src/pages/RemoveLiquidity/TokenPair.tsx +++ b/src/pages/RemoveLiquidity/TokenPair.tsx @@ -753,7 +753,7 @@ export default function TokenPair({
{!account ? ( - Connect Wallet + Connect ) : ( diff --git a/src/pages/RemoveLiquidity/ZapOut.tsx b/src/pages/RemoveLiquidity/ZapOut.tsx index 375f5626ef..ec772c21af 100644 --- a/src/pages/RemoveLiquidity/ZapOut.tsx +++ b/src/pages/RemoveLiquidity/ZapOut.tsx @@ -818,7 +818,7 @@ export default function ZapOut({
{!account ? ( - Connect Wallet + Connect ) : ( diff --git a/src/pages/SwapV2/index.tsx b/src/pages/SwapV2/index.tsx index 953b827e33..9d6cfe8143 100644 --- a/src/pages/SwapV2/index.tsx +++ b/src/pages/SwapV2/index.tsx @@ -541,7 +541,7 @@ export default function Swap() { {!account ? ( - Connect Wallet + Connect ) : showWrap ? ( diff --git a/src/pages/TrueSightV2/components/RequireConnectWallet.tsx b/src/pages/TrueSightV2/components/RequireConnectWallet.tsx index e5960c7c11..680264c389 100644 --- a/src/pages/TrueSightV2/components/RequireConnectWallet.tsx +++ b/src/pages/TrueSightV2/components/RequireConnectWallet.tsx @@ -78,7 +78,7 @@ export default function RequireConnectWalletWrapper({ height="36px" style={{ boxShadow: '0 2px 4px 2px #00000030' }} > - Connect Wallet + Connect ) diff --git a/src/state/burn/proamm/hooks.tsx b/src/state/burn/proamm/hooks.tsx index 656178b22e..a35f4914cc 100644 --- a/src/state/burn/proamm/hooks.tsx +++ b/src/state/burn/proamm/hooks.tsx @@ -122,7 +122,7 @@ export function useDerivedProAmmBurnInfo( pool && position ? pool.tickCurrent < position.tickLower || pool.tickCurrent >= position.tickUpper : false let error: ReactNode | undefined if (!account) { - error = Connect Wallet + error = Connect } // if (percent === 0) { // error = error ?? Enter a percent diff --git a/src/state/mint/proamm/hooks.tsx b/src/state/mint/proamm/hooks.tsx index ba592f1629..9f5eb988d4 100644 --- a/src/state/mint/proamm/hooks.tsx +++ b/src/state/mint/proamm/hooks.tsx @@ -515,7 +515,7 @@ export function useProAmmDerivedMintInfo( const currencyBalanceB = currencyBalances?.[Field.CURRENCY_B] const errorMessage: ReactNode | undefined = useMemo(() => { if (!account) { - return Connect Wallet + return Connect } if (poolState === PoolState.INVALID) { @@ -1068,7 +1068,7 @@ export function useProAmmDerivedAllMintInfo( const errorMessage: ReactNode | undefined = useMemo(() => { if (!account) { - return Connect Wallet + return Connect } if (poolState === PoolState.INVALID) { diff --git a/src/state/user/hooks.tsx b/src/state/user/hooks.tsx index 08f0e240ab..7d37593e37 100644 --- a/src/state/user/hooks.tsx +++ b/src/state/user/hooks.tsx @@ -101,12 +101,14 @@ export function useUserLocaleManager(): [SupportedLocale | null, (newLocale: Sup return [locale, setLocale] } +// unused for now, but may be added again in the future. So we should keep it here. export function useIsAcceptedTerm(): [boolean, (isAcceptedTerm: boolean) => void] { const dispatch = useAppDispatch() const acceptedTermVersion = useSelector( state => state.user.acceptedTermVersion, ) + // eslint-disable-next-line @typescript-eslint/no-unused-vars const isAcceptedTerm = !!acceptedTermVersion && acceptedTermVersion === TERM_FILES_PATH.VERSION const setIsAcceptedTerm = useCallback( @@ -116,7 +118,8 @@ export function useIsAcceptedTerm(): [boolean, (isAcceptedTerm: boolean) => void [dispatch], ) - return [isAcceptedTerm, setIsAcceptedTerm] + // return [isAcceptedTerm, setIsAcceptedTerm] + return [true, setIsAcceptedTerm] } export function useDegenModeManager(): [boolean, () => void] {