@web3auth/modal 10.15.0 → 11.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.cjs/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +71 -35
- package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +4 -2
- package/dist/lib.cjs/packages/modal/src/react/context/WalletServicesInnerContext.js +3 -56
- package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +15 -152
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +1 -22
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthConnect.js +30 -43
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthInner.js +8 -4
- package/dist/lib.cjs/packages/modal/src/react/index.js +57 -28
- package/dist/lib.cjs/packages/modal/src/react/solana/index.js +21 -8
- package/dist/lib.cjs/packages/modal/src/react/wagmi/provider.js +13 -11
- package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +2 -5
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +4 -2
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +1 -2
- package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +2 -2
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +117 -29
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +1 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +1 -3
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.css.js +6 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +30 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/constants.js +5 -2
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWallet.js +63 -26
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +13 -4
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.js +25 -17
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +5 -3
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +8 -2
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Embed/Embed.js +1 -0
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/Login.js +50 -39
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/Root.js +235 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +185 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/Widget/Widget.js +106 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/ModalStateContext.js +157 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/RootContext.js +64 -21
- package/dist/lib.cjs/packages/modal/src/ui/context/WidgetContext.js +52 -0
- package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +2 -1
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +76 -45
- package/dist/lib.cjs/packages/modal/src/vue/WalletServicesInnerProvider.js +2 -50
- package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +7 -170
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthConnect.js +31 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthInner.js +2 -5
- package/dist/lib.cjs/packages/modal/src/vue/index.js +57 -28
- package/dist/lib.cjs/packages/modal/src/vue/solana/index.js +29 -8
- package/dist/lib.cjs/packages/modal/src/vue/wagmi/provider.js +15 -14
- package/dist/lib.cjs/packages/modal/src/x402/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/x402/react.js +26 -0
- package/dist/lib.cjs/packages/modal/src/x402/vue.js +18 -0
- package/dist/lib.cjs/types/interface.d.ts +2 -2
- package/dist/lib.cjs/types/modalManager.d.ts +7 -3
- package/dist/lib.cjs/types/react/context/WalletServicesInnerContext.d.ts +12 -5
- package/dist/lib.cjs/types/react/context/Web3AuthInnerContext.d.ts +4 -3
- package/dist/lib.cjs/types/react/hooks/index.d.ts +15 -14
- package/dist/lib.cjs/types/react/hooks/useWeb3Auth.d.ts +1 -2
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthConnect.d.ts +3 -3
- package/dist/lib.cjs/types/react/interfaces.d.ts +3 -2
- package/dist/lib.cjs/types/react/solana/hooks/index.d.ts +5 -4
- package/dist/lib.cjs/types/react/solana/index.d.ts +1 -0
- package/dist/lib.cjs/types/react/solana/provider.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.type.d.ts +4 -3
- package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/Loader/Loader.type.d.ts +7 -5
- package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.type.d.ts +2 -1
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/SpinnerLoader.d.ts +4 -0
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/SpinnerLoader.type.d.ts +9 -0
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/constants.d.ts +7 -4
- package/dist/lib.cjs/types/ui/containers/ConnectWallet/ConnectWallet.type.d.ts +7 -0
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.type.d.ts +0 -2
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.type.d.ts +3 -9
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.type.d.ts +0 -2
- package/dist/lib.cjs/types/ui/containers/Login/Login.type.d.ts +6 -0
- package/dist/lib.cjs/types/ui/containers/Root/Root.type.d.ts +3 -0
- package/dist/lib.cjs/types/ui/containers/Root/RootBodySheets/RootBodySheets.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/Widget/Widget.type.d.ts +5 -0
- package/dist/lib.cjs/types/ui/context/ModalStateContext.d.ts +28 -0
- package/dist/lib.cjs/types/ui/context/RootContext.d.ts +19 -7
- package/dist/lib.cjs/types/ui/context/WidgetContext.d.ts +45 -0
- package/dist/lib.cjs/types/ui/interfaces.d.ts +18 -15
- package/dist/lib.cjs/types/ui/loginModal.d.ts +6 -4
- package/dist/lib.cjs/types/vue/composables/index.d.ts +2 -14
- package/dist/lib.cjs/types/vue/composables/useWeb3Auth.d.ts +1 -2
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthConnect.d.ts +3 -3
- package/dist/lib.cjs/types/vue/interfaces.d.ts +3 -17
- package/dist/lib.cjs/types/vue/solana/composables/index.d.ts +3 -4
- package/dist/lib.cjs/types/vue/solana/composables/useSolanaClient.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/constants.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/index.d.ts +2 -0
- package/dist/lib.cjs/types/vue/solana/provider.d.ts +1 -0
- package/dist/lib.cjs/types/x402/index.d.ts +1 -0
- package/dist/lib.cjs/types/x402/react.d.ts +2 -0
- package/dist/lib.cjs/types/x402/vue.d.ts +2 -0
- package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +72 -36
- package/dist/lib.esm/packages/modal/src/react/Web3AuthProvider.js +4 -2
- package/dist/lib.esm/packages/modal/src/react/context/WalletServicesInnerContext.js +4 -57
- package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +12 -151
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3Auth.js +1 -22
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthConnect.js +28 -41
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthInner.js +7 -3
- package/dist/lib.esm/packages/modal/src/react/index.js +1 -14
- package/dist/lib.esm/packages/modal/src/react/solana/index.js +1 -4
- package/dist/lib.esm/packages/modal/src/react/wagmi/provider.js +12 -10
- package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +2 -5
- package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +4 -2
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +2 -3
- package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +3 -3
- package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +118 -30
- package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +1 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +1 -3
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.css.js +4 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +28 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +3 -3
- package/dist/lib.esm/packages/modal/src/ui/constants.js +5 -2
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWallet.js +67 -29
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +13 -4
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.js +25 -17
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +7 -5
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +8 -2
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Embed/Embed.js +1 -0
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/Login.js +53 -41
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/Root.js +238 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +183 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/Widget/Widget.js +104 -0
- package/dist/lib.esm/packages/modal/src/ui/context/ModalStateContext.js +160 -0
- package/dist/lib.esm/packages/modal/src/ui/context/RootContext.js +60 -22
- package/dist/lib.esm/packages/modal/src/ui/context/WidgetContext.js +49 -0
- package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +2 -1
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +76 -45
- package/dist/lib.esm/packages/modal/src/vue/WalletServicesInnerProvider.js +5 -54
- package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +9 -176
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthConnect.js +28 -30
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthInner.js +2 -5
- package/dist/lib.esm/packages/modal/src/vue/index.js +1 -14
- package/dist/lib.esm/packages/modal/src/vue/solana/index.js +1 -4
- package/dist/lib.esm/packages/modal/src/vue/wagmi/provider.js +10 -9
- package/dist/lib.esm/packages/modal/src/x402/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/x402/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/x402/vue.js +1 -0
- package/package.json +68 -44
- package/dist/lib.cjs/packages/modal/src/providers/ethereum-mpc-provider/index.js +0 -12
- package/dist/lib.cjs/packages/modal/src/react/hooks/useChain.js +0 -16
- package/dist/lib.cjs/packages/modal/src/react/hooks/useCheckout.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useEnableMFA.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useFunding.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useIdentityToken.js +0 -46
- package/dist/lib.cjs/packages/modal/src/react/hooks/useManageMFA.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useReceive.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useSwap.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useSwitchChain.js +0 -32
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletConnectScanner.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletServicesPlugin.js +0 -13
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletUI.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthDisconnect.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthUser.js +0 -50
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignAndSendTransaction.js +0 -36
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignMessage.js +0 -37
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignTransaction.js +0 -36
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSolanaWallet.js +0 -68
- package/dist/lib.cjs/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +0 -88
- package/dist/lib.cjs/packages/modal/src/ui/components/Root/Root.js +0 -513
- package/dist/lib.cjs/packages/modal/src/ui/components/Widget/Widget.js +0 -251
- package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +0 -9
- package/dist/lib.cjs/packages/modal/src/vue/composables/useChain.js +0 -13
- package/dist/lib.cjs/packages/modal/src/vue/composables/useCheckout.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useEnableMFA.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useFunding.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useIdentityToken.js +0 -51
- package/dist/lib.cjs/packages/modal/src/vue/composables/useManageMFA.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useReceive.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useSwap.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useSwitchChain.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletConnectScanner.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletServicesPlugin.js +0 -13
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletUI.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthUser.js +0 -54
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +0 -37
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignMessage.js +0 -39
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignTransaction.js +0 -37
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSolanaWallet.js +0 -67
- package/dist/lib.cjs/types/providers/ethereum-mpc-provider/index.d.ts +0 -1
- package/dist/lib.cjs/types/react/hooks/useChain.d.ts +0 -6
- package/dist/lib.cjs/types/react/hooks/useCheckout.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useEnableMFA.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useFunding.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useIdentityToken.d.ts +0 -13
- package/dist/lib.cjs/types/react/hooks/useManageMFA.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useReceive.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useSwap.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useSwitchChain.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useWalletConnectScanner.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useWalletServicesPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/react/hooks/useWalletUI.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthDisconnect.d.ts +0 -9
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthUser.d.ts +0 -9
- package/dist/lib.cjs/types/react/solana/hooks/useSignAndSendTransaction.d.ts +0 -8
- package/dist/lib.cjs/types/react/solana/hooks/useSignMessage.d.ts +0 -8
- package/dist/lib.cjs/types/react/solana/hooks/useSignTransaction.d.ts +0 -13
- package/dist/lib.cjs/types/react/solana/hooks/useSolanaWallet.d.ts +0 -8
- package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.d.ts +0 -3
- package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.type.d.ts +0 -19
- package/dist/lib.cjs/types/ui/components/CircularLoader/index.d.ts +0 -2
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.type.d.ts +0 -27
- package/dist/lib.cjs/types/ui/components/Login/Login.type.d.ts +0 -35
- package/dist/lib.cjs/types/ui/components/Root/Root.type.d.ts +0 -36
- package/dist/lib.cjs/types/ui/components/Widget/Widget.type.d.ts +0 -24
- package/dist/lib.cjs/types/ui/context/ThemeContext.d.ts +0 -3
- package/dist/lib.cjs/types/vue/composables/useChain.d.ts +0 -7
- package/dist/lib.cjs/types/vue/composables/useCheckout.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useEnableMFA.d.ts +0 -8
- package/dist/lib.cjs/types/vue/composables/useFunding.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useIdentityToken.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useManageMFA.d.ts +0 -8
- package/dist/lib.cjs/types/vue/composables/useReceive.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useSwap.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useSwitchChain.d.ts +0 -10
- package/dist/lib.cjs/types/vue/composables/useWalletConnectScanner.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useWalletServicesPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/vue/composables/useWalletUI.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthDisconnect.d.ts +0 -10
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthUser.d.ts +0 -10
- package/dist/lib.cjs/types/vue/solana/composables/useSignAndSendTransaction.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSignMessage.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSignTransaction.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSolanaWallet.d.ts +0 -9
- package/dist/lib.esm/packages/modal/src/providers/ethereum-mpc-provider/index.js +0 -1
- package/dist/lib.esm/packages/modal/src/react/hooks/useChain.js +0 -14
- package/dist/lib.esm/packages/modal/src/react/hooks/useCheckout.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useEnableMFA.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useFunding.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useIdentityToken.js +0 -44
- package/dist/lib.esm/packages/modal/src/react/hooks/useManageMFA.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useReceive.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useSwap.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useSwitchChain.js +0 -30
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletConnectScanner.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletServicesPlugin.js +0 -11
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletUI.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthDisconnect.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthUser.js +0 -48
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignAndSendTransaction.js +0 -34
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignMessage.js +0 -35
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignTransaction.js +0 -34
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSolanaWallet.js +0 -64
- package/dist/lib.esm/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +0 -86
- package/dist/lib.esm/packages/modal/src/ui/components/Root/Root.js +0 -524
- package/dist/lib.esm/packages/modal/src/ui/components/Widget/Widget.js +0 -253
- package/dist/lib.esm/packages/modal/src/ui/context/ThemeContext.js +0 -7
- package/dist/lib.esm/packages/modal/src/vue/composables/useChain.js +0 -11
- package/dist/lib.esm/packages/modal/src/vue/composables/useCheckout.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useEnableMFA.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useFunding.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useIdentityToken.js +0 -49
- package/dist/lib.esm/packages/modal/src/vue/composables/useManageMFA.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useReceive.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useSwap.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useSwitchChain.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletConnectScanner.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletServicesPlugin.js +0 -11
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletUI.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthUser.js +0 -52
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +0 -35
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignMessage.js +0 -37
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignTransaction.js +0 -35
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSolanaWallet.js +0 -65
- package/dist/modal.umd.min.js +0 -2
- package/dist/modal.umd.min.js.LICENSE.txt +0 -104
- /package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWallet.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/Embed.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/Embed.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/Login.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/LoginOtp.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/LoginOtp.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Root/Root.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Root/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Widget/Widget.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Widget/index.d.ts +0 -0
- /package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import Button from '../../../components/Button/Button.js';
|
|
3
|
+
import { BUTTON_TYPE } from '../../../components/Button/Button.type.js';
|
|
4
|
+
import { useWidget } from '../../../context/WidgetContext.js';
|
|
2
5
|
import i18nInstance from '../../../localeImport.js';
|
|
3
6
|
import { cn, getIcons } from '../../../utils.js';
|
|
4
|
-
import Button from '../../Button/Button.js';
|
|
5
|
-
import { BUTTON_TYPE } from '../../Button/Button.type.js';
|
|
6
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
9
|
function NoWalletsFound() {
|
|
@@ -19,10 +20,16 @@ function WalletsFound(props) {
|
|
|
19
20
|
externalButtons,
|
|
20
21
|
isLoading,
|
|
21
22
|
handleWalletClick,
|
|
22
|
-
|
|
23
|
-
walletConnectUri,
|
|
24
|
-
buttonRadius
|
|
23
|
+
walletConnectUri
|
|
25
24
|
} = props;
|
|
25
|
+
const {
|
|
26
|
+
deviceDetails,
|
|
27
|
+
uiConfig,
|
|
28
|
+
isDark
|
|
29
|
+
} = useWidget();
|
|
30
|
+
const {
|
|
31
|
+
buttonRadiusType: buttonRadius
|
|
32
|
+
} = uiConfig;
|
|
26
33
|
if (isLoading) {
|
|
27
34
|
return /*#__PURE__*/jsx("div", {
|
|
28
35
|
className: "w3a--flex w3a--flex-col w3a--gap-y-2",
|
|
@@ -38,10 +45,11 @@ function WalletsFound(props) {
|
|
|
38
45
|
});
|
|
39
46
|
}
|
|
40
47
|
return /*#__PURE__*/jsx("div", {
|
|
41
|
-
className: "w3a--flex w3a--flex-col w3a--gap-y-2
|
|
48
|
+
className: "w3a--flex w3a--flex-col w3a--gap-y-2",
|
|
42
49
|
children: externalButtons.map(button => /*#__PURE__*/jsx(Button, {
|
|
43
50
|
type: BUTTON_TYPE.WALLET,
|
|
44
51
|
props: {
|
|
52
|
+
isDark,
|
|
45
53
|
label: button.displayName,
|
|
46
54
|
onClick: () => handleWalletClick(button),
|
|
47
55
|
button,
|
|
@@ -58,9 +66,14 @@ function MoreWalletsButton(props) {
|
|
|
58
66
|
initialWalletCount,
|
|
59
67
|
handleMoreWallets,
|
|
60
68
|
isLoading,
|
|
61
|
-
isDark
|
|
62
|
-
buttonRadius
|
|
69
|
+
isDark
|
|
63
70
|
} = props;
|
|
71
|
+
const {
|
|
72
|
+
uiConfig
|
|
73
|
+
} = useWidget();
|
|
74
|
+
const {
|
|
75
|
+
buttonRadiusType: buttonRadius
|
|
76
|
+
} = uiConfig;
|
|
64
77
|
const [t] = useTranslation(undefined, {
|
|
65
78
|
i18n: i18nInstance
|
|
66
79
|
});
|
|
@@ -80,7 +93,7 @@ function MoreWalletsButton(props) {
|
|
|
80
93
|
}
|
|
81
94
|
return /*#__PURE__*/jsxs("button", {
|
|
82
95
|
type: "button",
|
|
83
|
-
className: cn("w3a--flex w3a--items-center w3a--justify-start w3a--gap-x-2 w3a--bg-app-gray-50 w3a--p-3 hover:w3a--bg-app-gray-200 dark:w3a--bg-app-gray-800 dark:hover:w3a--bg-app-gray-600 active:w3a--scale-95 w3a--transition-all w3a--duration-150
|
|
96
|
+
className: cn("w3a--flex w3a--items-center w3a--justify-start w3a--gap-x-2 w3a--bg-app-gray-50 w3a--p-3 hover:w3a--bg-app-gray-200 dark:w3a--bg-app-gray-800 dark:hover:w3a--bg-app-gray-600 active:w3a--scale-95 w3a--transition-all w3a--duration-150", {
|
|
84
97
|
"w3a--rounded-full": buttonRadius === "pill",
|
|
85
98
|
"w3a--rounded-lg": buttonRadius === "rounded",
|
|
86
99
|
"w3a--rounded-none": buttonRadius === "square"
|
|
@@ -109,9 +122,7 @@ function ConnectWalletList(props) {
|
|
|
109
122
|
handleWalletClick,
|
|
110
123
|
handleMoreWallets,
|
|
111
124
|
isDark,
|
|
112
|
-
deviceDetails,
|
|
113
125
|
walletConnectUri,
|
|
114
|
-
buttonRadius,
|
|
115
126
|
isShowAllWallets
|
|
116
127
|
} = props;
|
|
117
128
|
const onShowMoreWalletsClick = () => {
|
|
@@ -120,24 +131,21 @@ function ConnectWalletList(props) {
|
|
|
120
131
|
const showMoreWalletsButton = !isShowAllWallets;
|
|
121
132
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
122
133
|
children: [/*#__PURE__*/jsx("ul", {
|
|
123
|
-
className: cn("w3a--overflow-y-auto w3a--flex w3a--flex-col w3a--gap-y-2 w3a--h-[280px] w3a--social-container w3a--pr-
|
|
134
|
+
className: cn("w3a--overflow-y-auto w3a--flex w3a--flex-col w3a--gap-y-2 w3a--h-[280px] w3a--social-container -w3a--mx-5 w3a--pl-5 w3a--pr-1", {
|
|
124
135
|
"w3a--h-[328px]": !showMoreWalletsButton
|
|
125
136
|
}),
|
|
126
137
|
children: externalButtons.length === 0 ? /*#__PURE__*/jsx(NoWalletsFound, {}) : /*#__PURE__*/jsx(WalletsFound, {
|
|
127
138
|
externalButtons: externalButtons,
|
|
128
139
|
isLoading: isLoading,
|
|
129
140
|
handleWalletClick: handleWalletClick,
|
|
130
|
-
|
|
131
|
-
walletConnectUri: walletConnectUri,
|
|
132
|
-
buttonRadius: buttonRadius
|
|
141
|
+
walletConnectUri: walletConnectUri
|
|
133
142
|
})
|
|
134
143
|
}), showMoreWalletsButton && !isLoading && initialWalletCount < totalExternalWalletsCount && /*#__PURE__*/jsx(MoreWalletsButton, {
|
|
135
144
|
totalExternalWalletsCount: totalExternalWalletsCount,
|
|
136
145
|
initialWalletCount: initialWalletCount,
|
|
137
146
|
handleMoreWallets: onShowMoreWalletsClick,
|
|
138
147
|
isLoading: isLoading,
|
|
139
|
-
isDark: isDark
|
|
140
|
-
buttonRadius: buttonRadius
|
|
148
|
+
isDark: isDark
|
|
141
149
|
})]
|
|
142
150
|
});
|
|
143
151
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import Bowser from 'bowser';
|
|
3
|
-
import {
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { QRCode } from 'react-qrcode-logo';
|
|
6
|
+
import Image from '../../../components/Image/Image.js';
|
|
6
7
|
import { WALLET_CONNECT_LOGO } from '../../../constants.js';
|
|
7
|
-
import {
|
|
8
|
+
import { useBodyState, useToast } from '../../../context/RootContext.js';
|
|
8
9
|
import { TOAST_TYPE } from '../../../interfaces.js';
|
|
9
10
|
import i18nInstance from '../../../localeImport.js';
|
|
10
|
-
import Image from '../../Image/Image.js';
|
|
11
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
function ConnectWalletQrCode(props) {
|
|
@@ -17,9 +17,11 @@ function ConnectWalletQrCode(props) {
|
|
|
17
17
|
});
|
|
18
18
|
const {
|
|
19
19
|
bodyState,
|
|
20
|
-
setBodyState
|
|
20
|
+
setBodyState
|
|
21
|
+
} = useBodyState();
|
|
22
|
+
const {
|
|
21
23
|
setToast
|
|
22
|
-
} =
|
|
24
|
+
} = useToast();
|
|
23
25
|
const {
|
|
24
26
|
qrCodeValue,
|
|
25
27
|
isDark,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { useWidget } from '../../../context/WidgetContext.js';
|
|
3
4
|
import i18nInstance from '../../../localeImport.js';
|
|
4
5
|
import { cn } from '../../../utils.js';
|
|
5
6
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -9,9 +10,14 @@ function ConnectWalletSearch(props) {
|
|
|
9
10
|
totalExternalWalletCount,
|
|
10
11
|
isLoading,
|
|
11
12
|
walletSearch,
|
|
12
|
-
handleWalletSearch
|
|
13
|
-
buttonRadius
|
|
13
|
+
handleWalletSearch
|
|
14
14
|
} = props;
|
|
15
|
+
const {
|
|
16
|
+
uiConfig
|
|
17
|
+
} = useWidget();
|
|
18
|
+
const {
|
|
19
|
+
buttonRadiusType: buttonRadius
|
|
20
|
+
} = uiConfig;
|
|
15
21
|
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
16
22
|
const [t] = useTranslation(undefined, {
|
|
17
23
|
i18n: i18nInstance
|
|
@@ -4,48 +4,28 @@ import { AUTH_CONNECTION } from '@web3auth/auth';
|
|
|
4
4
|
import { WALLET_CONNECTORS, ANALYTICS_EVENTS, log, WalletLoginError } from '@web3auth/no-modal';
|
|
5
5
|
import { useContext, useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import Image from '../../components/Image/Image.js';
|
|
8
|
+
import SocialLoginList from '../../components/SocialLoginList/SocialLoginList.js';
|
|
7
9
|
import { capitalizeFirstLetter, CAPTCHA_SITE_KEY } from '../../config.js';
|
|
8
|
-
import { DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT } from '../../constants.js';
|
|
10
|
+
import { PAGES, DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT } from '../../constants.js';
|
|
9
11
|
import { AnalyticsContext } from '../../context/AnalyticsContext.js';
|
|
10
|
-
import {
|
|
12
|
+
import { useModalState } from '../../context/ModalStateContext.js';
|
|
13
|
+
import { useBodyState } from '../../context/RootContext.js';
|
|
14
|
+
import { useWidget } from '../../context/WidgetContext.js';
|
|
11
15
|
import { createPasswordlessHandler } from '../../handlers/factory.js';
|
|
12
16
|
import { isTestAccountPattern } from '../../helper/testAccounts.js';
|
|
13
17
|
import i18nInstance from '../../localeImport.js';
|
|
14
18
|
import { cn, getUserCountry, getIcons, validatePhoneNumber } from '../../utils.js';
|
|
15
|
-
import Image from '../Image/Image.js';
|
|
16
|
-
import SocialLoginList from '../SocialLoginList/SocialLoginList.js';
|
|
17
19
|
import LoginOtp from './LoginOtp/LoginOtp.js';
|
|
18
20
|
import LoginPasswordLess from './LoginPasswordLess/LoginPasswordLess.js';
|
|
19
21
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
20
22
|
|
|
21
23
|
const restrictedLoginMethods = [AUTH_CONNECTION.SMS_PASSWORDLESS, AUTH_CONNECTION.EMAIL_PASSWORDLESS, AUTH_CONNECTION.AUTHENTICATOR, AUTH_CONNECTION.PASSKEYS, AUTH_CONNECTION.TELEGRAM, AUTH_CONNECTION.CUSTOM];
|
|
22
24
|
function Login(props) {
|
|
23
|
-
// TODO: add appName, isEmailPrimary, isExternalPrimary
|
|
24
25
|
const {
|
|
25
|
-
web3authClientId,
|
|
26
|
-
web3authNetwork,
|
|
27
|
-
authBuildEnv,
|
|
28
|
-
appLogo,
|
|
29
|
-
isModalVisible,
|
|
30
|
-
handleSocialLoginHeight,
|
|
31
|
-
socialLoginsConfig,
|
|
32
26
|
installedExternalWalletConfig,
|
|
33
|
-
isDark,
|
|
34
|
-
handleSocialLoginClick,
|
|
35
27
|
totalExternalWallets,
|
|
36
|
-
remainingUndisplayedWallets
|
|
37
|
-
isEmailPasswordLessLoginVisible,
|
|
38
|
-
isSmsPasswordLessLoginVisible,
|
|
39
|
-
handleExternalWalletBtnClick,
|
|
40
|
-
handleExternalWalletClick,
|
|
41
|
-
areSocialLoginsVisible,
|
|
42
|
-
showPasswordLessInput,
|
|
43
|
-
showExternalWalletButton,
|
|
44
|
-
showExternalWalletCount,
|
|
45
|
-
showInstalledExternalWallets,
|
|
46
|
-
logoAlignment = "center",
|
|
47
|
-
buttonRadius = "pill",
|
|
48
|
-
deviceDetails
|
|
28
|
+
remainingUndisplayedWallets
|
|
49
29
|
} = props;
|
|
50
30
|
const [t] = useTranslation(undefined, {
|
|
51
31
|
i18n: i18nInstance
|
|
@@ -53,10 +33,42 @@ function Login(props) {
|
|
|
53
33
|
const {
|
|
54
34
|
bodyState,
|
|
55
35
|
setBodyState
|
|
56
|
-
} =
|
|
36
|
+
} = useBodyState();
|
|
57
37
|
const {
|
|
58
38
|
analytics
|
|
59
39
|
} = useContext(AnalyticsContext);
|
|
40
|
+
const {
|
|
41
|
+
appLogo,
|
|
42
|
+
deviceDetails,
|
|
43
|
+
uiConfig,
|
|
44
|
+
isDark
|
|
45
|
+
} = useWidget();
|
|
46
|
+
// TODO: add appName, isEmailPrimary, isExternalPrimary
|
|
47
|
+
const {
|
|
48
|
+
modalState,
|
|
49
|
+
setModalState,
|
|
50
|
+
areSocialLoginsVisible,
|
|
51
|
+
isEmailPasswordLessLoginVisible,
|
|
52
|
+
isSmsPasswordLessLoginVisible,
|
|
53
|
+
showPasswordLessInput,
|
|
54
|
+
showExternalWalletButton,
|
|
55
|
+
handleShowExternalWallets,
|
|
56
|
+
preHandleSocialLoginClick: handleSocialLoginClick,
|
|
57
|
+
preHandleExternalWalletClick: handleExternalWalletClick
|
|
58
|
+
} = useModalState();
|
|
59
|
+
const {
|
|
60
|
+
modalVisibility: isModalVisible,
|
|
61
|
+
socialLoginsConfig
|
|
62
|
+
} = modalState;
|
|
63
|
+
const {
|
|
64
|
+
buttonRadiusType: buttonRadius,
|
|
65
|
+
logoAlignment,
|
|
66
|
+
displayInstalledExternalWallets: showInstalledExternalWallets,
|
|
67
|
+
displayExternalWalletsCount: showExternalWalletCount,
|
|
68
|
+
web3authClientId,
|
|
69
|
+
web3authNetwork,
|
|
70
|
+
authBuildEnv
|
|
71
|
+
} = uiConfig;
|
|
60
72
|
const [countryCode, setCountryCode] = useState("");
|
|
61
73
|
const [countryFlag, setCountryFlag] = useState("");
|
|
62
74
|
const [passwordlessErrorMessage, setPasswordlessErrorMessage] = useState("");
|
|
@@ -78,7 +90,6 @@ function Login(props) {
|
|
|
78
90
|
const handleSocialLoginExpand = () => {
|
|
79
91
|
setExpandSocialLogins(prev => !prev);
|
|
80
92
|
setIsPasswordLessCtaClicked(false);
|
|
81
|
-
handleSocialLoginHeight();
|
|
82
93
|
};
|
|
83
94
|
useEffect(() => {
|
|
84
95
|
const maxOptions = Object.keys(socialLoginsConfig.loginMethods).filter(loginMethodKey => {
|
|
@@ -133,7 +144,6 @@ function Login(props) {
|
|
|
133
144
|
isDark,
|
|
134
145
|
isPrimaryBtn,
|
|
135
146
|
name: name === "Twitter" ? "X" : name,
|
|
136
|
-
connector: socialLoginsConfig.connector,
|
|
137
147
|
loginParams: {
|
|
138
148
|
authConnection: connectorConfig.authConnection || method,
|
|
139
149
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -201,7 +211,6 @@ function Login(props) {
|
|
|
201
211
|
const connectorConfig = socialLoginsConfig.loginMethods[AUTH_CONNECTION.EMAIL_PASSWORDLESS];
|
|
202
212
|
if (connectorConfig.isDefault) {
|
|
203
213
|
return handleSocialLoginClick({
|
|
204
|
-
connector: socialLoginsConfig.connector,
|
|
205
214
|
loginParams: {
|
|
206
215
|
authConnection: AUTH_CONNECTION.EMAIL_PASSWORDLESS,
|
|
207
216
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -224,7 +233,6 @@ function Login(props) {
|
|
|
224
233
|
const connectorConfig = socialLoginsConfig.loginMethods[AUTH_CONNECTION.SMS_PASSWORDLESS];
|
|
225
234
|
if (connectorConfig.isDefault) {
|
|
226
235
|
return handleSocialLoginClick({
|
|
227
|
-
connector: socialLoginsConfig.connector,
|
|
228
236
|
loginParams: {
|
|
229
237
|
authConnection: AUTH_CONNECTION.SMS_PASSWORDLESS,
|
|
230
238
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -282,7 +290,6 @@ function Login(props) {
|
|
|
282
290
|
if (result !== null && result !== void 0 && (_result$data = result.data) !== null && _result$data !== void 0 && _result$data.id_token) {
|
|
283
291
|
var _result$data2;
|
|
284
292
|
return handleSocialLoginClick({
|
|
285
|
-
connector: socialLoginsConfig.connector,
|
|
286
293
|
loginParams: {
|
|
287
294
|
authConnection: authConnection,
|
|
288
295
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -301,6 +308,12 @@ function Login(props) {
|
|
|
301
308
|
setOtpLoading(false);
|
|
302
309
|
}
|
|
303
310
|
};
|
|
311
|
+
const handleExternalWalletBtnClick = useCallback(flag => {
|
|
312
|
+
setModalState(_objectSpread(_objectSpread({}, modalState), {}, {
|
|
313
|
+
currentPage: PAGES.WALLET_LIST
|
|
314
|
+
}));
|
|
315
|
+
handleShowExternalWallets(flag);
|
|
316
|
+
}, [modalState, setModalState, handleShowExternalWallets]);
|
|
304
317
|
|
|
305
318
|
/**
|
|
306
319
|
* Installed wallet click logic:
|
|
@@ -322,23 +335,22 @@ function Login(props) {
|
|
|
322
335
|
total_external_wallets: totalExternalWallets
|
|
323
336
|
});
|
|
324
337
|
log.info("handleInstalledWalletClick", wallet);
|
|
325
|
-
|
|
338
|
+
|
|
339
|
+
// for non-injected MetaMask on desktop, navigate to ConnectWallet page with pre-selected wallet
|
|
326
340
|
if (wallet.name === WALLET_CONNECTORS.METAMASK && !wallet.hasInjectedWallet && deviceDetails.platform === "desktop") {
|
|
327
341
|
handleExternalWalletClick({
|
|
328
342
|
connector: wallet.name
|
|
329
343
|
});
|
|
330
|
-
//
|
|
344
|
+
// Set pre-selected wallet and navigate to ConnectWallet page
|
|
331
345
|
setBodyState(_objectSpread(_objectSpread({}, bodyState), {}, {
|
|
332
|
-
|
|
333
|
-
show: true,
|
|
334
|
-
wallet: wallet
|
|
335
|
-
}
|
|
346
|
+
preSelectedWallet: wallet
|
|
336
347
|
}));
|
|
348
|
+
handleExternalWalletBtnClick(true);
|
|
337
349
|
return;
|
|
338
350
|
}
|
|
339
351
|
|
|
340
352
|
// when having multiple namespaces, ask user to select one
|
|
341
|
-
if (((_wallet$chainNamespac = wallet.chainNamespaces) === null || _wallet$chainNamespac === void 0 ? void 0 : _wallet$chainNamespac.length) > 1) {
|
|
353
|
+
if (((_wallet$chainNamespac = wallet.chainNamespaces) === null || _wallet$chainNamespac === void 0 ? void 0 : _wallet$chainNamespac.length) > 1 && wallet.name !== WALLET_CONNECTORS.METAMASK) {
|
|
342
354
|
setBodyState(_objectSpread(_objectSpread({}, bodyState), {}, {
|
|
343
355
|
multiChainSelector: {
|
|
344
356
|
show: true,
|
|
@@ -363,7 +375,7 @@ function Login(props) {
|
|
|
363
375
|
});
|
|
364
376
|
setIsPasswordLessCtaClicked(false);
|
|
365
377
|
e === null || e === void 0 || e.preventDefault();
|
|
366
|
-
|
|
378
|
+
handleExternalWalletBtnClick(true);
|
|
367
379
|
}, [analytics, handleExternalWalletBtnClick, installedExternalWallets.length, totalExternalWallets]);
|
|
368
380
|
useEffect(() => {
|
|
369
381
|
if (showExternalWalletButton && !areSocialLoginsVisible && !showPasswordLessInput) {
|
package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AUTH_CONNECTION } from '@web3auth/auth';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import OtpInput$1 from '../../../components/Otp/Otp.js';
|
|
4
5
|
import i18nInstance from '../../../localeImport.js';
|
|
5
6
|
import { getIcons } from '../../../utils.js';
|
|
6
|
-
import OtpInput$1 from '../../Otp/Otp.js';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import PulseLoader from '../../../components/PulseLoader/PulseLoader.js';
|
|
3
4
|
import i18nInstance from '../../../localeImport.js';
|
|
4
5
|
import { getIcons, cn } from '../../../utils.js';
|
|
5
|
-
import PulseLoader from '../../PulseLoader/PulseLoader.js';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
function LoginPasswordLess(props) {
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
|
+
import { WALLET_CONNECTORS } from '@web3auth/no-modal';
|
|
3
|
+
import { useRef, useState, useEffect, useMemo, useCallback } from 'react';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import Footer from '../../components/Footer/Footer.js';
|
|
6
|
+
import Loader from '../../components/Loader/Loader.js';
|
|
7
|
+
import Toast from '../../components/Toast/Toast.js';
|
|
8
|
+
import { DEFAULT_METAMASK_WALLET_REGISTRY_ITEM, PAGES } from '../../constants.js';
|
|
9
|
+
import { useModalState } from '../../context/ModalStateContext.js';
|
|
10
|
+
import { RootProvider } from '../../context/RootContext.js';
|
|
11
|
+
import { useWidget } from '../../context/WidgetContext.js';
|
|
12
|
+
import { MODAL_STATUS } from '../../interfaces.js';
|
|
13
|
+
import ConnectWallet from '../ConnectWallet/ConnectWallet.js';
|
|
14
|
+
import Login from '../Login/Login.js';
|
|
15
|
+
import RootBodySheets from './RootBodySheets/RootBodySheets.js';
|
|
16
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
|
+
|
|
18
|
+
function RootContent(props) {
|
|
19
|
+
const {
|
|
20
|
+
onCloseLoader
|
|
21
|
+
} = props;
|
|
22
|
+
const {
|
|
23
|
+
modalState,
|
|
24
|
+
shouldShowLoginPage,
|
|
25
|
+
showPasswordLessInput,
|
|
26
|
+
areSocialLoginsVisible
|
|
27
|
+
} = useModalState();
|
|
28
|
+
const {
|
|
29
|
+
deviceDetails,
|
|
30
|
+
uiConfig,
|
|
31
|
+
isConnectAndSignAuthenticationMode,
|
|
32
|
+
handleMobileVerifyConnect,
|
|
33
|
+
handleAcceptConsent,
|
|
34
|
+
handleDeclineConsent
|
|
35
|
+
} = useWidget();
|
|
36
|
+
const {
|
|
37
|
+
chainNamespaces,
|
|
38
|
+
walletRegistry,
|
|
39
|
+
privacyPolicy,
|
|
40
|
+
tncLink,
|
|
41
|
+
displayInstalledExternalWallets,
|
|
42
|
+
hideSuccessScreen,
|
|
43
|
+
consentRequired
|
|
44
|
+
} = uiConfig;
|
|
45
|
+
const contentRef = useRef(null);
|
|
46
|
+
const [containerHeight, setContainerHeight] = useState(530);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
const el = contentRef.current;
|
|
49
|
+
if (!el) return;
|
|
50
|
+
const updateHeight = () => {
|
|
51
|
+
const elToMeasure = contentRef.current;
|
|
52
|
+
if (!elToMeasure) return;
|
|
53
|
+
const fullHeight = elToMeasure.scrollHeight;
|
|
54
|
+
if (fullHeight > 0) setContainerHeight(Math.ceil(fullHeight));
|
|
55
|
+
};
|
|
56
|
+
const observer = new ResizeObserver(() => {
|
|
57
|
+
requestAnimationFrame(updateHeight);
|
|
58
|
+
});
|
|
59
|
+
observer.observe(el);
|
|
60
|
+
// Run initial measurement after layout so scrollHeight includes full content (e.g. footer)
|
|
61
|
+
requestAnimationFrame(updateHeight);
|
|
62
|
+
return () => observer.disconnect();
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
65
|
+
// External Wallets
|
|
66
|
+
const config = useMemo(() => modalState.externalWalletsConfig, [modalState.externalWalletsConfig]);
|
|
67
|
+
const connectorVisibilityMap = useMemo(() => {
|
|
68
|
+
const canShowMap = {};
|
|
69
|
+
Object.keys(config).forEach(connector => {
|
|
70
|
+
var _config$connector;
|
|
71
|
+
canShowMap[connector] = Boolean((_config$connector = config[connector]) === null || _config$connector === void 0 ? void 0 : _config$connector.showOnModal);
|
|
72
|
+
});
|
|
73
|
+
return canShowMap;
|
|
74
|
+
}, [config]);
|
|
75
|
+
const isWalletConnectConnectorIncluded = useMemo(
|
|
76
|
+
// WC is always included when enabling wallet discovery
|
|
77
|
+
() => Object.keys((walletRegistry === null || walletRegistry === void 0 ? void 0 : walletRegistry.default) || {}).length > 0 || Object.keys((walletRegistry === null || walletRegistry === void 0 ? void 0 : walletRegistry.others) || {}).length > 0, [walletRegistry]);
|
|
78
|
+
const generateWalletButtons = useCallback(wallets => {
|
|
79
|
+
return Object.keys(wallets).reduce((acc, wallet) => {
|
|
80
|
+
var _walletRegistryItem$c, _walletRegistryItem$i, _walletRegistryItem$w;
|
|
81
|
+
if (connectorVisibilityMap[wallet] === false) return acc;
|
|
82
|
+
const walletRegistryItem = wallets[wallet];
|
|
83
|
+
let href = "";
|
|
84
|
+
if (deviceDetails.platform !== "desktop") {
|
|
85
|
+
var _walletRegistryItem$m, _walletRegistryItem$m2;
|
|
86
|
+
const universalLink = walletRegistryItem === null || walletRegistryItem === void 0 || (_walletRegistryItem$m = walletRegistryItem.mobile) === null || _walletRegistryItem$m === void 0 ? void 0 : _walletRegistryItem$m.universal;
|
|
87
|
+
const deepLink = walletRegistryItem === null || walletRegistryItem === void 0 || (_walletRegistryItem$m2 = walletRegistryItem.mobile) === null || _walletRegistryItem$m2 === void 0 ? void 0 : _walletRegistryItem$m2.native;
|
|
88
|
+
href = universalLink || deepLink;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// determine the chain namespaces supported by the wallet
|
|
92
|
+
const connectorConfig = config[wallet];
|
|
93
|
+
const connectorChainNamespaces = (connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.chainNamespaces) || [];
|
|
94
|
+
const registryNamespaces = new Set((_walletRegistryItem$c = walletRegistryItem.chains) === null || _walletRegistryItem$c === void 0 ? void 0 : _walletRegistryItem$c.map(chain => chain.split(":")[0]));
|
|
95
|
+
const injectedChainNamespaces = new Set((_walletRegistryItem$i = walletRegistryItem.injected) === null || _walletRegistryItem$i === void 0 ? void 0 : _walletRegistryItem$i.map(injected => injected.namespace));
|
|
96
|
+
const availableChainNamespaces = chainNamespaces.filter(x => registryNamespaces.has(x) || injectedChainNamespaces.has(x) || connectorChainNamespaces.includes(x));
|
|
97
|
+
const button = {
|
|
98
|
+
name: wallet,
|
|
99
|
+
displayName: walletRegistryItem.name,
|
|
100
|
+
href,
|
|
101
|
+
hasInjectedWallet: (connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.isInjected) || false,
|
|
102
|
+
isInstalled: !!connectorConfig,
|
|
103
|
+
hasWalletConnect: isWalletConnectConnectorIncluded && ((_walletRegistryItem$w = walletRegistryItem.walletConnect) === null || _walletRegistryItem$w === void 0 || (_walletRegistryItem$w = _walletRegistryItem$w.sdks) === null || _walletRegistryItem$w === void 0 ? void 0 : _walletRegistryItem$w.includes("sign_v2")),
|
|
104
|
+
hasInstallLinks: Object.keys(walletRegistryItem.app || {}).length > 0,
|
|
105
|
+
walletRegistryItem,
|
|
106
|
+
imgExtension: walletRegistryItem.imgExtension || "svg",
|
|
107
|
+
icon: connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.icon,
|
|
108
|
+
chainNamespaces: availableChainNamespaces
|
|
109
|
+
};
|
|
110
|
+
if (!button.hasInjectedWallet && !button.hasWalletConnect && !button.hasInstallLinks) return acc;
|
|
111
|
+
if (availableChainNamespaces.length === 0) return acc;
|
|
112
|
+
acc.push(button);
|
|
113
|
+
return acc;
|
|
114
|
+
}, []);
|
|
115
|
+
}, [connectorVisibilityMap, chainNamespaces, config, deviceDetails.platform, isWalletConnectConnectorIncluded]);
|
|
116
|
+
const allRegistryButtons = useMemo(() => {
|
|
117
|
+
return [...generateWalletButtons(walletRegistry.default), ...generateWalletButtons(walletRegistry.others)];
|
|
118
|
+
}, [generateWalletButtons, walletRegistry.default, walletRegistry.others]);
|
|
119
|
+
const installedConnectorButtons = useMemo(() => {
|
|
120
|
+
const installedConnectors = Object.keys(config).reduce((acc, connector) => {
|
|
121
|
+
if (connector === WALLET_CONNECTORS.WALLET_CONNECT_V2 || !connectorVisibilityMap[connector]) return acc;
|
|
122
|
+
const connectorConfig = config[connector];
|
|
123
|
+
acc.push({
|
|
124
|
+
name: connector,
|
|
125
|
+
displayName: (connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.label) || connector,
|
|
126
|
+
hasInjectedWallet: (connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.isInjected) || false,
|
|
127
|
+
isInstalled: true,
|
|
128
|
+
hasWalletConnect: false,
|
|
129
|
+
hasInstallLinks: false,
|
|
130
|
+
icon: connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.icon,
|
|
131
|
+
chainNamespaces: (connectorConfig === null || connectorConfig === void 0 ? void 0 : connectorConfig.chainNamespaces) || []
|
|
132
|
+
});
|
|
133
|
+
return acc;
|
|
134
|
+
}, []);
|
|
135
|
+
|
|
136
|
+
// if metamask connector is not injected, use the registry button instead to display QR code
|
|
137
|
+
const metamaskConnectorIdx = installedConnectors.findIndex(x => x.name === WALLET_CONNECTORS.METAMASK && !x.hasInjectedWallet);
|
|
138
|
+
if (metamaskConnectorIdx !== -1) {
|
|
139
|
+
const metamaskConnector = installedConnectors[metamaskConnectorIdx];
|
|
140
|
+
let metamaskRegistryButton = allRegistryButtons.find(button => button.name === WALLET_CONNECTORS.METAMASK);
|
|
141
|
+
if (!metamaskRegistryButton) {
|
|
142
|
+
// use the default metamask registry item if it's not in the registry
|
|
143
|
+
metamaskRegistryButton = generateWalletButtons({
|
|
144
|
+
[WALLET_CONNECTORS.METAMASK]: DEFAULT_METAMASK_WALLET_REGISTRY_ITEM
|
|
145
|
+
})[0];
|
|
146
|
+
}
|
|
147
|
+
if (metamaskRegistryButton) {
|
|
148
|
+
installedConnectors.splice(metamaskConnectorIdx, 1, _objectSpread(_objectSpread({}, metamaskRegistryButton), {}, {
|
|
149
|
+
chainNamespaces: metamaskConnector.chainNamespaces,
|
|
150
|
+
// preserve the chain namespaces
|
|
151
|
+
isInstalled: true
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// make metamask the first button and limit the number of buttons
|
|
157
|
+
return installedConnectors;
|
|
158
|
+
}, [allRegistryButtons, config, connectorVisibilityMap, generateWalletButtons]);
|
|
159
|
+
const customConnectorButtons = useMemo(() => {
|
|
160
|
+
return installedConnectorButtons.filter(button => !button.hasInjectedWallet);
|
|
161
|
+
}, [installedConnectorButtons]);
|
|
162
|
+
const topInstalledConnectorButtons = useMemo(() => {
|
|
163
|
+
const MAX_TOP_INSTALLED_CONNECTORS = 3;
|
|
164
|
+
|
|
165
|
+
// make metamask the first button and limit the number of buttons
|
|
166
|
+
return installedConnectorButtons.sort((a, _) => a.name === WALLET_CONNECTORS.METAMASK ? -1 : 1).slice(0, displayInstalledExternalWallets ? MAX_TOP_INSTALLED_CONNECTORS : 1);
|
|
167
|
+
}, [installedConnectorButtons, displayInstalledExternalWallets]);
|
|
168
|
+
const allExternalWallets = useMemo(() => {
|
|
169
|
+
const uniqueButtonSet = new Set();
|
|
170
|
+
return installedConnectorButtons.concat(allRegistryButtons).filter(button => {
|
|
171
|
+
if (uniqueButtonSet.has(button.name)) return false;
|
|
172
|
+
uniqueButtonSet.add(button.name);
|
|
173
|
+
return true;
|
|
174
|
+
});
|
|
175
|
+
}, [allRegistryButtons, installedConnectorButtons]);
|
|
176
|
+
const remainingUndisplayedWallets = useMemo(() => {
|
|
177
|
+
return allExternalWallets.filter(button => {
|
|
178
|
+
return !topInstalledConnectorButtons.includes(button);
|
|
179
|
+
}).length;
|
|
180
|
+
}, [allExternalWallets, topInstalledConnectorButtons]);
|
|
181
|
+
const isExternalWalletModeOnly = useMemo(() => {
|
|
182
|
+
return !showPasswordLessInput && !areSocialLoginsVisible;
|
|
183
|
+
}, [areSocialLoginsVisible, showPasswordLessInput]);
|
|
184
|
+
const isShowLoader = useMemo(() => {
|
|
185
|
+
return modalState.status !== MODAL_STATUS.INITIALIZED;
|
|
186
|
+
}, [modalState.status]);
|
|
187
|
+
const isConsentRequiringStatus = modalState.status === MODAL_STATUS.CONSENT_REQUIRING;
|
|
188
|
+
return /*#__PURE__*/jsxs("div", {
|
|
189
|
+
className: "w3a--relative w3a--flex w3a--flex-col",
|
|
190
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
191
|
+
className: "w3a-modal-container w3a--relative w3a--flex w3a--flex-col w3a--overflow-hidden",
|
|
192
|
+
style: {
|
|
193
|
+
height: containerHeight
|
|
194
|
+
},
|
|
195
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
196
|
+
className: "w3a--modal-curtain"
|
|
197
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
198
|
+
ref: contentRef,
|
|
199
|
+
className: twMerge("w3a--relative w3a--flex w3a--flex-col w3a--p-6", isShowLoader && !isConsentRequiringStatus ? "w3a--flex-1" : "w3a--flex-none"),
|
|
200
|
+
children: [isShowLoader ? /*#__PURE__*/jsx(Loader, {
|
|
201
|
+
connector: modalState.detailedLoaderConnector,
|
|
202
|
+
connectorName: modalState.detailedLoaderConnectorName,
|
|
203
|
+
modalStatus: modalState.status,
|
|
204
|
+
onClose: onCloseLoader,
|
|
205
|
+
isConnectAndSignAuthenticationMode: isConnectAndSignAuthenticationMode,
|
|
206
|
+
externalWalletsConfig: modalState.externalWalletsConfig,
|
|
207
|
+
handleMobileVerifyConnect: handleMobileVerifyConnect,
|
|
208
|
+
hideSuccessScreen: hideSuccessScreen,
|
|
209
|
+
onAcceptConsent: handleAcceptConsent,
|
|
210
|
+
onDeclineConsent: handleDeclineConsent,
|
|
211
|
+
privacyPolicy: privacyPolicy,
|
|
212
|
+
tncLink: tncLink
|
|
213
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
214
|
+
children: [modalState.currentPage === PAGES.LOGIN_OPTIONS && shouldShowLoginPage && modalState.status === MODAL_STATUS.INITIALIZED && /*#__PURE__*/jsx(Login, {
|
|
215
|
+
installedExternalWalletConfig: topInstalledConnectorButtons,
|
|
216
|
+
totalExternalWallets: allExternalWallets.length,
|
|
217
|
+
remainingUndisplayedWallets: remainingUndisplayedWallets
|
|
218
|
+
}), modalState.currentPage === PAGES.WALLET_LIST && (!shouldShowLoginPage || isExternalWalletModeOnly) && modalState.status === MODAL_STATUS.INITIALIZED && /*#__PURE__*/jsx(ConnectWallet, {
|
|
219
|
+
allRegistryButtons: allRegistryButtons,
|
|
220
|
+
connectorVisibilityMap: connectorVisibilityMap,
|
|
221
|
+
customConnectorButtons: customConnectorButtons,
|
|
222
|
+
isExternalWalletModeOnly: isExternalWalletModeOnly
|
|
223
|
+
})]
|
|
224
|
+
}), /*#__PURE__*/jsx(Footer, {
|
|
225
|
+
privacyPolicy: !consentRequired && modalState.status !== MODAL_STATUS.CONSENT_REQUIRING ? privacyPolicy : undefined,
|
|
226
|
+
termsOfService: !consentRequired && modalState.status !== MODAL_STATUS.CONSENT_REQUIRING ? tncLink : undefined
|
|
227
|
+
}), /*#__PURE__*/jsx(RootBodySheets, {})]
|
|
228
|
+
})]
|
|
229
|
+
}), /*#__PURE__*/jsx(Toast, {})]
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function Root(props) {
|
|
233
|
+
return /*#__PURE__*/jsx(RootProvider, {
|
|
234
|
+
children: /*#__PURE__*/jsx(RootContent, _objectSpread({}, props))
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export { Root as default };
|