thirdweb 5.30.0-nightly-e7434891354f351d2a399daebdddae9cf1fc817b-20240623000619 → 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
@@ -6,7 +6,6 @@ import type { SmartWalletOptions } from "../../../../wallets/smart/types.js";
|
|
6
6
|
import type { AppMetadata } from "../../../../wallets/types.js";
|
7
7
|
import type { Theme } from "../../../core/design-system/index.js";
|
8
8
|
import { SetRootElementContext } from "../../../core/providers/RootElementContext.js";
|
9
|
-
import { ConnectUIContext } from "../../../core/providers/wallet-connection.js";
|
10
9
|
import { WalletUIStatesProvider } from "../../providers/wallet-ui-states-provider.js";
|
11
10
|
import { canFitWideModal } from "../../utils/canFitWideModal.js";
|
12
11
|
import { getDefaultWallets } from "../../wallets/defaultWallets.js";
|
@@ -103,45 +102,51 @@ function Modal(
|
|
103
102
|
[props.wallets, props.appMetadata, props.chains],
|
104
103
|
);
|
105
104
|
|
105
|
+
const size = useMemo(() => {
|
106
|
+
return !canFitWideModal() || wallets.length === 1
|
107
|
+
? "compact"
|
108
|
+
: props.size || "wide";
|
109
|
+
}, [props.size, wallets.length]);
|
110
|
+
const meta = useMemo(() => {
|
111
|
+
return {
|
112
|
+
privacyPolicyUrl: props.privacyPolicyUrl,
|
113
|
+
showThirdwebBranding: props.showThirdwebBranding,
|
114
|
+
termsOfServiceUrl: props.termsOfServiceUrl,
|
115
|
+
title: props.title,
|
116
|
+
titleIconUrl: props.titleIcon,
|
117
|
+
};
|
118
|
+
}, [
|
119
|
+
props.privacyPolicyUrl,
|
120
|
+
props.showThirdwebBranding,
|
121
|
+
props.termsOfServiceUrl,
|
122
|
+
props.title,
|
123
|
+
props.titleIcon,
|
124
|
+
]);
|
125
|
+
|
106
126
|
return (
|
107
|
-
<
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
chain
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
isEmbed
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
? "compact"
|
131
|
-
: props?.size || "wide",
|
132
|
-
},
|
133
|
-
onConnect: props.onConnect,
|
134
|
-
}}
|
135
|
-
>
|
136
|
-
<WalletUIStatesProvider theme={props.theme} isOpen={true}>
|
137
|
-
<ConnectModal
|
138
|
-
onClose={props.onClose}
|
139
|
-
shouldSetActive={
|
140
|
-
props.setActive === undefined ? true : props.setActive
|
141
|
-
}
|
142
|
-
/>
|
143
|
-
</WalletUIStatesProvider>
|
144
|
-
</ConnectUIContext.Provider>
|
127
|
+
<WalletUIStatesProvider theme={props.theme} isOpen={true}>
|
128
|
+
<ConnectModal
|
129
|
+
onClose={props.onClose}
|
130
|
+
shouldSetActive={props.setActive === undefined ? true : props.setActive}
|
131
|
+
accountAbstraction={props.accountAbstraction}
|
132
|
+
// TODO: not set up in `useConnectModal` for some reason?
|
133
|
+
auth={undefined}
|
134
|
+
chain={props.chain}
|
135
|
+
client={props.client}
|
136
|
+
connectLocale={props.connectLocale}
|
137
|
+
meta={meta}
|
138
|
+
size={size}
|
139
|
+
welcomeScreen={props.welcomeScreen}
|
140
|
+
isEmbed={false}
|
141
|
+
localeId={props.locale || "en_US"}
|
142
|
+
onConnect={props.onConnect}
|
143
|
+
recommendedWallets={props.recommendedWallets}
|
144
|
+
showAllWallets={props.showAllWallets}
|
145
|
+
wallets={wallets}
|
146
|
+
chains={props.chains}
|
147
|
+
walletConnect={props.walletConnect}
|
148
|
+
/>
|
149
|
+
</WalletUIStatesProvider>
|
145
150
|
);
|
146
151
|
}
|
147
152
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
2
|
+
import { render } from "../../../../test/src/react-render.js";
|
3
|
+
import { TEST_CLIENT } from "../../../../test/src/test-clients.js";
|
4
|
+
import { PayEmbed } from "./PayEmbed.js";
|
5
|
+
|
6
|
+
describe.runIf(process.env.TW_SECRET_KEY)(
|
7
|
+
"PayEmbed: Disconnected state",
|
8
|
+
() => {
|
9
|
+
it("renders a connect wallet button when a wallet is not connected", async () => {
|
10
|
+
const { findByText } = render(<PayEmbed client={TEST_CLIENT} />);
|
11
|
+
const connectWalletButton = await findByText("Connect Wallet");
|
12
|
+
expect(connectWalletButton).toBeInTheDocument();
|
13
|
+
});
|
14
|
+
},
|
15
|
+
);
|
@@ -1,10 +1,37 @@
|
|
1
|
-
import {
|
1
|
+
import { userEvent } from "@testing-library/user-event";
|
2
|
+
import { describe, expect, it } from "vitest";
|
2
3
|
import { render } from "../../../../test/src/react-render.js";
|
3
4
|
import { TEST_CLIENT } from "../../../../test/src/test-clients.js";
|
4
5
|
import { PayEmbed } from "./PayEmbed.js";
|
5
6
|
|
6
|
-
describe(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
describe.runIf(process.env.TW_SECRET_KEY)(
|
8
|
+
"PayEmbed - Connected state",
|
9
|
+
async () => {
|
10
|
+
const { findByRole } = render(<PayEmbed client={TEST_CLIENT} />, {
|
11
|
+
setConnectedWallet: true,
|
12
|
+
});
|
13
|
+
|
14
|
+
// continue button is shown
|
15
|
+
const connectWalletButton = await findByRole("button", {
|
16
|
+
name: "Continue",
|
17
|
+
});
|
18
|
+
|
19
|
+
it("continue button is disabled if no token amount is set", async () => {
|
20
|
+
// continue button is disabled when no amount is entered
|
21
|
+
expect(connectWalletButton).toBeDisabled();
|
22
|
+
|
23
|
+
// user enters an amount
|
24
|
+
const tokenInput = await findByRole("textbox");
|
25
|
+
await userEvent.type(tokenInput, "1");
|
26
|
+
|
27
|
+
// continue button is enabled
|
28
|
+
expect(connectWalletButton).not.toBeDisabled();
|
29
|
+
|
30
|
+
// user clears the amount
|
31
|
+
await userEvent.clear(tokenInput);
|
32
|
+
|
33
|
+
// continue button is disabled again
|
34
|
+
expect(connectWalletButton).toBeDisabled();
|
35
|
+
});
|
36
|
+
},
|
37
|
+
);
|
@@ -124,6 +124,8 @@ export type PayEmbedProps = {
|
|
124
124
|
* Refer to the [`PayEmbedConnectOptions`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details.
|
125
125
|
*/
|
126
126
|
connectOptions?: PayEmbedConnectOptions;
|
127
|
+
|
128
|
+
style?: React.CSSProperties;
|
127
129
|
};
|
128
130
|
|
129
131
|
/**
|
@@ -229,6 +231,7 @@ export function PayEmbed(props: PayEmbedProps) {
|
|
229
231
|
borderStyle: "solid",
|
230
232
|
position: "relative",
|
231
233
|
overflow: "hidden",
|
234
|
+
...props.style,
|
232
235
|
}}
|
233
236
|
borderColor="borderColor"
|
234
237
|
>
|
@@ -12,12 +12,29 @@ export const ChainName: React.FC<{
|
|
12
12
|
chain: Chain;
|
13
13
|
size: "xs" | "sm" | "md" | "lg";
|
14
14
|
client: ThirdwebClient;
|
15
|
+
short?: boolean;
|
15
16
|
}> = (props) => {
|
16
17
|
const chainQuery = useChainQuery(props.chain);
|
17
18
|
|
18
19
|
if (chainQuery.data) {
|
19
|
-
return
|
20
|
+
return (
|
21
|
+
<Text size={props.size}>
|
22
|
+
{props.short
|
23
|
+
? shorterChainName(chainQuery.data.name)
|
24
|
+
: chainQuery.data.name}
|
25
|
+
</Text>
|
26
|
+
);
|
20
27
|
}
|
21
28
|
|
22
29
|
return <Skeleton width={"50px"} height={fontSize[props.size]} />;
|
23
30
|
};
|
31
|
+
|
32
|
+
function shorterChainName(name: string) {
|
33
|
+
const split = name.split(" ");
|
34
|
+
const wordsToRemove = new Set(["mainnet", "testnet", "chain"]);
|
35
|
+
return split
|
36
|
+
.filter((s) => {
|
37
|
+
return !wordsToRemove.has(s.toLowerCase());
|
38
|
+
})
|
39
|
+
.join(" ");
|
40
|
+
}
|
@@ -35,6 +35,7 @@ export const noScrollBar = /* @__PURE__ */ {
|
|
35
35
|
export function ModalHeader(props: {
|
36
36
|
onBack?: () => void;
|
37
37
|
title: React.ReactNode;
|
38
|
+
leftAligned?: boolean;
|
38
39
|
}) {
|
39
40
|
const { onBack, title } = props;
|
40
41
|
return (
|
@@ -42,7 +43,7 @@ export function ModalHeader(props: {
|
|
42
43
|
style={{
|
43
44
|
display: "flex",
|
44
45
|
alignItems: "center",
|
45
|
-
justifyContent:
|
46
|
+
justifyContent: props.leftAligned ? "flex-start" : "center",
|
46
47
|
position: "relative",
|
47
48
|
}}
|
48
49
|
>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
3
3
|
import {
|
4
|
+
type Theme,
|
4
5
|
fontSize,
|
5
6
|
radius,
|
6
7
|
spacing,
|
@@ -12,6 +13,7 @@ export type ButtonProps = {
|
|
12
13
|
unstyled?: boolean;
|
13
14
|
fullWidth?: boolean;
|
14
15
|
gap?: keyof typeof spacing;
|
16
|
+
bg?: keyof Theme["colors"];
|
15
17
|
};
|
16
18
|
|
17
19
|
export const Button = /* @__PURE__ */ StyledButton((props: ButtonProps) => {
|
@@ -39,6 +41,9 @@ export const Button = /* @__PURE__ */ StyledButton((props: ButtonProps) => {
|
|
39
41
|
textAlign: "center",
|
40
42
|
maxWidth: "100%",
|
41
43
|
background: (() => {
|
44
|
+
if (props.bg) {
|
45
|
+
return theme.colors[props.bg];
|
46
|
+
}
|
42
47
|
switch (props.variant) {
|
43
48
|
case "primary":
|
44
49
|
return theme.colors.primaryButtonBg;
|
@@ -88,6 +93,9 @@ export const Button = /* @__PURE__ */ StyledButton((props: ButtonProps) => {
|
|
88
93
|
"&:hover": {
|
89
94
|
borderColor: theme.colors.accentText,
|
90
95
|
},
|
96
|
+
'&[aria-selected="true"]': {
|
97
|
+
borderColor: theme.colors.accentText,
|
98
|
+
},
|
91
99
|
};
|
92
100
|
}
|
93
101
|
|
@@ -1,12 +1,15 @@
|
|
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
5
|
import type { EcosystemWalletId } from "../../../../wallets/wallet-types.js";
|
4
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
5
6
|
import {
|
6
7
|
useSelectionData,
|
7
8
|
useSetSelectionData,
|
8
9
|
} from "../../providers/wallet-ui-states-provider.js";
|
9
|
-
import {
|
10
|
+
import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
|
11
|
+
import type { LocaleId } from "../../ui/types.js";
|
12
|
+
import { useInAppWalletLocale } from "../in-app/useInAppWalletLocale.js";
|
10
13
|
import type { ConnectWalletSelectUIState } from "../shared/ConnectWalletSocialOptions.js";
|
11
14
|
import { LoadingScreen } from "../shared/LoadingScreen.js";
|
12
15
|
import { OTPLoginUI } from "../shared/OTPLoginUI.js";
|
@@ -22,19 +25,30 @@ function EcosystemWalletConnectUI(props: {
|
|
22
25
|
wallet: Wallet<EcosystemWalletId>;
|
23
26
|
done: () => void;
|
24
27
|
goBack?: () => void;
|
28
|
+
client: ThirdwebClient;
|
29
|
+
chain: Chain | undefined;
|
30
|
+
localeId: LocaleId;
|
31
|
+
connectLocale: ConnectLocale;
|
32
|
+
size: "compact" | "wide";
|
33
|
+
meta: {
|
34
|
+
title?: string;
|
35
|
+
titleIconUrl?: string;
|
36
|
+
showThirdwebBranding?: boolean;
|
37
|
+
termsOfServiceUrl?: string;
|
38
|
+
privacyPolicyUrl?: string;
|
39
|
+
};
|
25
40
|
}) {
|
26
41
|
const data = useSelectionData();
|
27
42
|
const setSelectionData = useSetSelectionData();
|
28
43
|
const state = data as ConnectWalletSelectUIState;
|
29
|
-
const locale =
|
30
|
-
const { connectModal } = useConnectUI();
|
44
|
+
const locale = useInAppWalletLocale(props.localeId);
|
31
45
|
|
32
46
|
if (!locale) {
|
33
47
|
return <LoadingScreen />;
|
34
48
|
}
|
35
49
|
|
36
50
|
const goBackToMain =
|
37
|
-
|
51
|
+
props.size === "compact"
|
38
52
|
? props.goBack
|
39
53
|
: () => {
|
40
54
|
setSelectionData({});
|
@@ -54,6 +68,9 @@ function EcosystemWalletConnectUI(props: {
|
|
54
68
|
done={props.done}
|
55
69
|
goBack={goBackToMain}
|
56
70
|
wallet={props.wallet}
|
71
|
+
chain={props.chain}
|
72
|
+
client={props.client}
|
73
|
+
size={props.size}
|
57
74
|
/>
|
58
75
|
);
|
59
76
|
}
|
@@ -64,6 +81,9 @@ function EcosystemWalletConnectUI(props: {
|
|
64
81
|
wallet={props.wallet}
|
65
82
|
done={props.done}
|
66
83
|
onBack={goBackToMain}
|
84
|
+
chain={props.chain}
|
85
|
+
client={props.client}
|
86
|
+
size={props.size}
|
67
87
|
/>
|
68
88
|
);
|
69
89
|
}
|
@@ -77,6 +97,9 @@ function EcosystemWalletConnectUI(props: {
|
|
77
97
|
goBack={goBackToMain}
|
78
98
|
wallet={props.wallet}
|
79
99
|
state={state}
|
100
|
+
chain={props.chain}
|
101
|
+
client={props.client}
|
102
|
+
size={props.size}
|
80
103
|
/>
|
81
104
|
);
|
82
105
|
}
|
@@ -88,6 +111,11 @@ function EcosystemWalletConnectUI(props: {
|
|
88
111
|
done={props.done}
|
89
112
|
goBack={props.goBack}
|
90
113
|
wallet={props.wallet}
|
114
|
+
chain={props.chain}
|
115
|
+
client={props.client}
|
116
|
+
size={props.size}
|
117
|
+
connectLocale={props.connectLocale}
|
118
|
+
meta={props.meta}
|
91
119
|
/>
|
92
120
|
);
|
93
121
|
}
|
@@ -1,30 +1,42 @@
|
|
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
5
|
import type { EcosystemWalletId } from "../../../../wallets/wallet-types.js";
|
4
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
5
6
|
import { TOS } from "../../ui/ConnectWallet/Modal/TOS.js";
|
6
7
|
import { useScreenContext } from "../../ui/ConnectWallet/Modal/screen.js";
|
7
8
|
import { PoweredByThirdweb } from "../../ui/ConnectWallet/PoweredByTW.js";
|
9
|
+
import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
|
8
10
|
import { Spacer } from "../../ui/components/Spacer.js";
|
9
11
|
import { Container } from "../../ui/components/basic.js";
|
10
12
|
import { ConnectWalletSocialOptions } from "../shared/ConnectWalletSocialOptions.js";
|
11
|
-
import type {
|
13
|
+
import type { InAppWalletLocale } from "../shared/locale/types.js";
|
12
14
|
import { EcosystemWalletHeader } from "./EcosystemWalletHeader.js";
|
13
15
|
|
14
16
|
export type EcosystemWalletFormUIProps = {
|
15
17
|
select: () => void;
|
16
18
|
done: () => void;
|
17
|
-
locale:
|
19
|
+
locale: InAppWalletLocale;
|
18
20
|
wallet: Wallet<EcosystemWalletId>;
|
19
21
|
goBack?: () => void;
|
22
|
+
size: "compact" | "wide";
|
23
|
+
meta: {
|
24
|
+
title?: string;
|
25
|
+
titleIconUrl?: string;
|
26
|
+
showThirdwebBranding?: boolean;
|
27
|
+
termsOfServiceUrl?: string;
|
28
|
+
privacyPolicyUrl?: string;
|
29
|
+
};
|
30
|
+
client: ThirdwebClient;
|
31
|
+
chain: Chain | undefined;
|
32
|
+
connectLocale: ConnectLocale;
|
20
33
|
};
|
21
34
|
|
22
35
|
/**
|
23
36
|
* @internal
|
24
37
|
*/
|
25
38
|
export function EcosystemWalletFormUIScreen(props: EcosystemWalletFormUIProps) {
|
26
|
-
const
|
27
|
-
const isCompact = connectModal.size === "compact";
|
39
|
+
const isCompact = props.size === "compact";
|
28
40
|
const { initialScreen, screen } = useScreenContext();
|
29
41
|
|
30
42
|
const onBack =
|
@@ -45,7 +57,7 @@ export function EcosystemWalletFormUIScreen(props: EcosystemWalletFormUIProps) {
|
|
45
57
|
{isCompact ? (
|
46
58
|
<>
|
47
59
|
<EcosystemWalletHeader
|
48
|
-
client={client}
|
60
|
+
client={props.client}
|
49
61
|
onBack={onBack}
|
50
62
|
wallet={props.wallet}
|
51
63
|
/>
|
@@ -63,17 +75,18 @@ export function EcosystemWalletFormUIScreen(props: EcosystemWalletFormUIProps) {
|
|
63
75
|
</Container>
|
64
76
|
|
65
77
|
{isCompact &&
|
66
|
-
(
|
67
|
-
|
68
|
-
|
78
|
+
(props.meta.showThirdwebBranding !== false ||
|
79
|
+
props.meta.termsOfServiceUrl ||
|
80
|
+
props.meta.privacyPolicyUrl) && <Spacer y="xl" />}
|
69
81
|
|
70
82
|
<Container flex="column" gap="lg">
|
71
83
|
<TOS
|
72
|
-
termsOfServiceUrl={
|
73
|
-
privacyPolicyUrl={
|
84
|
+
termsOfServiceUrl={props.meta.termsOfServiceUrl}
|
85
|
+
privacyPolicyUrl={props.meta.privacyPolicyUrl}
|
86
|
+
locale={props.connectLocale.agreement}
|
74
87
|
/>
|
75
88
|
|
76
|
-
{
|
89
|
+
{props.meta.showThirdwebBranding !== false && <PoweredByThirdweb />}
|
77
90
|
</Container>
|
78
91
|
</Container>
|
79
92
|
);
|
@@ -1,17 +1,20 @@
|
|
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 {
|
5
6
|
useSelectionData,
|
6
7
|
useSetSelectionData,
|
7
8
|
} from "../../providers/wallet-ui-states-provider.js";
|
9
|
+
import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
|
10
|
+
import type { LocaleId } from "../../ui/types.js";
|
8
11
|
import type { ConnectWalletSelectUIState } from "../shared/ConnectWalletSocialOptions.js";
|
9
12
|
import { LoadingScreen } from "../shared/LoadingScreen.js";
|
10
13
|
import { OTPLoginUI } from "../shared/OTPLoginUI.js";
|
11
14
|
import { PassKeyLogin } from "../shared/PassKeyLogin.js";
|
12
15
|
import { SocialLogin } from "../shared/SocialLogin.js";
|
13
16
|
import { InAppWalletFormUIScreen } from "./InAppWalletFormUI.js";
|
14
|
-
import {
|
17
|
+
import { useInAppWalletLocale } from "./useInAppWalletLocale.js";
|
15
18
|
|
16
19
|
/**
|
17
20
|
*
|
@@ -21,19 +24,30 @@ function InAppWalletConnectUI(props: {
|
|
21
24
|
wallet: Wallet<"inApp">;
|
22
25
|
done: () => void;
|
23
26
|
goBack?: () => void;
|
27
|
+
size: "compact" | "wide";
|
28
|
+
meta: {
|
29
|
+
title?: string;
|
30
|
+
titleIconUrl?: string;
|
31
|
+
showThirdwebBranding?: boolean;
|
32
|
+
termsOfServiceUrl?: string;
|
33
|
+
privacyPolicyUrl?: string;
|
34
|
+
};
|
35
|
+
client: ThirdwebClient;
|
36
|
+
chain: Chain | undefined;
|
37
|
+
localeId: LocaleId;
|
38
|
+
connectLocale: ConnectLocale;
|
24
39
|
}) {
|
25
40
|
const data = useSelectionData();
|
26
41
|
const setSelectionData = useSetSelectionData();
|
27
42
|
const state = data as ConnectWalletSelectUIState;
|
28
|
-
const locale =
|
29
|
-
const { connectModal } = useConnectUI();
|
43
|
+
const locale = useInAppWalletLocale(props.localeId);
|
30
44
|
|
31
45
|
if (!locale) {
|
32
46
|
return <LoadingScreen />;
|
33
47
|
}
|
34
48
|
|
35
49
|
const goBackToMain =
|
36
|
-
|
50
|
+
props.size === "compact"
|
37
51
|
? props.goBack
|
38
52
|
: () => {
|
39
53
|
setSelectionData({});
|
@@ -53,6 +67,9 @@ function InAppWalletConnectUI(props: {
|
|
53
67
|
done={props.done}
|
54
68
|
goBack={goBackToMain}
|
55
69
|
wallet={props.wallet}
|
70
|
+
chain={props.chain}
|
71
|
+
client={props.client}
|
72
|
+
size={props.size}
|
56
73
|
/>
|
57
74
|
);
|
58
75
|
}
|
@@ -63,6 +80,9 @@ function InAppWalletConnectUI(props: {
|
|
63
80
|
wallet={props.wallet}
|
64
81
|
done={props.done}
|
65
82
|
onBack={goBackToMain}
|
83
|
+
chain={props.chain}
|
84
|
+
client={props.client}
|
85
|
+
size={props.size}
|
66
86
|
/>
|
67
87
|
);
|
68
88
|
}
|
@@ -76,6 +96,9 @@ function InAppWalletConnectUI(props: {
|
|
76
96
|
goBack={goBackToMain}
|
77
97
|
wallet={props.wallet}
|
78
98
|
state={state}
|
99
|
+
chain={props.chain}
|
100
|
+
client={props.client}
|
101
|
+
size={props.size}
|
79
102
|
/>
|
80
103
|
);
|
81
104
|
}
|
@@ -83,10 +106,15 @@ function InAppWalletConnectUI(props: {
|
|
83
106
|
return (
|
84
107
|
<InAppWalletFormUIScreen
|
85
108
|
select={() => {}}
|
86
|
-
|
109
|
+
connectLocale={props.connectLocale}
|
110
|
+
inAppWalletLocale={locale}
|
87
111
|
done={props.done}
|
88
112
|
goBack={props.goBack}
|
89
113
|
wallet={props.wallet}
|
114
|
+
client={props.client}
|
115
|
+
meta={props.meta}
|
116
|
+
size={props.size}
|
117
|
+
chain={props.chain}
|
90
118
|
/>
|
91
119
|
);
|
92
120
|
}
|
@@ -1,38 +1,49 @@
|
|
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
5
|
import { iconSize } from "../../../core/design-system/index.js";
|
4
|
-
import { useConnectUI } from "../../../core/hooks/others/useWalletConnectionCtx.js";
|
5
6
|
import { TOS } from "../../ui/ConnectWallet/Modal/TOS.js";
|
6
7
|
import { useScreenContext } from "../../ui/ConnectWallet/Modal/screen.js";
|
7
8
|
import { PoweredByThirdweb } from "../../ui/ConnectWallet/PoweredByTW.js";
|
9
|
+
import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
|
8
10
|
import { Img } from "../../ui/components/Img.js";
|
9
11
|
import { Spacer } from "../../ui/components/Spacer.js";
|
10
12
|
import { Container, ModalHeader } from "../../ui/components/basic.js";
|
11
13
|
import { ModalTitle } from "../../ui/components/modalElements.js";
|
12
14
|
import { ConnectWalletSocialOptions } from "../shared/ConnectWalletSocialOptions.js";
|
13
|
-
import type {
|
15
|
+
import type { InAppWalletLocale } from "../shared/locale/types.js";
|
14
16
|
|
15
17
|
export type InAppWalletFormUIProps = {
|
16
18
|
select: () => void;
|
17
|
-
|
19
|
+
inAppWalletLocale: InAppWalletLocale;
|
20
|
+
connectLocale: ConnectLocale;
|
18
21
|
done: () => void;
|
19
22
|
wallet: Wallet<"inApp">;
|
20
23
|
goBack?: () => void;
|
24
|
+
size: "compact" | "wide";
|
25
|
+
meta: {
|
26
|
+
title?: string;
|
27
|
+
titleIconUrl?: string;
|
28
|
+
showThirdwebBranding?: boolean;
|
29
|
+
termsOfServiceUrl?: string;
|
30
|
+
privacyPolicyUrl?: string;
|
31
|
+
};
|
32
|
+
client: ThirdwebClient;
|
33
|
+
chain: Chain | undefined;
|
21
34
|
};
|
22
35
|
|
23
36
|
/**
|
24
37
|
* @internal
|
25
38
|
*/
|
26
39
|
export function InAppWalletFormUIScreen(props: InAppWalletFormUIProps) {
|
27
|
-
const
|
28
|
-
const { connectModal, client } = useConnectUI();
|
29
|
-
const isCompact = connectModal.size === "compact";
|
40
|
+
const isCompact = props.size === "compact";
|
30
41
|
const { initialScreen, screen } = useScreenContext();
|
31
42
|
|
32
|
-
const
|
33
|
-
screen === props.wallet && initialScreen === props.wallet
|
34
|
-
|
35
|
-
|
43
|
+
const isInitialScreen =
|
44
|
+
screen === props.wallet && initialScreen === props.wallet;
|
45
|
+
|
46
|
+
const onBack = isInitialScreen ? undefined : props.goBack;
|
36
47
|
|
37
48
|
return (
|
38
49
|
<Container
|
@@ -44,27 +55,33 @@ export function InAppWalletFormUIScreen(props: InAppWalletFormUIProps) {
|
|
44
55
|
minHeight: "250px",
|
45
56
|
}}
|
46
57
|
>
|
47
|
-
{isCompact ? (
|
58
|
+
{isCompact && isInitialScreen ? (
|
48
59
|
<>
|
49
60
|
<ModalHeader
|
50
61
|
onBack={onBack}
|
62
|
+
leftAligned={true}
|
51
63
|
title={
|
52
64
|
<>
|
53
|
-
{!
|
65
|
+
{!props.meta.titleIconUrl ? null : (
|
54
66
|
<Img
|
55
|
-
src={
|
67
|
+
src={props.meta.titleIconUrl}
|
56
68
|
width={iconSize.md}
|
57
69
|
height={iconSize.md}
|
58
|
-
client={client}
|
70
|
+
client={props.client}
|
59
71
|
/>
|
60
72
|
)}
|
61
|
-
<ModalTitle>
|
73
|
+
<ModalTitle>
|
74
|
+
{props.meta.title ??
|
75
|
+
props.inAppWalletLocale.emailLoginScreen.title}
|
76
|
+
</ModalTitle>
|
62
77
|
</>
|
63
78
|
}
|
64
79
|
/>
|
65
80
|
<Spacer y="lg" />
|
66
81
|
</>
|
67
|
-
) :
|
82
|
+
) : (
|
83
|
+
<ModalHeader onBack={onBack} title={props.inAppWalletLocale.signIn} />
|
84
|
+
)}
|
68
85
|
|
69
86
|
<Container
|
70
87
|
expand
|
@@ -72,21 +89,25 @@ export function InAppWalletFormUIScreen(props: InAppWalletFormUIProps) {
|
|
72
89
|
center="y"
|
73
90
|
p={isCompact ? undefined : "lg"}
|
74
91
|
>
|
75
|
-
<ConnectWalletSocialOptions
|
92
|
+
<ConnectWalletSocialOptions
|
93
|
+
{...props}
|
94
|
+
locale={props.inAppWalletLocale}
|
95
|
+
/>
|
76
96
|
</Container>
|
77
97
|
|
78
98
|
{isCompact &&
|
79
|
-
(
|
80
|
-
|
81
|
-
|
99
|
+
(props.meta.showThirdwebBranding !== false ||
|
100
|
+
props.meta.termsOfServiceUrl ||
|
101
|
+
props.meta.privacyPolicyUrl) && <Spacer y="xl" />}
|
82
102
|
|
83
103
|
<Container flex="column" gap="lg">
|
84
104
|
<TOS
|
85
|
-
termsOfServiceUrl={
|
86
|
-
privacyPolicyUrl={
|
105
|
+
termsOfServiceUrl={props.meta.termsOfServiceUrl}
|
106
|
+
privacyPolicyUrl={props.meta.privacyPolicyUrl}
|
107
|
+
locale={props.connectLocale.agreement}
|
87
108
|
/>
|
88
109
|
|
89
|
-
{
|
110
|
+
{props.meta.showThirdwebBranding !== false && <PoweredByThirdweb />}
|
90
111
|
</Container>
|
91
112
|
</Container>
|
92
113
|
);
|