thirdweb 5.30.0-nightly-fe775166d40fdd50faaa8d6da3fcd624f9a450ed-20240622000610 → 5.30.0-nightly-3979ff0238ae9b3a0a216e6c2d562eb7206a9fe8-20240626085813
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/cjs/auth/verifySignature.js +15 -1
- package/dist/cjs/auth/verifySignature.js.map +1 -1
- package/dist/cjs/exports/extensions/erc1155.js +3 -1
- package/dist/cjs/exports/extensions/erc1155.js.map +1 -1
- package/dist/cjs/exports/transaction.js +3 -1
- package/dist/cjs/exports/transaction.js.map +1 -1
- package/dist/cjs/react/core/design-system/index.js +2 -0
- package/dist/cjs/react/core/design-system/index.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +12 -24
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +4 -6
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +12 -14
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +31 -28
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModal.js +7 -5
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModal.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +15 -17
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js +11 -13
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.js +1 -4
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.js +4 -6
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +8 -11
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/TOS.js +1 -3
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/TOS.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/screen.js +5 -9
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/screen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +2 -4
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +24 -30
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +114 -86
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js +25 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +7 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +4 -11
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js +3 -16
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +0 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +4 -6
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/utils.js +7 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/utils.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/SignatureScreen.js +2 -4
- package/dist/cjs/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/StartScreen.js +7 -9
- package/dist/cjs/react/web/ui/ConnectWallet/screens/StartScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/useConnectModal.js +23 -27
- package/dist/cjs/react/web/ui/ConnectWallet/useConnectModal.js.map +1 -1
- package/dist/cjs/react/web/ui/PayEmbed.js +1 -0
- package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/components/ChainName.js +12 -1
- package/dist/cjs/react/web/ui/components/ChainName.js.map +1 -1
- package/dist/cjs/react/web/ui/components/basic.js +1 -1
- package/dist/cjs/react/web/ui/components/basic.js.map +1 -1
- package/dist/cjs/react/web/ui/components/buttons.js +6 -0
- package/dist/cjs/react/web/ui/components/buttons.js.map +1 -1
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js +6 -8
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletFormUI.js +5 -7
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletFormUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js +6 -8
- package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/InAppWalletFormUI.js +8 -11
- package/dist/cjs/react/web/wallets/in-app/InAppWalletFormUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/InAppWalletSelectionUI.js +5 -7
- package/dist/cjs/react/web/wallets/in-app/InAppWalletSelectionUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/useInAppWalletLocale.js +5 -5
- package/dist/cjs/react/web/wallets/in-app/useInAppWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/CoinbaseSDKConnection.js +4 -6
- package/dist/cjs/react/web/wallets/shared/CoinbaseSDKConnection.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +7 -9
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectingScreen.js +3 -5
- package/dist/cjs/react/web/wallets/shared/ConnectingScreen.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/GetStartedScreen.js +4 -6
- package/dist/cjs/react/web/wallets/shared/GetStartedScreen.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js +8 -10
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js +2 -4
- package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/SocialLogin.js +3 -6
- package/dist/cjs/react/web/wallets/shared/SocialLogin.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/WalletConnectConnection.js +24 -27
- package/dist/cjs/react/web/wallets/shared/WalletConnectConnection.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/en.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/es.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js +2 -2
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/ja.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/tl.js.map +1 -1
- package/dist/cjs/react/web/wallets/walletConnect/locale.js +3 -3
- package/dist/cjs/react/web/wallets/walletConnect/locale.js.map +1 -1
- package/dist/cjs/transaction/actions/gasless/send-gasless-transaction.js +14 -4
- package/dist/cjs/transaction/actions/gasless/send-gasless-transaction.js.map +1 -1
- package/dist/cjs/transaction/actions/send-transaction.js +7 -0
- package/dist/cjs/transaction/actions/send-transaction.js.map +1 -1
- package/dist/cjs/transaction/transaction-store.js +33 -0
- package/dist/cjs/transaction/transaction-store.js.map +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/in-app/web/utils/Storage/LocalStorage.js.map +1 -1
- package/dist/cjs/wallets/wallet-connect/controller.js +7 -3
- package/dist/cjs/wallets/wallet-connect/controller.js.map +1 -1
- package/dist/esm/auth/verifySignature.js +15 -1
- package/dist/esm/auth/verifySignature.js.map +1 -1
- package/dist/esm/exports/extensions/erc1155.js +1 -0
- package/dist/esm/exports/extensions/erc1155.js.map +1 -1
- package/dist/esm/exports/transaction.js +1 -0
- package/dist/esm/exports/transaction.js.map +1 -1
- package/dist/esm/react/core/design-system/index.js +2 -0
- package/dist/esm/react/core/design-system/index.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +12 -24
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +4 -6
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +12 -14
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +31 -28
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModal.js +7 -5
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModal.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +16 -18
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js +11 -13
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.js +1 -4
- package/dist/esm/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.js +4 -6
- package/dist/esm/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +8 -11
- package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/TOS.js +1 -3
- package/dist/esm/react/web/ui/ConnectWallet/Modal/TOS.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/screen.js +5 -9
- package/dist/esm/react/web/ui/ConnectWallet/Modal/screen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +2 -4
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +24 -30
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +115 -87
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js +22 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +7 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +4 -11
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js +3 -16
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +0 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +4 -6
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/utils.js +4 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/utils.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/SignatureScreen.js +2 -4
- package/dist/esm/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/StartScreen.js +7 -9
- package/dist/esm/react/web/ui/ConnectWallet/screens/StartScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/useConnectModal.js +23 -27
- package/dist/esm/react/web/ui/ConnectWallet/useConnectModal.js.map +1 -1
- package/dist/esm/react/web/ui/PayEmbed.js +1 -0
- package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/components/ChainName.js +12 -1
- package/dist/esm/react/web/ui/components/ChainName.js.map +1 -1
- package/dist/esm/react/web/ui/components/basic.js +1 -1
- package/dist/esm/react/web/ui/components/basic.js.map +1 -1
- package/dist/esm/react/web/ui/components/buttons.js +6 -0
- package/dist/esm/react/web/ui/components/buttons.js.map +1 -1
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js +7 -9
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletFormUI.js +5 -7
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletFormUI.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js +7 -9
- package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/InAppWalletFormUI.js +8 -11
- package/dist/esm/react/web/wallets/in-app/InAppWalletFormUI.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/InAppWalletSelectionUI.js +6 -8
- package/dist/esm/react/web/wallets/in-app/InAppWalletSelectionUI.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/useInAppWalletLocale.js +5 -5
- package/dist/esm/react/web/wallets/in-app/useInAppWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/CoinbaseSDKConnection.js +4 -6
- package/dist/esm/react/web/wallets/shared/CoinbaseSDKConnection.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +7 -9
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectingScreen.js +3 -5
- package/dist/esm/react/web/wallets/shared/ConnectingScreen.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/GetStartedScreen.js +4 -6
- package/dist/esm/react/web/wallets/shared/GetStartedScreen.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js +8 -10
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/PassKeyLogin.js +2 -4
- package/dist/esm/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/SocialLogin.js +3 -6
- package/dist/esm/react/web/wallets/shared/SocialLogin.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/WalletConnectConnection.js +24 -27
- package/dist/esm/react/web/wallets/shared/WalletConnectConnection.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/en.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/es.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js +1 -1
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/ja.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/tl.js.map +1 -1
- package/dist/esm/react/web/wallets/walletConnect/locale.js +3 -3
- package/dist/esm/react/web/wallets/walletConnect/locale.js.map +1 -1
- package/dist/esm/transaction/actions/gasless/send-gasless-transaction.js +14 -4
- package/dist/esm/transaction/actions/gasless/send-gasless-transaction.js.map +1 -1
- package/dist/esm/transaction/actions/send-transaction.js +7 -0
- package/dist/esm/transaction/actions/send-transaction.js.map +1 -1
- package/dist/esm/transaction/transaction-store.js +29 -0
- package/dist/esm/transaction/transaction-store.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/in-app/web/utils/Storage/LocalStorage.js.map +1 -1
- package/dist/esm/wallets/wallet-connect/controller.js +7 -3
- package/dist/esm/wallets/wallet-connect/controller.js.map +1 -1
- package/dist/types/auth/verifySignature.d.ts +0 -20
- package/dist/types/auth/verifySignature.d.ts.map +1 -1
- package/dist/types/exports/extensions/erc1155.d.ts +1 -0
- package/dist/types/exports/extensions/erc1155.d.ts.map +1 -1
- package/dist/types/exports/transaction.d.ts +1 -0
- package/dist/types/exports/transaction.d.ts.map +1 -1
- package/dist/types/react/core/design-system/index.d.ts +2 -0
- package/dist/types/react/core/design-system/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButtonProps.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts +7 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts +20 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts +32 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts +32 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalInline.d.ts +31 -2
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalInline.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts +5 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.d.ts +20 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/TOS.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/TOS.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/screen.d.ts +6 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/screen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts +6 -0
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts +25 -0
- package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts +14 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts +9 -5
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts +2 -3
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts +0 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/utils.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/utils.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/SignatureScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/StartScreen.d.ts +13 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/StartScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/useConnectModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts +1 -0
- package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainName.d.ts +1 -0
- package/dist/types/react/web/ui/components/ChainName.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/basic.d.ts +1 -0
- package/dist/types/react/web/ui/components/basic.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/buttons.d.ts +2 -1
- package/dist/types/react/web/ui/components/buttons.d.ts.map +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletConnectUI.d.ts +16 -0
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts +16 -2
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts +16 -0
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletFormUI.d.ts +16 -2
- package/dist/types/react/web/wallets/in-app/InAppWalletFormUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletSelectionUI.d.ts +10 -0
- package/dist/types/react/web/wallets/in-app/InAppWalletSelectionUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/useInAppWalletLocale.d.ts +3 -2
- package/dist/types/react/web/wallets/in-app/useInAppWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/CoinbaseSDKConnection.d.ts +6 -1
- package/dist/types/react/web/wallets/shared/CoinbaseSDKConnection.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts +7 -2
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectingScreen.d.ts +3 -0
- package/dist/types/react/web/wallets/shared/ConnectingScreen.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/GetStartedScreen.d.ts +2 -0
- package/dist/types/react/web/wallets/shared/GetStartedScreen.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts +7 -2
- package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts +5 -0
- package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/SocialLogin.d.ts +7 -2
- package/dist/types/react/web/wallets/shared/SocialLogin.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/WalletConnectConnection.d.ts +16 -0
- package/dist/types/react/web/wallets/shared/WalletConnectConnection.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/en.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/es.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/getConnectLocale.d.ts +2 -2
- package/dist/types/react/web/wallets/shared/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/ja.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/tl.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/types.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/locale/types.d.ts.map +1 -1
- package/dist/types/transaction/actions/gasless/send-gasless-transaction.d.ts.map +1 -1
- package/dist/types/transaction/actions/send-transaction.d.ts.map +1 -1
- package/dist/types/transaction/actions/zksync/getEip721Domain.d.ts +3 -3
- package/dist/types/transaction/prepare-transaction.d.ts +3 -3
- package/dist/types/transaction/transaction-store.d.ts +22 -0
- package/dist/types/transaction/transaction-store.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/web/utils/Storage/LocalStorage.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/auth/verifySignature.ts +16 -1
- package/src/exports/extensions/erc1155.ts +4 -0
- package/src/exports/transaction.ts +1 -0
- package/src/extensions/airdrop/write/airdropERC1155WithSignature.test.ts +8 -9
- package/src/extensions/airdrop/write/airdropERC20WithSignature.test.ts +9 -10
- package/src/extensions/airdrop/write/airdropERC721WithSignature.test.ts +5 -5
- package/src/extensions/airdrop/write/claimERC1155.test.ts +6 -6
- package/src/extensions/airdrop/write/claimERC20.test.ts +7 -7
- package/src/extensions/airdrop/write/claimERC721.test.ts +6 -6
- package/src/react/core/design-system/index.ts +2 -0
- package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +35 -33
- package/src/react/web/ui/ConnectWallet/ConnectButtonProps.ts +2 -2
- package/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx +13 -6
- package/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx +58 -4
- package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +97 -38
- package/src/react/web/ui/ConnectWallet/Modal/ConnectModal.tsx +56 -4
- package/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx +98 -30
- package/src/react/web/ui/ConnectWallet/Modal/ConnectModalInline.tsx +100 -15
- package/src/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.tsx +3 -5
- package/src/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.tsx +10 -5
- package/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx +43 -10
- package/src/react/web/ui/ConnectWallet/Modal/TOS.tsx +3 -3
- package/src/react/web/ui/ConnectWallet/Modal/screen.tsx +10 -12
- package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +2 -1
- package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +14 -6
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +112 -33
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +411 -204
- package/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx +45 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +7 -3
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +12 -12
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts +14 -5
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts +6 -15
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts +3 -28
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +2 -3
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx +4 -6
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/utils.ts +3 -0
- package/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx +2 -3
- package/src/react/web/ui/ConnectWallet/screens/StartScreen.tsx +23 -14
- package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +5 -1
- package/src/react/web/ui/ConnectWallet/useConnectModal.tsx +44 -39
- package/src/react/web/ui/PayEmbed-disconnected.test.tsx +15 -0
- package/src/react/web/ui/PayEmbed.test.tsx +33 -6
- package/src/react/web/ui/PayEmbed.tsx +3 -0
- package/src/react/web/ui/components/ChainName.tsx +18 -1
- package/src/react/web/ui/components/basic.tsx +2 -1
- package/src/react/web/ui/components/buttons.tsx +8 -0
- package/src/react/web/wallets/ecosystem/EcosystemWalletConnectUI.tsx +33 -5
- package/src/react/web/wallets/ecosystem/EcosystemWalletFormUI.tsx +25 -12
- package/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx +34 -6
- package/src/react/web/wallets/in-app/InAppWalletFormUI.tsx +44 -23
- package/src/react/web/wallets/in-app/InAppWalletSelectionUI.tsx +20 -6
- package/src/react/web/wallets/in-app/useInAppWalletLocale.ts +10 -7
- package/src/react/web/wallets/shared/CoinbaseSDKConnection.tsx +12 -9
- package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +14 -11
- package/src/react/web/wallets/shared/ConnectingScreen.tsx +7 -5
- package/src/react/web/wallets/shared/GetStartedScreen.tsx +7 -4
- package/src/react/web/wallets/shared/OTPLoginUI.tsx +15 -12
- package/src/react/web/wallets/shared/PassKeyLogin.tsx +5 -4
- package/src/react/web/wallets/shared/SocialLogin.tsx +11 -8
- package/src/react/web/wallets/shared/WalletConnectConnection.tsx +48 -27
- package/src/react/web/wallets/shared/locale/en.ts +2 -2
- package/src/react/web/wallets/shared/locale/es.ts +2 -2
- package/src/react/web/wallets/shared/locale/getConnectLocale.ts +3 -3
- package/src/react/web/wallets/shared/locale/ja.ts +2 -2
- package/src/react/web/wallets/shared/locale/tl.ts +2 -2
- package/src/react/web/wallets/shared/locale/types.ts +1 -1
- package/src/react/web/wallets/walletConnect/locale.ts +3 -3
- package/src/rpc/actions/eth_getLogs.test.ts +3 -2
- package/src/transaction/actions/gasless/send-gasless-transaction.ts +15 -4
- package/src/transaction/actions/send-transaction.test.ts +22 -1
- package/src/transaction/actions/send-transaction.ts +7 -0
- package/src/transaction/actions/zksync/getEip721Domain.ts +4 -4
- package/src/transaction/prepare-transaction.ts +3 -3
- package/src/transaction/transaction-store.test.ts +51 -0
- package/src/transaction/transaction-store.ts +46 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/utils/Storage/LocalStorage.ts +4 -1
- package/src/wallets/wallet-connect/controller.ts +8 -3
- package/dist/cjs/react/core/hooks/others/useWalletConnectionCtx.js +0 -16
- package/dist/cjs/react/core/hooks/others/useWalletConnectionCtx.js.map +0 -1
- package/dist/cjs/react/core/providers/wallet-connection.js +0 -7
- package/dist/cjs/react/core/providers/wallet-connection.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/icons/CryptoIcon.js +0 -12
- package/dist/cjs/react/web/ui/ConnectWallet/icons/CryptoIcon.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.js +0 -44
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.js.map +0 -1
- package/dist/esm/react/core/hooks/others/useWalletConnectionCtx.js +0 -13
- package/dist/esm/react/core/hooks/others/useWalletConnectionCtx.js.map +0 -1
- package/dist/esm/react/core/providers/wallet-connection.js +0 -4
- package/dist/esm/react/core/providers/wallet-connection.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/icons/CryptoIcon.js +0 -8
- package/dist/esm/react/web/ui/ConnectWallet/icons/CryptoIcon.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.js +0 -41
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.js.map +0 -1
- package/dist/types/react/core/hooks/others/useWalletConnectionCtx.d.ts +0 -29
- package/dist/types/react/core/hooks/others/useWalletConnectionCtx.d.ts.map +0 -1
- package/dist/types/react/core/providers/wallet-connection.d.ts +0 -35
- package/dist/types/react/core/providers/wallet-connection.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/icons/CryptoIcon.d.ts +0 -6
- package/dist/types/react/web/ui/ConnectWallet/icons/CryptoIcon.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.d.ts +0 -8
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.d.ts.map +0 -1
- package/src/react/core/hooks/others/useWalletConnectionCtx.ts +0 -15
- package/src/react/core/providers/wallet-connection.tsx +0 -37
- package/src/react/web/ui/ConnectWallet/icons/CryptoIcon.tsx +0 -50
- package/src/react/web/ui/ConnectWallet/screens/Buy/PaymentSelection.tsx +0 -72
@@ -1,13 +1,16 @@
|
|
1
1
|
"use client";
|
2
|
+
import type { Chain } from "../../../../chains/types.js";
|
3
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
2
4
|
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
3
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
4
5
|
import { useSetSelectionData } from "../../providers/wallet-ui-states-provider.js";
|
5
6
|
import { useScreenContext } from "../../ui/ConnectWallet/Modal/screen.js";
|
6
7
|
import { WalletEntryButton } from "../../ui/ConnectWallet/WalletEntryButton.js";
|
7
8
|
import { reservedScreens } from "../../ui/ConnectWallet/constants.js";
|
9
|
+
import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
|
10
|
+
import type { LocaleId } from "../../ui/types.js";
|
8
11
|
import { ConnectWalletSocialOptions } from "../shared/ConnectWalletSocialOptions.js";
|
9
12
|
import { LoadingScreen } from "../shared/LoadingScreen.js";
|
10
|
-
import {
|
13
|
+
import { useInAppWalletLocale } from "./useInAppWalletLocale.js";
|
11
14
|
|
12
15
|
/**
|
13
16
|
*
|
@@ -18,18 +21,23 @@ function InAppWalletSelectionUI(props: {
|
|
18
21
|
wallet: Wallet<"inApp">;
|
19
22
|
done: () => void;
|
20
23
|
goBack?: () => void;
|
24
|
+
connectLocale: ConnectLocale;
|
25
|
+
client: ThirdwebClient;
|
26
|
+
recommendedWallets: Wallet[] | undefined;
|
27
|
+
chain: Chain | undefined;
|
28
|
+
localeId: LocaleId;
|
29
|
+
size: "compact" | "wide";
|
21
30
|
}) {
|
22
31
|
const { screen } = useScreenContext();
|
23
|
-
const { connectModal } = useConnectUI();
|
24
32
|
const setData = useSetSelectionData();
|
25
|
-
const locale =
|
33
|
+
const locale = useInAppWalletLocale(props.localeId);
|
26
34
|
|
27
35
|
// do not show the "selectUI" if
|
28
36
|
// modal is compact or
|
29
37
|
// it is being rendered in Safe wallet
|
30
38
|
if (
|
31
|
-
|
32
|
-
(screen !== reservedScreens.main &&
|
39
|
+
props.size === "wide" ||
|
40
|
+
(screen !== reservedScreens.main && props.size === "compact")
|
33
41
|
) {
|
34
42
|
return (
|
35
43
|
<WalletEntryButton
|
@@ -38,6 +46,9 @@ function InAppWalletSelectionUI(props: {
|
|
38
46
|
setData({});
|
39
47
|
props.select();
|
40
48
|
}}
|
49
|
+
client={props.client}
|
50
|
+
connectLocale={props.connectLocale}
|
51
|
+
recommendedWallets={props.recommendedWallets}
|
41
52
|
/>
|
42
53
|
);
|
43
54
|
}
|
@@ -53,6 +64,9 @@ function InAppWalletSelectionUI(props: {
|
|
53
64
|
done={props.done}
|
54
65
|
select={props.select}
|
55
66
|
goBack={props.goBack}
|
67
|
+
chain={props.chain}
|
68
|
+
client={props.client}
|
69
|
+
size={props.size}
|
56
70
|
/>
|
57
71
|
);
|
58
72
|
}
|
@@ -1,17 +1,20 @@
|
|
1
1
|
import { useEffect, useState } from "react";
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import type {
|
2
|
+
import type { LocaleId } from "../../ui/types.js";
|
3
|
+
import { getInAppWalletLocale } from "../shared/locale/getConnectLocale.js";
|
4
|
+
import type { InAppWalletLocale } from "../shared/locale/types.js";
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @internal
|
8
8
|
*/
|
9
|
-
export function
|
10
|
-
const
|
11
|
-
|
9
|
+
export function useInAppWalletLocale(localeId: LocaleId) {
|
10
|
+
const [locale, setLocale] = useState<InAppWalletLocale | undefined>(
|
11
|
+
undefined,
|
12
|
+
);
|
12
13
|
|
14
|
+
// TODO: move this to a useQuery hook
|
15
|
+
// or at the very least dedupe it?
|
13
16
|
useEffect(() => {
|
14
|
-
|
17
|
+
getInAppWalletLocale(localeId).then((l) => {
|
15
18
|
setLocale(l);
|
16
19
|
});
|
17
20
|
}, [localeId]);
|
@@ -1,11 +1,10 @@
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
2
|
+
import type { Chain } from "../../../../chains/types.js";
|
3
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
4
|
+
import type { COINBASE } from "../../../../wallets/constants.js";
|
1
5
|
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
2
6
|
import type { WalletInfo } from "../../../../wallets/wallet-info.js";
|
3
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
4
|
-
|
5
7
|
import type { InjectedWalletLocale } from "../injected/locale/types.js";
|
6
|
-
|
7
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
8
|
-
import type { COINBASE } from "../../../../wallets/constants.js";
|
9
8
|
import { ConnectingScreen } from "./ConnectingScreen.js";
|
10
9
|
|
11
10
|
/**
|
@@ -18,17 +17,19 @@ function CoinbaseSDKWalletConnectUI(props: {
|
|
18
17
|
locale: InjectedWalletLocale;
|
19
18
|
wallet: Wallet<typeof COINBASE>;
|
20
19
|
walletInfo: WalletInfo;
|
20
|
+
client: ThirdwebClient;
|
21
|
+
chain: Chain | undefined;
|
22
|
+
size: "compact" | "wide";
|
21
23
|
}) {
|
22
24
|
const { onBack, done, wallet, walletInfo, onGetStarted, locale } = props;
|
23
25
|
const [errorConnecting, setErrorConnecting] = useState(false);
|
24
|
-
const { client, chain } = useConnectUI();
|
25
26
|
|
26
27
|
const connect = useCallback(() => {
|
27
28
|
setErrorConnecting(false);
|
28
29
|
wallet
|
29
30
|
.connect({
|
30
|
-
client,
|
31
|
-
chain,
|
31
|
+
client: props.client,
|
32
|
+
chain: props.chain,
|
32
33
|
})
|
33
34
|
.then(() => {
|
34
35
|
done();
|
@@ -37,7 +38,7 @@ function CoinbaseSDKWalletConnectUI(props: {
|
|
37
38
|
console.error(e);
|
38
39
|
setErrorConnecting(true);
|
39
40
|
});
|
40
|
-
}, [client, wallet, chain, done]);
|
41
|
+
}, [props.client, wallet, props.chain, done]);
|
41
42
|
|
42
43
|
const scanStarted = useRef(false);
|
43
44
|
useEffect(() => {
|
@@ -63,6 +64,8 @@ function CoinbaseSDKWalletConnectUI(props: {
|
|
63
64
|
errorConnecting={errorConnecting}
|
64
65
|
onRetry={connect}
|
65
66
|
onGetStarted={onGetStarted}
|
67
|
+
client={props.client}
|
68
|
+
size={props.size}
|
66
69
|
/>
|
67
70
|
);
|
68
71
|
}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use client";
|
2
2
|
import styled from "@emotion/styled";
|
3
3
|
import { useState } from "react";
|
4
|
+
import type { Chain } from "../../../../chains/types.js";
|
5
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
4
6
|
import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
|
5
7
|
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
6
8
|
import type { Account, Wallet } from "../../../../wallets/interfaces/wallet.js";
|
@@ -15,7 +17,6 @@ import {
|
|
15
17
|
iconSize,
|
16
18
|
spacing,
|
17
19
|
} from "../../../core/design-system/index.js";
|
18
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
19
20
|
import { useSetSelectionData } from "../../providers/wallet-ui-states-provider.js";
|
20
21
|
import { WalletTypeRowButton } from "../../ui/ConnectWallet/WalletTypeRowButton.js";
|
21
22
|
import {
|
@@ -30,7 +31,7 @@ import { Button } from "../../ui/components/buttons.js";
|
|
30
31
|
import { InputSelectionUI } from "../in-app/InputSelectionUI.js";
|
31
32
|
import { socialIcons } from "../in-app/socialIcons.js";
|
32
33
|
import { validateEmail } from "../in-app/validateEmail.js";
|
33
|
-
import type {
|
34
|
+
import type { InAppWalletLocale } from "./locale/types.js";
|
34
35
|
import { openOauthSignInWindow } from "./openOauthSignInWindow.js";
|
35
36
|
import { setLastAuthProvider } from "./storage.js";
|
36
37
|
|
@@ -58,9 +59,12 @@ const defaultAuthOptions: AuthOption[] = [
|
|
58
59
|
export type ConnectWalletSocialOptionsProps = {
|
59
60
|
select: () => void;
|
60
61
|
done: () => void;
|
61
|
-
locale:
|
62
|
+
locale: InAppWalletLocale;
|
62
63
|
wallet: Wallet<EcosystemWalletId> | Wallet<"inApp">;
|
63
64
|
goBack?: () => void;
|
65
|
+
chain: Chain | undefined;
|
66
|
+
client: ThirdwebClient;
|
67
|
+
size: "compact" | "wide";
|
64
68
|
};
|
65
69
|
|
66
70
|
/**
|
@@ -70,7 +74,6 @@ export const ConnectWalletSocialOptions = (
|
|
70
74
|
props: ConnectWalletSocialOptionsProps,
|
71
75
|
) => {
|
72
76
|
const locale = props.locale;
|
73
|
-
const { chain, client, connectModal } = useConnectUI();
|
74
77
|
const { wallet } = props;
|
75
78
|
const setData = useSetSelectionData() as (
|
76
79
|
value: ConnectWalletSelectUIState,
|
@@ -131,8 +134,8 @@ export const ConnectWalletSocialOptions = (
|
|
131
134
|
throw new Error("Failed to open login window");
|
132
135
|
}
|
133
136
|
const connectOptions = {
|
134
|
-
chain,
|
135
|
-
client,
|
137
|
+
chain: props.chain,
|
138
|
+
client: props.client,
|
136
139
|
strategy,
|
137
140
|
openedWindow: socialLoginWindow,
|
138
141
|
closeOpenedWindow: (openedWindow: Window) => {
|
@@ -212,7 +215,7 @@ export const ConnectWalletSocialOptions = (
|
|
212
215
|
src={socialIcons[loginMethod]}
|
213
216
|
width={imgIconSize}
|
214
217
|
height={imgIconSize}
|
215
|
-
client={client}
|
218
|
+
client={props.client}
|
216
219
|
/>
|
217
220
|
{!showOnlyIcons && loginMethodsLabel[loginMethod]}
|
218
221
|
</SocialButton>
|
@@ -221,7 +224,7 @@ export const ConnectWalletSocialOptions = (
|
|
221
224
|
</Container>
|
222
225
|
)}
|
223
226
|
|
224
|
-
{
|
227
|
+
{props.size === "wide" &&
|
225
228
|
hasSocialLogins &&
|
226
229
|
(isEmailEnabled || isPhoneEnabled) && <TextDivider text={locale.or} />}
|
227
230
|
|
@@ -249,7 +252,7 @@ export const ConnectWalletSocialOptions = (
|
|
249
252
|
/>
|
250
253
|
) : (
|
251
254
|
<WalletTypeRowButton
|
252
|
-
client={client}
|
255
|
+
client={props.client}
|
253
256
|
icon={emailIcon}
|
254
257
|
onClick={() => {
|
255
258
|
setInputMode("email");
|
@@ -289,7 +292,7 @@ export const ConnectWalletSocialOptions = (
|
|
289
292
|
/>
|
290
293
|
) : (
|
291
294
|
<WalletTypeRowButton
|
292
|
-
client={client}
|
295
|
+
client={props.client}
|
293
296
|
icon={phoneIcon}
|
294
297
|
onClick={() => {
|
295
298
|
setInputMode("phone");
|
@@ -304,7 +307,7 @@ export const ConnectWalletSocialOptions = (
|
|
304
307
|
{passKeyEnabled && (
|
305
308
|
<>
|
306
309
|
<WalletTypeRowButton
|
307
|
-
client={client}
|
310
|
+
client={props.client}
|
308
311
|
icon={passkeyIcon}
|
309
312
|
onClick={() => {
|
310
313
|
handlePassKeyLogin();
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ReloadIcon } from "@radix-ui/react-icons";
|
2
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
2
3
|
import type { WalletId } from "../../../../wallets/wallet-types.js";
|
3
4
|
import { iconSize, spacing } from "../../../core/design-system/index.js";
|
4
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
5
5
|
import { WalletLogoSpinner } from "../../ui/ConnectWallet/screens/WalletLogoSpinner.js";
|
6
6
|
import { Spacer } from "../../ui/components/Spacer.js";
|
7
7
|
import { Container, Line, ModalHeader } from "../../ui/components/basic.js";
|
@@ -25,9 +25,11 @@ export const ConnectingScreen: React.FC<{
|
|
25
25
|
failed: string;
|
26
26
|
inProgress: string;
|
27
27
|
};
|
28
|
+
client: ThirdwebClient;
|
29
|
+
size: "compact" | "wide";
|
28
30
|
}> = (props) => {
|
29
31
|
const { locale } = props;
|
30
|
-
|
32
|
+
|
31
33
|
return (
|
32
34
|
<Container animate="fadein" fullHeight flex="column">
|
33
35
|
<Container
|
@@ -43,7 +45,7 @@ export const ConnectingScreen: React.FC<{
|
|
43
45
|
flex="column"
|
44
46
|
center="y"
|
45
47
|
expand
|
46
|
-
px={
|
48
|
+
px={props.size === "compact" ? "lg" : "xxl"}
|
47
49
|
relative
|
48
50
|
style={{
|
49
51
|
paddingTop: 0,
|
@@ -51,7 +53,7 @@ export const ConnectingScreen: React.FC<{
|
|
51
53
|
>
|
52
54
|
<Container py="3xl">
|
53
55
|
<WalletLogoSpinner
|
54
|
-
client={client}
|
56
|
+
client={props.client}
|
55
57
|
error={props.errorConnecting}
|
56
58
|
id={props.walletId}
|
57
59
|
/>
|
@@ -103,7 +105,7 @@ export const ConnectingScreen: React.FC<{
|
|
103
105
|
</Container>
|
104
106
|
</>
|
105
107
|
) : (
|
106
|
-
<Spacer y={
|
108
|
+
<Spacer y={props.size === "compact" ? "lg" : "xxl"} />
|
107
109
|
)}
|
108
110
|
</Container>
|
109
111
|
);
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { useState } from "react";
|
2
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
2
3
|
import { isMobile } from "../../../../utils/web/isMobile.js";
|
3
4
|
import { openWindow } from "../../../../utils/web/openWindow.js";
|
4
5
|
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
@@ -10,7 +11,6 @@ import {
|
|
10
11
|
radius,
|
11
12
|
spacing,
|
12
13
|
} from "../../../core/design-system/index.js";
|
13
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
14
14
|
import { AppleIcon } from "../../ui/ConnectWallet/icons/AppleIcon.js";
|
15
15
|
import { ChromeIcon } from "../../ui/ConnectWallet/icons/ChromeIcon.js";
|
16
16
|
import { PlayStoreIcon } from "../../ui/ConnectWallet/icons/PlayStoreIcon.js";
|
@@ -33,7 +33,8 @@ export const GetStartedScreen: React.FC<{
|
|
33
33
|
footer?: React.ReactNode;
|
34
34
|
showBack?: boolean;
|
35
35
|
locale: InjectedWalletLocale;
|
36
|
-
|
36
|
+
client: ThirdwebClient;
|
37
|
+
}> = ({ wallet, walletInfo, header, footer, onBack, locale, client }) => {
|
37
38
|
const [showScreen, setShowScreen] = useState<
|
38
39
|
"base" | "android-scan" | "ios-scan"
|
39
40
|
>("base");
|
@@ -65,6 +66,7 @@ export const GetStartedScreen: React.FC<{
|
|
65
66
|
locale={{
|
66
67
|
scanToDownload: locale.getStartedScreen.instruction,
|
67
68
|
}}
|
69
|
+
client={client}
|
68
70
|
/>
|
69
71
|
)}
|
70
72
|
|
@@ -79,6 +81,7 @@ export const GetStartedScreen: React.FC<{
|
|
79
81
|
locale={{
|
80
82
|
scanToDownload: locale.getStartedScreen.instruction,
|
81
83
|
}}
|
84
|
+
client={client}
|
82
85
|
/>
|
83
86
|
)}
|
84
87
|
|
@@ -168,8 +171,8 @@ const InstallScanScreen: React.FC<{
|
|
168
171
|
locale: {
|
169
172
|
scanToDownload: string;
|
170
173
|
};
|
174
|
+
client: ThirdwebClient;
|
171
175
|
}> = (props) => {
|
172
|
-
const { client } = useConnectUI();
|
173
176
|
return (
|
174
177
|
<Container animate="fadein" expand>
|
175
178
|
<ModalHeader title={props.walletName} onBack={props.onBack} />
|
@@ -189,7 +192,7 @@ const InstallScanScreen: React.FC<{
|
|
189
192
|
<WalletImage
|
190
193
|
id={props.walletId}
|
191
194
|
size={iconSize.xxl}
|
192
|
-
client={client}
|
195
|
+
client={props.client}
|
193
196
|
/>
|
194
197
|
}
|
195
198
|
/>
|
@@ -1,5 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
3
|
+
import type { Chain } from "../../../../chains/types.js";
|
4
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
3
5
|
import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
|
4
6
|
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
5
7
|
import type { SendEmailOtpReturnType } from "../../../../wallets/in-app/core/authentication/type.js";
|
@@ -8,7 +10,6 @@ import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
|
8
10
|
import type { EcosystemWalletId } from "../../../../wallets/wallet-types.js";
|
9
11
|
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
10
12
|
import { fontSize } from "../../../core/design-system/index.js";
|
11
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
12
13
|
import { FadeIn } from "../../ui/components/FadeIn.js";
|
13
14
|
import { OTPInput } from "../../ui/components/OTPInput.js";
|
14
15
|
import { Spacer } from "../../ui/components/Spacer.js";
|
@@ -17,7 +18,7 @@ import { Container, Line, ModalHeader } from "../../ui/components/basic.js";
|
|
17
18
|
import { Button } from "../../ui/components/buttons.js";
|
18
19
|
import { Text } from "../../ui/components/text.js";
|
19
20
|
import { StyledButton } from "../../ui/design-system/elements.js";
|
20
|
-
import type {
|
21
|
+
import type { InAppWalletLocale } from "./locale/types.js";
|
21
22
|
import { setLastAuthProvider } from "./storage.js";
|
22
23
|
|
23
24
|
type VerificationStatus =
|
@@ -35,13 +36,15 @@ type ScreenToShow = "base" | "enter-password-or-recovery-code";
|
|
35
36
|
export function OTPLoginUI(props: {
|
36
37
|
userInfo: { email: string } | { phone: string };
|
37
38
|
wallet: Wallet;
|
38
|
-
locale:
|
39
|
+
locale: InAppWalletLocale;
|
39
40
|
done: () => void;
|
40
41
|
goBack?: () => void;
|
42
|
+
client: ThirdwebClient;
|
43
|
+
chain: Chain | undefined;
|
44
|
+
size: "compact" | "wide";
|
41
45
|
}) {
|
42
46
|
const { wallet, done, goBack, userInfo } = props;
|
43
|
-
const
|
44
|
-
const isWideModal = connectModal.size === "wide";
|
47
|
+
const isWideModal = props.size === "wide";
|
45
48
|
const locale = props.locale;
|
46
49
|
const [otpInput, setOtpInput] = useState("");
|
47
50
|
const [verifyStatus, setVerifyStatus] = useState<VerificationStatus>("idle");
|
@@ -67,7 +70,7 @@ export function OTPLoginUI(props: {
|
|
67
70
|
: undefined,
|
68
71
|
email: userInfo.email,
|
69
72
|
strategy: "email",
|
70
|
-
client,
|
73
|
+
client: props.client,
|
71
74
|
});
|
72
75
|
setAccountStatus(status);
|
73
76
|
} else if ("phone" in userInfo) {
|
@@ -81,7 +84,7 @@ export function OTPLoginUI(props: {
|
|
81
84
|
: undefined,
|
82
85
|
phoneNumber: userInfo.phone,
|
83
86
|
strategy: "phone",
|
84
|
-
client,
|
87
|
+
client: props.client,
|
85
88
|
});
|
86
89
|
setAccountStatus(status);
|
87
90
|
} else {
|
@@ -92,25 +95,25 @@ export function OTPLoginUI(props: {
|
|
92
95
|
setVerifyStatus("idle");
|
93
96
|
setAccountStatus("error");
|
94
97
|
}
|
95
|
-
}, [client, userInfo, wallet, isEcosystem]);
|
98
|
+
}, [props.client, userInfo, wallet, isEcosystem]);
|
96
99
|
|
97
100
|
async function connect(otp: string) {
|
98
101
|
if ("email" in userInfo) {
|
99
102
|
await wallet.connect({
|
100
|
-
chain,
|
103
|
+
chain: props.chain,
|
101
104
|
strategy: "email",
|
102
105
|
email: userInfo.email,
|
103
106
|
verificationCode: otp,
|
104
|
-
client,
|
107
|
+
client: props.client,
|
105
108
|
});
|
106
109
|
await setLastAuthProvider("email", webLocalStorage);
|
107
110
|
} else if ("phone" in userInfo) {
|
108
111
|
await wallet.connect({
|
109
|
-
chain,
|
112
|
+
chain: props.chain,
|
110
113
|
strategy: "phone",
|
111
114
|
phoneNumber: userInfo.phone,
|
112
115
|
verificationCode: otp,
|
113
|
-
client,
|
116
|
+
client: props.client,
|
114
117
|
});
|
115
118
|
await setLastAuthProvider("phone", webLocalStorage);
|
116
119
|
} else {
|
@@ -6,7 +6,6 @@ import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
|
|
6
6
|
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
7
7
|
import { hasStoredPasskey } from "../../../../wallets/in-app/web/lib/auth/passkeys.js";
|
8
8
|
import { iconSize } from "../../../core/design-system/index.js";
|
9
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
10
9
|
import { AccentFailIcon } from "../../ui/ConnectWallet/icons/AccentFailIcon.js";
|
11
10
|
import { FingerPrintIcon } from "../../ui/ConnectWallet/icons/FingerPrintIcon.js";
|
12
11
|
import { Spacer } from "../../ui/components/Spacer.js";
|
@@ -26,9 +25,11 @@ export function PassKeyLogin(props: {
|
|
26
25
|
wallet: Wallet;
|
27
26
|
done: () => void;
|
28
27
|
onBack?: () => void;
|
28
|
+
client: ThirdwebClient;
|
29
|
+
chain: Chain | undefined;
|
30
|
+
size: "compact" | "wide";
|
29
31
|
}) {
|
30
|
-
const {
|
31
|
-
const { wallet, done } = props;
|
32
|
+
const { wallet, done, client, chain, size } = props;
|
32
33
|
const [screen, setScreen] = useState<
|
33
34
|
"select" | "login" | "loading" | "signup"
|
34
35
|
>("loading");
|
@@ -63,7 +64,7 @@ export function PassKeyLogin(props: {
|
|
63
64
|
</Container>
|
64
65
|
|
65
66
|
<Container
|
66
|
-
px={
|
67
|
+
px={size === "wide" ? "xxl" : "lg"}
|
67
68
|
expand
|
68
69
|
flex="column"
|
69
70
|
center="y"
|
@@ -1,17 +1,18 @@
|
|
1
1
|
"use client";
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
3
|
+
import type { Chain } from "../../../../chains/types.js";
|
4
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
3
5
|
import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
|
4
6
|
import type { InAppWalletSocialAuth } from "../../../../wallets/in-app/core/wallet/types.js";
|
5
7
|
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
6
8
|
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
7
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
8
9
|
import { Spacer } from "../../ui/components/Spacer.js";
|
9
10
|
import { Spinner } from "../../ui/components/Spinner.js";
|
10
11
|
import { Container, ModalHeader } from "../../ui/components/basic.js";
|
11
12
|
import { Button } from "../../ui/components/buttons.js";
|
12
13
|
import { Text } from "../../ui/components/text.js";
|
13
14
|
import type { ConnectWalletSelectUIState } from "./ConnectWalletSocialOptions.js";
|
14
|
-
import type {
|
15
|
+
import type { InAppWalletLocale } from "./locale/types.js";
|
15
16
|
import { openOauthSignInWindow } from "./openOauthSignInWindow.js";
|
16
17
|
import { setLastAuthProvider } from "./storage.js";
|
17
18
|
|
@@ -20,22 +21,24 @@ import { setLastAuthProvider } from "./storage.js";
|
|
20
21
|
*/
|
21
22
|
export function SocialLogin(props: {
|
22
23
|
socialAuth: InAppWalletSocialAuth;
|
23
|
-
locale:
|
24
|
+
locale: InAppWalletLocale;
|
24
25
|
wallet: Wallet;
|
25
26
|
done: () => void;
|
26
27
|
goBack?: () => void;
|
27
28
|
state: ConnectWalletSelectUIState;
|
29
|
+
size: "compact" | "wide";
|
30
|
+
client: ThirdwebClient;
|
31
|
+
chain: Chain | undefined;
|
28
32
|
}) {
|
29
33
|
const ewLocale = props.locale;
|
30
34
|
const locale = ewLocale.socialLoginScreen;
|
31
35
|
const themeObj = useCustomTheme();
|
32
|
-
|
36
|
+
|
33
37
|
const [authError, setAuthError] = useState<string | undefined>(undefined);
|
34
38
|
const { done, wallet } = props;
|
35
39
|
const [status, setStatus] = useState<"connecting" | "connected" | "error">(
|
36
40
|
"connecting",
|
37
41
|
);
|
38
|
-
const { client, chain } = useConnectUI();
|
39
42
|
|
40
43
|
const handleSocialLogin = async () => {
|
41
44
|
try {
|
@@ -47,13 +50,13 @@ export function SocialLogin(props: {
|
|
47
50
|
|
48
51
|
setStatus("connecting");
|
49
52
|
await wallet.connect({
|
50
|
-
chain,
|
53
|
+
chain: props.chain,
|
51
54
|
strategy: props.socialAuth,
|
52
55
|
openedWindow: socialWindow,
|
53
56
|
closeOpenedWindow: (openedWindow) => {
|
54
57
|
openedWindow.close();
|
55
58
|
},
|
56
|
-
client,
|
59
|
+
client: props.client,
|
57
60
|
});
|
58
61
|
await setLastAuthProvider(props.socialAuth, webLocalStorage);
|
59
62
|
setStatus("connected");
|
@@ -109,7 +112,7 @@ export function SocialLogin(props: {
|
|
109
112
|
<ModalHeader title={locale.title} onBack={props.goBack} />
|
110
113
|
)}
|
111
114
|
|
112
|
-
{
|
115
|
+
{props.size === "compact" ? <Spacer y="xl" /> : null}
|
113
116
|
|
114
117
|
<Container
|
115
118
|
flex="column"
|