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
@@ -4,7 +4,6 @@ import styled from "@emotion/styled";
|
|
4
4
|
import { useEffect, useMemo, useState } from "react";
|
5
5
|
import { iconSize } from "../../../core/design-system/index.js";
|
6
6
|
import { useSiweAuth } from "../../../core/hooks/auth/useSiweAuth.js";
|
7
|
-
import { ConnectUIContext } from "../../../core/providers/wallet-connection.js";
|
8
7
|
import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
|
9
8
|
import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
|
10
9
|
import { useActiveWalletConnectionStatus } from "../../hooks/wallets/useActiveWalletConnectionStatus.js";
|
@@ -64,6 +63,12 @@ export function ConnectButton(props: ConnectButtonProps) {
|
|
64
63
|
client: props.client,
|
65
64
|
});
|
66
65
|
|
66
|
+
const size = useMemo(() => {
|
67
|
+
return !canFitWideModal() || wallets.length === 1
|
68
|
+
? "compact"
|
69
|
+
: props.connectModal?.size || "wide";
|
70
|
+
}, [wallets.length, props.connectModal?.size]);
|
71
|
+
|
67
72
|
const autoConnectComp = props.autoConnect !== false && (
|
68
73
|
<AutoConnect
|
69
74
|
appMetadata={props.appMetadata}
|
@@ -100,38 +105,35 @@ export function ConnectButton(props: ConnectButtonProps) {
|
|
100
105
|
}
|
101
106
|
|
102
107
|
return (
|
103
|
-
<
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
}
|
124
|
-
onConnect
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
{autoConnectComp}
|
133
|
-
</WalletUIStatesProvider>
|
134
|
-
</ConnectUIContext.Provider>
|
108
|
+
<WalletUIStatesProvider theme={props.theme} isOpen={false}>
|
109
|
+
<ConnectButtonInner {...props} connectLocale={localeQuery.data} />
|
110
|
+
<ConnectModal
|
111
|
+
shouldSetActive={true}
|
112
|
+
accountAbstraction={props.accountAbstraction}
|
113
|
+
auth={props.auth}
|
114
|
+
chain={props.chain || props.accountAbstraction?.chain}
|
115
|
+
chains={props.chains}
|
116
|
+
client={props.client}
|
117
|
+
connectLocale={localeQuery.data}
|
118
|
+
meta={{
|
119
|
+
title: props.connectModal?.title,
|
120
|
+
titleIconUrl: props.connectModal?.titleIcon,
|
121
|
+
showThirdwebBranding: props.connectModal?.showThirdwebBranding,
|
122
|
+
termsOfServiceUrl: props.connectModal?.termsOfServiceUrl,
|
123
|
+
privacyPolicyUrl: props.connectModal?.privacyPolicyUrl,
|
124
|
+
}}
|
125
|
+
welcomeScreen={props.connectModal?.welcomeScreen}
|
126
|
+
size={size}
|
127
|
+
isEmbed={false}
|
128
|
+
localeId={props.locale || "en_US"}
|
129
|
+
onConnect={props.onConnect}
|
130
|
+
recommendedWallets={props.recommendedWallets}
|
131
|
+
showAllWallets={props.showAllWallets}
|
132
|
+
walletConnect={props.walletConnect}
|
133
|
+
wallets={wallets}
|
134
|
+
/>
|
135
|
+
{autoConnectComp}
|
136
|
+
</WalletUIStatesProvider>
|
135
137
|
);
|
136
138
|
}
|
137
139
|
|
@@ -459,7 +459,7 @@ export type ConnectButtonProps = {
|
|
459
459
|
* At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object.
|
460
460
|
* @example
|
461
461
|
* ```tsx
|
462
|
-
* import { polygon } from "thirdweb/
|
462
|
+
* import { polygon } from "thirdweb/chains";
|
463
463
|
*
|
464
464
|
* function Example() {
|
465
465
|
* return <div> <ConnectButton chain={polygon} /> </div>
|
@@ -486,7 +486,7 @@ export type ConnectButtonProps = {
|
|
486
486
|
* At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object.
|
487
487
|
*
|
488
488
|
* ```tsx
|
489
|
-
* import { defineChain } from "thirdweb/
|
489
|
+
* import { defineChain } from "thirdweb/chains";
|
490
490
|
*
|
491
491
|
* const polygon = defineChain({
|
492
492
|
* id: 137,
|
@@ -4,12 +4,12 @@ import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
|
|
4
4
|
import { CrossCircledIcon } from "@radix-ui/react-icons";
|
5
5
|
import Fuse from "fuse.js";
|
6
6
|
import { useMemo, useRef, useState } from "react";
|
7
|
+
import type { ThirdwebClient } from "../../../../../client/client.js";
|
7
8
|
import walletInfos from "../../../../../wallets/__generated__/wallet-infos.js";
|
8
9
|
import { createWallet } from "../../../../../wallets/create-wallet.js";
|
9
10
|
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
|
10
11
|
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
11
12
|
import { iconSize, spacing } from "../../../../core/design-system/index.js";
|
12
|
-
import { useConnectUI } from "../../../../core/hooks/others/useWalletConnectionCtx.js";
|
13
13
|
import { sortWallets } from "../../../utils/sortWallets.js";
|
14
14
|
import { Spacer } from "../../components/Spacer.js";
|
15
15
|
import { Spinner } from "../../components/Spinner.js";
|
@@ -19,6 +19,7 @@ import { Text } from "../../components/text.js";
|
|
19
19
|
import { useDebouncedValue } from "../../hooks/useDebouncedValue.js";
|
20
20
|
import { useShowMore } from "../../hooks/useShowMore.js";
|
21
21
|
import { WalletEntryButton } from "../WalletEntryButton.js";
|
22
|
+
import type { ConnectLocale } from "../locale/types.js";
|
22
23
|
|
23
24
|
/**
|
24
25
|
*
|
@@ -27,15 +28,19 @@ import { WalletEntryButton } from "../WalletEntryButton.js";
|
|
27
28
|
function AllWalletsUI(props: {
|
28
29
|
onBack: () => void;
|
29
30
|
onSelect: (wallet: Wallet) => void;
|
31
|
+
specifiedWallets: Wallet[];
|
32
|
+
size: "compact" | "wide";
|
33
|
+
client: ThirdwebClient;
|
34
|
+
recommendedWallets: Wallet[] | undefined;
|
35
|
+
connectLocale: ConnectLocale;
|
30
36
|
}) {
|
31
37
|
const { itemsToShow, lastItemRef } = useShowMore<HTMLLIElement>(10, 10);
|
32
|
-
const { wallets: specifiedWallets, connectModal } = useConnectUI();
|
33
38
|
|
34
39
|
const walletList = useMemo(() => {
|
35
40
|
return walletInfos.filter((wallet) => {
|
36
|
-
return specifiedWallets.findIndex((x) => x.id === wallet.id) === -1;
|
41
|
+
return props.specifiedWallets.findIndex((x) => x.id === wallet.id) === -1;
|
37
42
|
});
|
38
|
-
}, [specifiedWallets]);
|
43
|
+
}, [props.specifiedWallets]);
|
39
44
|
|
40
45
|
const fuseInstance = useMemo(() => {
|
41
46
|
return new Fuse(walletList, {
|
@@ -116,8 +121,7 @@ function AllWalletsUI(props: {
|
|
116
121
|
<div
|
117
122
|
ref={listContainer}
|
118
123
|
style={{
|
119
|
-
maxHeight:
|
120
|
-
connectModal.size === "compact" ? "400px" : undefined,
|
124
|
+
maxHeight: props.size === "compact" ? "400px" : undefined,
|
121
125
|
paddingInline: spacing.md,
|
122
126
|
}}
|
123
127
|
>
|
@@ -138,6 +142,9 @@ function AllWalletsUI(props: {
|
|
138
142
|
const wallet = createWallet(walletInfo.id);
|
139
143
|
props.onSelect(wallet);
|
140
144
|
}}
|
145
|
+
client={props.client}
|
146
|
+
recommendedWallets={props.recommendedWallets}
|
147
|
+
connectLocale={props.connectLocale}
|
141
148
|
/>
|
142
149
|
</li>
|
143
150
|
);
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use client";
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
3
3
|
import { Suspense, lazy, useEffect, useState } from "react";
|
4
|
+
import type { Chain } from "../../../../../chains/types.js";
|
5
|
+
import type { ThirdwebClient } from "../../../../../client/client.js";
|
4
6
|
import { isMobile } from "../../../../../utils/web/isMobile.js";
|
5
7
|
import type {
|
6
8
|
DeepLinkSupportedWalletIds,
|
@@ -13,7 +15,6 @@ import { getInstalledWalletProviders } from "../../../../../wallets/injected/mip
|
|
13
15
|
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
|
14
16
|
import type { EcosystemWalletId } from "../../../../../wallets/wallet-types.js";
|
15
17
|
import { iconSize } from "../../../../core/design-system/index.js";
|
16
|
-
import { useConnectUI } from "../../../../core/hooks/others/useWalletConnectionCtx.js";
|
17
18
|
import { useSetSelectionData } from "../../../providers/wallet-ui-states-provider.js";
|
18
19
|
import EcosystemWalletConnectUI from "../../../wallets/ecosystem/EcosystemWalletConnectUI.js";
|
19
20
|
import { getInjectedWalletLocale } from "../../../wallets/injected/locale/getInjectedWalletLocale.js";
|
@@ -27,7 +28,9 @@ import { Spacer } from "../../components/Spacer.js";
|
|
27
28
|
import { Container, ModalHeader } from "../../components/basic.js";
|
28
29
|
import { Text } from "../../components/text.js";
|
29
30
|
import { useWalletInfo } from "../../hooks/useWalletInfo.js";
|
31
|
+
import type { LocaleId } from "../../types.js";
|
30
32
|
import { AccentFailIcon } from "../icons/AccentFailIcon.js";
|
33
|
+
import type { ConnectLocale } from "../locale/types.js";
|
31
34
|
import { DeepLinkConnectUI } from "./DeepLinkConnectUI.js";
|
32
35
|
import { InjectedConnectUI } from "./InjectedConnectUI.js";
|
33
36
|
|
@@ -46,12 +49,29 @@ export function AnyWalletConnectUI(props: {
|
|
46
49
|
done: () => void;
|
47
50
|
onBack?: () => void;
|
48
51
|
setModalVisibility: (value: boolean) => void;
|
52
|
+
localeId: LocaleId;
|
53
|
+
chain: Chain | undefined;
|
54
|
+
chains: Chain[] | undefined;
|
55
|
+
client: ThirdwebClient;
|
56
|
+
size: "compact" | "wide";
|
57
|
+
meta: {
|
58
|
+
title?: string;
|
59
|
+
titleIconUrl?: string;
|
60
|
+
showThirdwebBranding?: boolean;
|
61
|
+
termsOfServiceUrl?: string;
|
62
|
+
privacyPolicyUrl?: string;
|
63
|
+
};
|
64
|
+
walletConnect:
|
65
|
+
| {
|
66
|
+
projectId?: string;
|
67
|
+
}
|
68
|
+
| undefined;
|
69
|
+
connectLocale: ConnectLocale;
|
49
70
|
}) {
|
50
71
|
const [screen, setScreen] = useState<"main" | "get-started">("main");
|
51
72
|
const { wallet } = props;
|
52
73
|
const walletInfo = useWalletInfo(props.wallet.id);
|
53
74
|
const setSelectionData = useSetSelectionData();
|
54
|
-
const localeId = useConnectUI().locale;
|
55
75
|
|
56
76
|
// biome-ignore lint/correctness/useExhaustiveDependencies: reset the selection data when the wallet changes
|
57
77
|
useEffect(() => {
|
@@ -59,9 +79,9 @@ export function AnyWalletConnectUI(props: {
|
|
59
79
|
}, [wallet.id]);
|
60
80
|
|
61
81
|
const localeFnQuery = useQuery({
|
62
|
-
queryKey: ["injectedWalletLocale", localeId, walletInfo.data?.name],
|
82
|
+
queryKey: ["injectedWalletLocale", props.localeId, walletInfo.data?.name],
|
63
83
|
queryFn: async () => {
|
64
|
-
return getInjectedWalletLocale(localeId);
|
84
|
+
return getInjectedWalletLocale(props.localeId);
|
65
85
|
},
|
66
86
|
refetchOnWindowFocus: false,
|
67
87
|
refetchOnMount: false,
|
@@ -87,6 +107,9 @@ export function AnyWalletConnectUI(props: {
|
|
87
107
|
done={props.done}
|
88
108
|
locale={localeFn(injectedProvider.info.name)}
|
89
109
|
onBack={props.onBack}
|
110
|
+
chain={props.chain}
|
111
|
+
client={props.client}
|
112
|
+
size={props.size}
|
90
113
|
/>
|
91
114
|
);
|
92
115
|
}
|
@@ -134,6 +157,7 @@ export function AnyWalletConnectUI(props: {
|
|
134
157
|
onBack={() => {
|
135
158
|
setScreen("main");
|
136
159
|
}}
|
160
|
+
client={props.client}
|
137
161
|
/>
|
138
162
|
);
|
139
163
|
}
|
@@ -155,6 +179,7 @@ export function AnyWalletConnectUI(props: {
|
|
155
179
|
setScreen("get-started");
|
156
180
|
}}
|
157
181
|
onBack={props.onBack}
|
182
|
+
client={props.client}
|
158
183
|
/>
|
159
184
|
);
|
160
185
|
}
|
@@ -170,6 +195,9 @@ export function AnyWalletConnectUI(props: {
|
|
170
195
|
setScreen("get-started");
|
171
196
|
}}
|
172
197
|
onBack={props.onBack}
|
198
|
+
chain={props.chain}
|
199
|
+
client={props.client}
|
200
|
+
size={props.size}
|
173
201
|
/>
|
174
202
|
);
|
175
203
|
}
|
@@ -187,6 +215,9 @@ export function AnyWalletConnectUI(props: {
|
|
187
215
|
done={props.done}
|
188
216
|
wallet={props.wallet as Wallet<typeof COINBASE>}
|
189
217
|
walletInfo={walletInfo.data}
|
218
|
+
chain={props.chain}
|
219
|
+
client={props.client}
|
220
|
+
size={props.size}
|
190
221
|
/>
|
191
222
|
</Suspense>
|
192
223
|
);
|
@@ -204,6 +235,11 @@ export function AnyWalletConnectUI(props: {
|
|
204
235
|
done={props.done}
|
205
236
|
wallet={props.wallet as Wallet<WCSupportedWalletIds>}
|
206
237
|
walletInfo={walletInfo.data}
|
238
|
+
chain={props.chain}
|
239
|
+
chains={props.chains}
|
240
|
+
client={props.client}
|
241
|
+
size={props.size}
|
242
|
+
walletConnect={props.walletConnect}
|
207
243
|
/>
|
208
244
|
);
|
209
245
|
}
|
@@ -218,6 +254,11 @@ export function AnyWalletConnectUI(props: {
|
|
218
254
|
wallet={props.wallet as Wallet<"walletConnect">}
|
219
255
|
walletInfo={walletInfo.data}
|
220
256
|
setModalVisibility={props.setModalVisibility}
|
257
|
+
chain={props.chain}
|
258
|
+
chains={props.chains}
|
259
|
+
client={props.client}
|
260
|
+
size={props.size}
|
261
|
+
walletConnect={props.walletConnect}
|
221
262
|
/>
|
222
263
|
);
|
223
264
|
}
|
@@ -229,6 +270,12 @@ export function AnyWalletConnectUI(props: {
|
|
229
270
|
wallet={props.wallet as Wallet<"inApp">}
|
230
271
|
done={props.done}
|
231
272
|
goBack={props.onBack}
|
273
|
+
chain={props.chain}
|
274
|
+
client={props.client}
|
275
|
+
size={props.size}
|
276
|
+
connectLocale={props.connectLocale}
|
277
|
+
meta={props.meta}
|
278
|
+
localeId={props.localeId}
|
232
279
|
/>
|
233
280
|
</Suspense>
|
234
281
|
);
|
@@ -241,6 +288,12 @@ export function AnyWalletConnectUI(props: {
|
|
241
288
|
wallet={props.wallet as Wallet<EcosystemWalletId>}
|
242
289
|
done={props.done}
|
243
290
|
goBack={props.onBack}
|
291
|
+
chain={props.chain}
|
292
|
+
client={props.client}
|
293
|
+
size={props.size}
|
294
|
+
meta={props.meta}
|
295
|
+
localeId={props.localeId}
|
296
|
+
connectLocale={props.connectLocale}
|
244
297
|
/>
|
245
298
|
</Suspense>
|
246
299
|
);
|
@@ -255,6 +308,7 @@ export function AnyWalletConnectUI(props: {
|
|
255
308
|
onBack={() => {
|
256
309
|
setScreen("main");
|
257
310
|
}}
|
311
|
+
client={props.client}
|
258
312
|
/>
|
259
313
|
);
|
260
314
|
}
|
@@ -12,7 +12,6 @@ import {
|
|
12
12
|
import { type Theme, radius } from "../../../../core/design-system/index.js";
|
13
13
|
import type { SiweAuthOptions } from "../../../../core/hooks/auth/useSiweAuth.js";
|
14
14
|
import { useSiweAuth } from "../../../../core/hooks/auth/useSiweAuth.js";
|
15
|
-
import { ConnectUIContext } from "../../../../core/providers/wallet-connection.js";
|
16
15
|
import { useActiveAccount } from "../../../hooks/wallets/useActiveAccount.js";
|
17
16
|
import { useActiveWallet } from "../../../hooks/wallets/useActiveWallet.js";
|
18
17
|
import { useIsAutoConnecting } from "../../../hooks/wallets/useIsAutoConnecting.js";
|
@@ -32,6 +31,7 @@ import {
|
|
32
31
|
wideModalMaxHeight,
|
33
32
|
} from "../constants.js";
|
34
33
|
import { useConnectLocale } from "../locale/getConnectLocale.js";
|
34
|
+
import type { ConnectLocale } from "../locale/types.js";
|
35
35
|
import { ConnectModalContent } from "./ConnectModalContent.js";
|
36
36
|
import { useSetupScreen } from "./screen.js";
|
37
37
|
|
@@ -358,10 +358,25 @@ export function ConnectEmbed(props: ConnectEmbedProps) {
|
|
358
358
|
client: props.client,
|
359
359
|
});
|
360
360
|
|
361
|
-
const modalSize =
|
362
|
-
!canFitWideModal() || wallets.length === 1
|
361
|
+
const modalSize = useMemo(() => {
|
362
|
+
return !canFitWideModal() || wallets.length === 1
|
363
363
|
? "compact"
|
364
364
|
: props.modalSize || ("compact" as const);
|
365
|
+
}, [wallets.length, props.modalSize]);
|
366
|
+
|
367
|
+
const meta = useMemo(() => {
|
368
|
+
return {
|
369
|
+
privacyPolicyUrl: props.privacyPolicyUrl,
|
370
|
+
showThirdwebBranding: props.showThirdwebBranding !== false,
|
371
|
+
termsOfServiceUrl: props.termsOfServiceUrl,
|
372
|
+
title: undefined,
|
373
|
+
titleIconUrl: undefined,
|
374
|
+
};
|
375
|
+
}, [
|
376
|
+
props.privacyPolicyUrl,
|
377
|
+
props.showThirdwebBranding,
|
378
|
+
props.termsOfServiceUrl,
|
379
|
+
]);
|
365
380
|
|
366
381
|
const autoConnectComp = props.autoConnect !== false && (
|
367
382
|
<AutoConnect
|
@@ -393,35 +408,31 @@ export function ConnectEmbed(props: ConnectEmbedProps) {
|
|
393
408
|
}
|
394
409
|
|
395
410
|
return (
|
396
|
-
<
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
}
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
<ConnectEmbedContent {...props} onConnect={props.onConnect} />
|
422
|
-
{autoConnectComp}
|
423
|
-
</WalletUIStatesProvider>
|
424
|
-
</ConnectUIContext.Provider>
|
411
|
+
<WalletUIStatesProvider theme={props.theme} isOpen={true}>
|
412
|
+
<ConnectEmbedContent
|
413
|
+
auth={props.auth}
|
414
|
+
accountAbstraction={props.accountAbstraction}
|
415
|
+
chain={props.chain || props.accountAbstraction?.chain}
|
416
|
+
chains={props.chains}
|
417
|
+
client={props.client}
|
418
|
+
connectLocale={localeQuery.data}
|
419
|
+
size={modalSize}
|
420
|
+
// TODO: no welcome screen for embed right now?
|
421
|
+
// welcomeScreen={undefined}
|
422
|
+
meta={meta}
|
423
|
+
isEmbed={true}
|
424
|
+
localeId={props.locale || "en_US"}
|
425
|
+
onConnect={props.onConnect}
|
426
|
+
recommendedWallets={props.recommendedWallets}
|
427
|
+
showAllWallets={props.showAllWallets}
|
428
|
+
walletConnect={props.walletConnect}
|
429
|
+
wallets={wallets}
|
430
|
+
className={props.className}
|
431
|
+
modalSize={modalSize}
|
432
|
+
style={props.style}
|
433
|
+
/>
|
434
|
+
{autoConnectComp}
|
435
|
+
</WalletUIStatesProvider>
|
425
436
|
);
|
426
437
|
}
|
427
438
|
|
@@ -431,13 +442,43 @@ export function ConnectEmbed(props: ConnectEmbedProps) {
|
|
431
442
|
/**
|
432
443
|
* @internal
|
433
444
|
*/
|
434
|
-
const ConnectEmbedContent = (
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
445
|
+
const ConnectEmbedContent = (props: {
|
446
|
+
modalSize?: "compact" | "wide";
|
447
|
+
className?: string;
|
448
|
+
style?: React.CSSProperties;
|
449
|
+
// ---
|
450
|
+
accountAbstraction: SmartWalletOptions | undefined;
|
451
|
+
auth: SiweAuthOptions | undefined;
|
452
|
+
chain: Chain | undefined;
|
453
|
+
chains: Chain[] | undefined;
|
454
|
+
client: ThirdwebClient;
|
455
|
+
connectLocale: ConnectLocale;
|
456
|
+
meta: {
|
457
|
+
title?: string;
|
458
|
+
titleIconUrl?: string;
|
459
|
+
showThirdwebBranding?: boolean;
|
460
|
+
termsOfServiceUrl?: string;
|
461
|
+
privacyPolicyUrl?: string;
|
462
|
+
};
|
463
|
+
size: "compact" | "wide";
|
464
|
+
isEmbed: boolean;
|
465
|
+
localeId: LocaleId;
|
466
|
+
onConnect: ((wallet: Wallet) => void) | undefined;
|
467
|
+
recommendedWallets: Wallet[] | undefined;
|
468
|
+
showAllWallets: boolean | undefined;
|
469
|
+
walletConnect:
|
470
|
+
| {
|
471
|
+
projectId?: string;
|
472
|
+
}
|
473
|
+
| undefined;
|
474
|
+
wallets: Wallet[];
|
475
|
+
}) => {
|
439
476
|
// const requiresSignIn = false;
|
440
|
-
const screenSetup = useSetupScreen(
|
477
|
+
const screenSetup = useSetupScreen({
|
478
|
+
size: props.size,
|
479
|
+
welcomeScreen: undefined,
|
480
|
+
wallets: props.wallets,
|
481
|
+
});
|
441
482
|
const { setScreen, initialScreen } = screenSetup;
|
442
483
|
const activeWallet = useActiveWallet();
|
443
484
|
const siweAuth = useSiweAuth(activeWallet, props.auth);
|
@@ -472,6 +513,24 @@ const ConnectEmbedContent = (
|
|
472
513
|
setModalVisibility={() => {
|
473
514
|
// no op
|
474
515
|
}}
|
516
|
+
accountAbstraction={props.accountAbstraction}
|
517
|
+
auth={props.auth}
|
518
|
+
chain={props.chain}
|
519
|
+
chains={props.chains}
|
520
|
+
client={props.client}
|
521
|
+
connectLocale={props.connectLocale}
|
522
|
+
meta={props.meta}
|
523
|
+
size={props.size}
|
524
|
+
// TODO: no welcome screen for embed right now?
|
525
|
+
// welcomeScreen={undefined}
|
526
|
+
welcomeScreen={undefined}
|
527
|
+
isEmbed={props.isEmbed}
|
528
|
+
localeId={props.localeId}
|
529
|
+
onConnect={props.onConnect}
|
530
|
+
recommendedWallets={props.recommendedWallets}
|
531
|
+
showAllWallets={props.showAllWallets}
|
532
|
+
walletConnect={props.walletConnect}
|
533
|
+
wallets={props.wallets}
|
475
534
|
/>
|
476
535
|
);
|
477
536
|
}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
"use client";
|
2
2
|
import { useCallback, useEffect, useState } from "react";
|
3
|
-
import {
|
3
|
+
import type { Chain } from "../../../../../chains/types.js";
|
4
|
+
import type { ThirdwebClient } from "../../../../../client/client.js";
|
5
|
+
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
|
6
|
+
import type { SmartWalletOptions } from "../../../../../wallets/smart/types.js";
|
7
|
+
import type { SiweAuthOptions } from "../../../../core/hooks/auth/useSiweAuth.js";
|
4
8
|
import { useActiveAccount } from "../../../hooks/wallets/useActiveAccount.js";
|
5
9
|
import {
|
6
10
|
useIsWalletModalOpen,
|
@@ -8,26 +12,58 @@ import {
|
|
8
12
|
useSetSelectionData,
|
9
13
|
} from "../../../providers/wallet-ui-states-provider.js";
|
10
14
|
import { Modal } from "../../components/Modal.js";
|
15
|
+
import type { LocaleId } from "../../types.js";
|
11
16
|
import { onModalUnmount, reservedScreens } from "../constants.js";
|
17
|
+
import type { ConnectLocale } from "../locale/types.js";
|
18
|
+
import type { WelcomeScreen } from "../screens/types.js";
|
12
19
|
import { ConnectModalContent } from "./ConnectModalContent.js";
|
13
20
|
import { useSetupScreen } from "./screen.js";
|
14
21
|
|
15
22
|
type ConnectModalOptions = {
|
16
23
|
onClose?: () => void;
|
17
24
|
shouldSetActive: boolean;
|
25
|
+
wallets: Wallet[];
|
26
|
+
accountAbstraction: SmartWalletOptions | undefined;
|
27
|
+
auth: SiweAuthOptions | undefined;
|
28
|
+
onConnect: ((wallet: Wallet) => void) | undefined;
|
29
|
+
size: "compact" | "wide";
|
30
|
+
welcomeScreen: WelcomeScreen | undefined;
|
31
|
+
meta: {
|
32
|
+
title?: string;
|
33
|
+
titleIconUrl?: string;
|
34
|
+
showThirdwebBranding?: boolean;
|
35
|
+
termsOfServiceUrl?: string;
|
36
|
+
privacyPolicyUrl?: string;
|
37
|
+
};
|
38
|
+
connectLocale: ConnectLocale;
|
39
|
+
client: ThirdwebClient;
|
40
|
+
isEmbed: boolean;
|
41
|
+
recommendedWallets: Wallet[] | undefined;
|
42
|
+
localeId: LocaleId;
|
43
|
+
chain: Chain | undefined;
|
44
|
+
showAllWallets: boolean | undefined;
|
45
|
+
chains: Chain[] | undefined;
|
46
|
+
walletConnect:
|
47
|
+
| {
|
48
|
+
projectId?: string;
|
49
|
+
}
|
50
|
+
| undefined;
|
18
51
|
};
|
19
52
|
|
20
53
|
/**
|
21
54
|
* @internal
|
22
55
|
*/
|
23
56
|
const ConnectModal = (props: ConnectModalOptions) => {
|
24
|
-
const screenSetup = useSetupScreen(
|
57
|
+
const screenSetup = useSetupScreen({
|
58
|
+
size: props.size,
|
59
|
+
welcomeScreen: props.welcomeScreen,
|
60
|
+
wallets: props.wallets,
|
61
|
+
});
|
25
62
|
const setSelectionData = useSetSelectionData();
|
26
63
|
const { screen, setScreen, initialScreen } = screenSetup;
|
27
64
|
const isWalletModalOpen = useIsWalletModalOpen();
|
28
65
|
const setIsWalletModalOpen = useSetIsWalletModalOpen();
|
29
66
|
const [hideModal, setHideModal] = useState(false);
|
30
|
-
const { connectModal } = useConnectUI();
|
31
67
|
|
32
68
|
const closeModal = useCallback(() => {
|
33
69
|
props.onClose?.();
|
@@ -81,7 +117,7 @@ const ConnectModal = (props: ConnectModalOptions) => {
|
|
81
117
|
return (
|
82
118
|
<Modal
|
83
119
|
hide={hideModal}
|
84
|
-
size={
|
120
|
+
size={props.size}
|
85
121
|
open={isWalletModalOpen}
|
86
122
|
setOpen={(value) => {
|
87
123
|
if (hideModal) {
|
@@ -99,6 +135,22 @@ const ConnectModal = (props: ConnectModalOptions) => {
|
|
99
135
|
setModalVisibility={setModalVisibility}
|
100
136
|
isOpen={isWalletModalOpen}
|
101
137
|
onClose={closeModal}
|
138
|
+
accountAbstraction={props.accountAbstraction}
|
139
|
+
auth={props.auth}
|
140
|
+
client={props.client}
|
141
|
+
connectLocale={props.connectLocale}
|
142
|
+
size={props.size}
|
143
|
+
welcomeScreen={props.welcomeScreen}
|
144
|
+
meta={props.meta}
|
145
|
+
isEmbed={props.isEmbed}
|
146
|
+
onConnect={props.onConnect}
|
147
|
+
recommendedWallets={props.recommendedWallets}
|
148
|
+
wallets={props.wallets}
|
149
|
+
localeId={props.localeId}
|
150
|
+
chain={props.chain}
|
151
|
+
showAllWallets={props.showAllWallets}
|
152
|
+
chains={props.chains}
|
153
|
+
walletConnect={props.walletConnect}
|
102
154
|
/>
|
103
155
|
</Modal>
|
104
156
|
);
|