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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/react/core/design-system/index.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,GAAG;IACjB,KAAK,EAAE,uBAAuB;IAC9B,KAAK,EAAE,qBAAqB;IAC5B,KAAK,EAAE,qBAAqB;IAC5B,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,oBAAoB;IAC7B,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,mBAAmB;IAC7B,YAAY,EAAE,SAAS;CACO,CAAC;AAEjC,MAAM,WAAW,GAAG;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,UAAU,EAAE,mBAAmB;IAC/B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,oBAAoB;IAC7B,QAAQ,EAAE,mBAAmB;IAC7B,YAAY,EAAE,SAAS;CACO,CAAC;AAsDjC;;GAEG;AACH,SAAS,cAAc,CAAC,MAAmB;IACzC,OAAO;QACL,IAAI,EAAE,MAA0B;QAChC,MAAM,EAAE;YACN,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,UAAU,EAAE,MAAM,CAAC,UAAU;YAE7B,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO;YAEvB,cAAc,EAAE,MAAM,CAAC,OAAO;YAE9B,cAAc,EAAE,MAAM,CAAC,QAAQ;YAC/B,gBAAgB,EAAE,MAAM,CAAC,YAAY;YAErC,eAAe,EAAE,MAAM,C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IAAI,cAAc,CAAC,MAAM,EAAE,CAAC;QAC1B,KAAK,CAAC,MAAM,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC;IAC/D,CAAC;IAED,IAAI,cAAc,CAAC,UAAU,EAAE,CAAC;QAC9B,KAAK,CAAC,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IAC/C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
@@ -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";
|
@@ -51,6 +50,11 @@ export function ConnectButton(props) {
|
|
51
50
|
wallets,
|
52
51
|
client: props.client,
|
53
52
|
});
|
53
|
+
const size = useMemo(() => {
|
54
|
+
return !canFitWideModal() || wallets.length === 1
|
55
|
+
? "compact"
|
56
|
+
: props.connectModal?.size || "wide";
|
57
|
+
}, [wallets.length, props.connectModal?.size]);
|
54
58
|
const autoConnectComp = props.autoConnect !== false && (_jsx(AutoConnect, { appMetadata: props.appMetadata, client: props.client, wallets: wallets, timeout: typeof props.autoConnect === "boolean"
|
55
59
|
? undefined
|
56
60
|
: props.autoConnect?.timeout, accountAbstraction: props.accountAbstraction, onConnect: props.onConnect }));
|
@@ -60,29 +64,13 @@ export function ConnectButton(props) {
|
|
60
64
|
...props.connectButton?.style,
|
61
65
|
}, children: [autoConnectComp, _jsx(Spinner, { size: "sm", color: "primaryButtonText" })] }));
|
62
66
|
}
|
63
|
-
return (_jsx(
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
chains: props.chains,
|
71
|
-
walletConnect: props.walletConnect,
|
72
|
-
accountAbstraction: props.accountAbstraction,
|
73
|
-
recommendedWallets: props.recommendedWallets,
|
74
|
-
showAllWallets: props.showAllWallets,
|
75
|
-
isEmbed: false,
|
76
|
-
connectModal: {
|
77
|
-
...props.connectModal,
|
78
|
-
size: !canFitWideModal() || wallets.length === 1
|
79
|
-
? "compact"
|
80
|
-
: props.connectModal?.size || "wide",
|
81
|
-
},
|
82
|
-
onConnect: props.onConnect,
|
83
|
-
onDisconnect: props.onDisconnect,
|
84
|
-
auth: props.auth,
|
85
|
-
}, children: _jsxs(WalletUIStatesProvider, { theme: props.theme, isOpen: false, children: [_jsx(ConnectButtonInner, { ...props, connectLocale: localeQuery.data }), _jsx(ConnectModal, { shouldSetActive: true }), autoConnectComp] }) }));
|
67
|
+
return (_jsxs(WalletUIStatesProvider, { theme: props.theme, isOpen: false, children: [_jsx(ConnectButtonInner, { ...props, connectLocale: localeQuery.data }), _jsx(ConnectModal, { shouldSetActive: true, accountAbstraction: props.accountAbstraction, auth: props.auth, chain: props.chain || props.accountAbstraction?.chain, chains: props.chains, client: props.client, connectLocale: localeQuery.data, meta: {
|
68
|
+
title: props.connectModal?.title,
|
69
|
+
titleIconUrl: props.connectModal?.titleIcon,
|
70
|
+
showThirdwebBranding: props.connectModal?.showThirdwebBranding,
|
71
|
+
termsOfServiceUrl: props.connectModal?.termsOfServiceUrl,
|
72
|
+
privacyPolicyUrl: props.connectModal?.privacyPolicyUrl,
|
73
|
+
}, welcomeScreen: props.connectModal?.welcomeScreen, size: size, isEmbed: false, localeId: props.locale || "en_US", onConnect: props.onConnect, recommendedWallets: props.recommendedWallets, showAllWallets: props.showAllWallets, walletConnect: props.walletConnect, wallets: wallets }), autoConnectComp] }));
|
86
74
|
}
|
87
75
|
function ConnectButtonInner(props) {
|
88
76
|
const activeWallet = useActiveWallet();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConnectButton.js","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/ConnectButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"ConnectButton.js","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/ConnectButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAC;AACzG,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAA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AAE,EAAE;YACrB,iCAAiC;YACjC,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;gBAC1B,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,CAAC;YACD,KAAK,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,EACD,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,EAAE,EAC3B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,aAAa,EAAE,MAAM,GACrB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD,SAAS,EAAE,GAAG,eAAe,aAAa;CAC3C,CAAC,CAAC"}
|
@@ -9,7 +9,6 @@ import walletInfos from "../../../../../wallets/__generated__/wallet-infos.js";
|
|
9
9
|
import { createWallet } from "../../../../../wallets/create-wallet.js";
|
10
10
|
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
11
11
|
import { iconSize, spacing } from "../../../../core/design-system/index.js";
|
12
|
-
import { useConnectUI } from "../../../../core/hooks/others/useWalletConnectionCtx.js";
|
13
12
|
import { sortWallets } from "../../../utils/sortWallets.js";
|
14
13
|
import { Spacer } from "../../components/Spacer.js";
|
15
14
|
import { Spinner } from "../../components/Spinner.js";
|
@@ -25,12 +24,11 @@ import { WalletEntryButton } from "../WalletEntryButton.js";
|
|
25
24
|
*/
|
26
25
|
function AllWalletsUI(props) {
|
27
26
|
const { itemsToShow, lastItemRef } = useShowMore(10, 10);
|
28
|
-
const { wallets: specifiedWallets, connectModal } = useConnectUI();
|
29
27
|
const walletList = useMemo(() => {
|
30
28
|
return walletInfos.filter((wallet) => {
|
31
|
-
return specifiedWallets.findIndex((x) => x.id === wallet.id) === -1;
|
29
|
+
return props.specifiedWallets.findIndex((x) => x.id === wallet.id) === -1;
|
32
30
|
});
|
33
|
-
}, [specifiedWallets]);
|
31
|
+
}, [props.specifiedWallets]);
|
34
32
|
const fuseInstance = useMemo(() => {
|
35
33
|
return new Fuse(walletList, {
|
36
34
|
threshold: 0.4,
|
@@ -66,7 +64,7 @@ function AllWalletsUI(props) {
|
|
66
64
|
position: "absolute",
|
67
65
|
right: spacing.md,
|
68
66
|
}, children: _jsx(Spinner, { size: "md", color: "accentText" }) }))] }) }), walletInfosToShow.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Spacer, { y: "md" }), _jsxs(Container, { animate: "fadein", expand: true, scrollY: true, children: [_jsx("div", { ref: listContainer, style: {
|
69
|
-
maxHeight:
|
67
|
+
maxHeight: props.size === "compact" ? "400px" : undefined,
|
70
68
|
paddingInline: spacing.md,
|
71
69
|
}, children: walletInfosToShow.map((walletInfo, i) => {
|
72
70
|
const isLast = i === walletInfosToShow.length - 1;
|
@@ -75,7 +73,7 @@ function AllWalletsUI(props) {
|
|
75
73
|
}, children: _jsx(WalletEntryButton, { walletId: walletInfo.id, selectWallet: () => {
|
76
74
|
const wallet = createWallet(walletInfo.id);
|
77
75
|
props.onSelect(wallet);
|
78
|
-
} }) }, walletInfo.id));
|
76
|
+
}, client: props.client, recommendedWallets: props.recommendedWallets, connectLocale: props.connectLocale }) }, walletInfo.id));
|
79
77
|
}) }), _jsx(Spacer, { y: "xl" })] })] })), walletInfosToShow.length === 0 && (_jsxs(Container, { flex: "column", gap: "md", center: "both", color: "secondaryText", animate: "fadein", expand: true, style: {
|
80
78
|
minHeight: "250px",
|
81
79
|
}, children: [_jsx(CrossCircledIcon, { width: iconSize.xl, height: iconSize.xl }), _jsx(Text, { children: " No Results " })] }))] }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AllWalletsUI.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,MAAM,MAAM,iBAAiB,CAAC;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AAC,EAAC,IAAI,GAAG,IACP,IACX,CACJ,EAEA,iBAAiB,CAAC,MAAM,KAAK,CAAC,IAAI,CACjC,MAAC,SAAS,IACR,IAAI,EAAC,QAAQ,EACb,GAAG,EAAC,IAAI,EACR,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,eAAe,EACrB,OAAO,EAAC,QAAQ,EAChB,MAAM,QACN,KAAK,EAAE;oBACL,SAAS,EAAE,OAAO;iBACnB,aAED,KAAC,gBAAgB,IAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAI,EAC7D,KAAC,IAAI,+BAAoB,IACf,CACb,IACS,CACb,CAAC;AACJ,CAAC;AAED,MAAM,yBAAyB,GAAG,eAAe,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAC3E,CAAC,CAAC,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa;QACjC,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,OAAO,CAAC,EAAE;KACjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -7,7 +7,6 @@ import { COINBASE } from "../../../../../wallets/constants.js";
|
|
7
7
|
import { isEcosystemWallet } from "../../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
8
8
|
import { getInstalledWalletProviders } from "../../../../../wallets/injected/mipdStore.js";
|
9
9
|
import { iconSize } from "../../../../core/design-system/index.js";
|
10
|
-
import { useConnectUI } from "../../../../core/hooks/others/useWalletConnectionCtx.js";
|
11
10
|
import { useSetSelectionData } from "../../../providers/wallet-ui-states-provider.js";
|
12
11
|
import EcosystemWalletConnectUI from "../../../wallets/ecosystem/EcosystemWalletConnectUI.js";
|
13
12
|
import { getInjectedWalletLocale } from "../../../wallets/injected/locale/getInjectedWalletLocale.js";
|
@@ -31,15 +30,14 @@ export function AnyWalletConnectUI(props) {
|
|
31
30
|
const { wallet } = props;
|
32
31
|
const walletInfo = useWalletInfo(props.wallet.id);
|
33
32
|
const setSelectionData = useSetSelectionData();
|
34
|
-
const localeId = useConnectUI().locale;
|
35
33
|
// biome-ignore lint/correctness/useExhaustiveDependencies: reset the selection data when the wallet changes
|
36
34
|
useEffect(() => {
|
37
35
|
setSelectionData({});
|
38
36
|
}, [wallet.id]);
|
39
37
|
const localeFnQuery = useQuery({
|
40
|
-
queryKey: ["injectedWalletLocale", localeId, walletInfo.data?.name],
|
38
|
+
queryKey: ["injectedWalletLocale", props.localeId, walletInfo.data?.name],
|
41
39
|
queryFn: async () => {
|
42
|
-
return getInjectedWalletLocale(localeId);
|
40
|
+
return getInjectedWalletLocale(props.localeId);
|
43
41
|
},
|
44
42
|
refetchOnWindowFocus: false,
|
45
43
|
refetchOnMount: false,
|
@@ -52,7 +50,7 @@ export function AnyWalletConnectUI(props) {
|
|
52
50
|
const injectedProvider = getInstalledWalletProviders().find((w) => w.info.rdns === wallet.id);
|
53
51
|
// Unknown wallet id but it's injected
|
54
52
|
if (injectedProvider) {
|
55
|
-
return (_jsx(InjectedConnectUI, { wallet: props.wallet, walletName: injectedProvider.info.name, done: props.done, locale: localeFn(injectedProvider.info.name), onBack: props.onBack }));
|
53
|
+
return (_jsx(InjectedConnectUI, { wallet: props.wallet, walletName: injectedProvider.info.name, done: props.done, locale: localeFn(injectedProvider.info.name), onBack: props.onBack, chain: props.chain, client: props.client, size: props.size }));
|
56
54
|
}
|
57
55
|
// This will only happen if developer passes a wallet with unknown id and it's not injected
|
58
56
|
// Adding a fallback UI just in case
|
@@ -66,7 +64,7 @@ export function AnyWalletConnectUI(props) {
|
|
66
64
|
if (screen === "get-started") {
|
67
65
|
return (_jsx(GetStartedScreen, { locale: locale, wallet: props.wallet, walletInfo: walletInfo.data, onBack: () => {
|
68
66
|
setScreen("main");
|
69
|
-
} }));
|
67
|
+
}, client: props.client }));
|
70
68
|
}
|
71
69
|
if (walletInfo.data.deepLink &&
|
72
70
|
!isInstalled &&
|
@@ -75,38 +73,38 @@ export function AnyWalletConnectUI(props) {
|
|
75
73
|
isMobile()) {
|
76
74
|
return (_jsx(DeepLinkConnectUI, { wallet: props.wallet, walletInfo: walletInfo.data, deepLinkPrefix: walletInfo.data.deepLink.mobile, locale: locale, onGetStarted: () => {
|
77
75
|
setScreen("get-started");
|
78
|
-
}, onBack: props.onBack }));
|
76
|
+
}, onBack: props.onBack, client: props.client }));
|
79
77
|
}
|
80
78
|
if (walletInfo.data.rdns && isInstalled) {
|
81
79
|
return (_jsx(InjectedConnectUI, { wallet: props.wallet, walletName: walletInfo.data.name, done: props.done, locale: locale, onGetStarted: () => {
|
82
80
|
setScreen("get-started");
|
83
|
-
}, onBack: props.onBack }));
|
81
|
+
}, onBack: props.onBack, chain: props.chain, client: props.client, size: props.size }));
|
84
82
|
}
|
85
83
|
// coinbase wallet sdk
|
86
84
|
if (props.wallet.id === COINBASE) {
|
87
85
|
return (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(CoinbaseSDKWalletConnectUI, { locale: locale, onGetStarted: () => {
|
88
86
|
setScreen("get-started");
|
89
|
-
}, onBack: props.onBack, done: props.done, wallet: props.wallet, walletInfo: walletInfo.data }) }));
|
87
|
+
}, onBack: props.onBack, done: props.done, wallet: props.wallet, walletInfo: walletInfo.data, chain: props.chain, client: props.client, size: props.size }) }));
|
90
88
|
}
|
91
89
|
// wallet connect
|
92
90
|
if (walletInfo.data.mobile.native || walletInfo.data.mobile.universal) {
|
93
91
|
return (_jsx(WalletConnectConnection, { locale: locale, onGetStarted: () => {
|
94
92
|
setScreen("get-started");
|
95
|
-
}, onBack: props.onBack, done: props.done, wallet: props.wallet, walletInfo: walletInfo.data }));
|
93
|
+
}, onBack: props.onBack, done: props.done, wallet: props.wallet, walletInfo: walletInfo.data, chain: props.chain, chains: props.chains, client: props.client, size: props.size, walletConnect: props.walletConnect }));
|
96
94
|
}
|
97
95
|
// wallet connect
|
98
96
|
if (props.wallet.id === "walletConnect") {
|
99
|
-
return (_jsx(WalletConnectStandaloneConnection, { locale: locale, onBack: props.onBack, done: props.done, wallet: props.wallet, walletInfo: walletInfo.data, setModalVisibility: props.setModalVisibility }));
|
97
|
+
return (_jsx(WalletConnectStandaloneConnection, { locale: locale, onBack: props.onBack, done: props.done, wallet: props.wallet, walletInfo: walletInfo.data, setModalVisibility: props.setModalVisibility, chain: props.chain, chains: props.chains, client: props.client, size: props.size, walletConnect: props.walletConnect }));
|
100
98
|
}
|
101
99
|
if (props.wallet.id === "inApp" || props.wallet.id === "embedded") {
|
102
|
-
return (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(InAppWalletConnectUI, { wallet: props.wallet, done: props.done, goBack: props.onBack }) }));
|
100
|
+
return (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(InAppWalletConnectUI, { wallet: props.wallet, done: props.done, goBack: props.onBack, chain: props.chain, client: props.client, size: props.size, connectLocale: props.connectLocale, meta: props.meta, localeId: props.localeId }) }));
|
103
101
|
}
|
104
102
|
if (isEcosystemWallet(props.wallet.id)) {
|
105
|
-
return (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(EcosystemWalletConnectUI, { wallet: props.wallet, done: props.done, goBack: props.onBack }) }));
|
103
|
+
return (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(EcosystemWalletConnectUI, { wallet: props.wallet, done: props.done, goBack: props.onBack, chain: props.chain, client: props.client, size: props.size, meta: props.meta, localeId: props.localeId, connectLocale: props.connectLocale }) }));
|
106
104
|
}
|
107
105
|
// if can't connect in any way - show get started screen
|
108
106
|
return (_jsx(GetStartedScreen, { locale: locale, wallet: props.wallet, walletInfo: walletInfo.data, onBack: () => {
|
109
107
|
setScreen("main");
|
110
|
-
} }));
|
108
|
+
}, client: props.client }));
|
111
109
|
}
|
112
110
|
//# sourceMappingURL=AnyWalletConnectUI.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnyWalletConnectUI.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"AnyWalletConnectUI.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAMhE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAG3F,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,wBAAwB,MAAM,wDAAwD,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,GAClC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,SAA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,CACH,CAAC;AACJ,CAAC"}
|
@@ -4,7 +4,6 @@ import { useEffect, useMemo } from "react";
|
|
4
4
|
import { CustomThemeProvider, useCustomTheme, } from "../../../../core/design-system/CustomThemeProvider.js";
|
5
5
|
import { radius } 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 { useIsAutoConnecting } from "../../../hooks/wallets/useIsAutoConnecting.js";
|
@@ -58,9 +57,24 @@ export function ConnectEmbed(props) {
|
|
58
57
|
wallets,
|
59
58
|
client: props.client,
|
60
59
|
});
|
61
|
-
const modalSize =
|
62
|
-
|
63
|
-
|
60
|
+
const modalSize = useMemo(() => {
|
61
|
+
return !canFitWideModal() || wallets.length === 1
|
62
|
+
? "compact"
|
63
|
+
: props.modalSize || "compact";
|
64
|
+
}, [wallets.length, props.modalSize]);
|
65
|
+
const meta = useMemo(() => {
|
66
|
+
return {
|
67
|
+
privacyPolicyUrl: props.privacyPolicyUrl,
|
68
|
+
showThirdwebBranding: props.showThirdwebBranding !== false,
|
69
|
+
termsOfServiceUrl: props.termsOfServiceUrl,
|
70
|
+
title: undefined,
|
71
|
+
titleIconUrl: undefined,
|
72
|
+
};
|
73
|
+
}, [
|
74
|
+
props.privacyPolicyUrl,
|
75
|
+
props.showThirdwebBranding,
|
76
|
+
props.termsOfServiceUrl,
|
77
|
+
]);
|
64
78
|
const autoConnectComp = props.autoConnect !== false && (_jsx(AutoConnect, { appMetadata: props.appMetadata, client: props.client, wallets: wallets, accountAbstraction: props.accountAbstraction, timeout: typeof props.autoConnect === "boolean"
|
65
79
|
? undefined
|
66
80
|
: props.autoConnect?.timeout, onConnect: props.onConnect }));
|
@@ -68,28 +82,10 @@ export function ConnectEmbed(props) {
|
|
68
82
|
if (!localeQuery.data) {
|
69
83
|
return (_jsxs(_Fragment, { children: [autoConnectComp, _jsx(CustomThemeProvider, { theme: props.theme, children: _jsx(EmbedContainer, { modalSize: modalSize, children: _jsx(LoadingScreen, {}) }) })] }));
|
70
84
|
}
|
71
|
-
return (
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
locale: localeId,
|
76
|
-
connectLocale: localeQuery.data,
|
77
|
-
chain: props.chain || props.accountAbstraction?.chain,
|
78
|
-
chains: props.chains,
|
79
|
-
walletConnect: props.walletConnect,
|
80
|
-
accountAbstraction: props.accountAbstraction,
|
81
|
-
recommendedWallets: props.recommendedWallets,
|
82
|
-
showAllWallets: props.showAllWallets,
|
83
|
-
isEmbed: true,
|
84
|
-
connectModal: {
|
85
|
-
size: modalSize,
|
86
|
-
privacyPolicyUrl: props.privacyPolicyUrl,
|
87
|
-
showThirdwebBranding: props.showThirdwebBranding !== false,
|
88
|
-
termsOfServiceUrl: props.termsOfServiceUrl,
|
89
|
-
},
|
90
|
-
onConnect: props.onConnect,
|
91
|
-
auth: props.auth,
|
92
|
-
}, children: _jsxs(WalletUIStatesProvider, { theme: props.theme, isOpen: true, children: [_jsx(ConnectEmbedContent, { ...props, onConnect: props.onConnect }), autoConnectComp] }) }));
|
85
|
+
return (_jsxs(WalletUIStatesProvider, { theme: props.theme, isOpen: true, children: [_jsx(ConnectEmbedContent, { auth: props.auth, accountAbstraction: props.accountAbstraction, chain: props.chain || props.accountAbstraction?.chain, chains: props.chains, client: props.client, connectLocale: localeQuery.data, size: modalSize,
|
86
|
+
// TODO: no welcome screen for embed right now?
|
87
|
+
// welcomeScreen={undefined}
|
88
|
+
meta: meta, isEmbed: true, localeId: props.locale || "en_US", onConnect: props.onConnect, recommendedWallets: props.recommendedWallets, showAllWallets: props.showAllWallets, walletConnect: props.walletConnect, wallets: wallets, className: props.className, modalSize: modalSize, style: props.style }), autoConnectComp] }));
|
93
89
|
}
|
94
90
|
return _jsx("div", { children: autoConnectComp });
|
95
91
|
}
|
@@ -98,7 +94,11 @@ export function ConnectEmbed(props) {
|
|
98
94
|
*/
|
99
95
|
const ConnectEmbedContent = (props) => {
|
100
96
|
// const requiresSignIn = false;
|
101
|
-
const screenSetup = useSetupScreen(
|
97
|
+
const screenSetup = useSetupScreen({
|
98
|
+
size: props.size,
|
99
|
+
welcomeScreen: undefined,
|
100
|
+
wallets: props.wallets,
|
101
|
+
});
|
102
102
|
const { setScreen, initialScreen } = screenSetup;
|
103
103
|
const activeWallet = useActiveWallet();
|
104
104
|
const siweAuth = useSiweAuth(activeWallet, props.auth);
|
@@ -122,7 +122,10 @@ const ConnectEmbedContent = (props) => {
|
|
122
122
|
setScreen(initialScreen);
|
123
123
|
}, setModalVisibility: () => {
|
124
124
|
// no op
|
125
|
-
}
|
125
|
+
}, accountAbstraction: props.accountAbstraction, auth: props.auth, chain: props.chain, chains: props.chains, client: props.client, connectLocale: props.connectLocale, meta: props.meta, size: props.size,
|
126
|
+
// TODO: no welcome screen for embed right now?
|
127
|
+
// welcomeScreen={undefined}
|
128
|
+
welcomeScreen: undefined, isEmbed: props.isEmbed, localeId: props.localeId, onConnect: props.onConnect, recommendedWallets: props.recommendedWallets, showAllWallets: props.showAllWallets, walletConnect: props.walletConnect, wallets: props.wallets }));
|
126
129
|
}
|
127
130
|
return (_jsx(EmbedContainer, { modalSize: modalSize, className: props.className, style: props.style, children: modalSize === "wide" ? (content) : (_jsxs(DynamicHeight, { children: [" ", content, " "] })) }));
|
128
131
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConnectEmbed.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAM3C,OAAO,EACL,mBAAmB,EACnB,cAAc,GACf,MAAM,uDAAuD,CAAC;AAC/D,OAA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;SACxB;KACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use client";
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
3
3
|
import { useCallback, useEffect, useState } from "react";
|
4
|
-
import { useConnectUI } from "../../../../core/hooks/others/useWalletConnectionCtx.js";
|
5
4
|
import { useActiveAccount } from "../../../hooks/wallets/useActiveAccount.js";
|
6
5
|
import { useIsWalletModalOpen, useSetIsWalletModalOpen, useSetSelectionData, } from "../../../providers/wallet-ui-states-provider.js";
|
7
6
|
import { Modal } from "../../components/Modal.js";
|
@@ -12,13 +11,16 @@ import { useSetupScreen } from "./screen.js";
|
|
12
11
|
* @internal
|
13
12
|
*/
|
14
13
|
const ConnectModal = (props) => {
|
15
|
-
const screenSetup = useSetupScreen(
|
14
|
+
const screenSetup = useSetupScreen({
|
15
|
+
size: props.size,
|
16
|
+
welcomeScreen: props.welcomeScreen,
|
17
|
+
wallets: props.wallets,
|
18
|
+
});
|
16
19
|
const setSelectionData = useSetSelectionData();
|
17
20
|
const { screen, setScreen, initialScreen } = screenSetup;
|
18
21
|
const isWalletModalOpen = useIsWalletModalOpen();
|
19
22
|
const setIsWalletModalOpen = useSetIsWalletModalOpen();
|
20
23
|
const [hideModal, setHideModal] = useState(false);
|
21
|
-
const { connectModal } = useConnectUI();
|
22
24
|
const closeModal = useCallback(() => {
|
23
25
|
props.onClose?.();
|
24
26
|
setIsWalletModalOpen(false);
|
@@ -58,14 +60,14 @@ const ConnectModal = (props) => {
|
|
58
60
|
setScreen,
|
59
61
|
activeAccount,
|
60
62
|
]);
|
61
|
-
return (_jsx(Modal, { hide: hideModal, size:
|
63
|
+
return (_jsx(Modal, { hide: hideModal, size: props.size, open: isWalletModalOpen, setOpen: (value) => {
|
62
64
|
if (hideModal) {
|
63
65
|
return;
|
64
66
|
}
|
65
67
|
if (!value) {
|
66
68
|
closeModal();
|
67
69
|
}
|
68
|
-
}, children: _jsx(ConnectModalContent, { shouldSetActive: props.shouldSetActive, screenSetup: screenSetup, setModalVisibility: setModalVisibility, isOpen: isWalletModalOpen, onClose: closeModal }) }));
|
70
|
+
}, children: _jsx(ConnectModalContent, { shouldSetActive: props.shouldSetActive, screenSetup: screenSetup, setModalVisibility: setModalVisibility, isOpen: isWalletModalOpen, onClose: closeModal, accountAbstraction: props.accountAbstraction, auth: props.auth, client: props.client, connectLocale: props.connectLocale, size: props.size, welcomeScreen: props.welcomeScreen, meta: props.meta, isEmbed: props.isEmbed, onConnect: props.onConnect, recommendedWallets: props.recommendedWallets, wallets: props.wallets, localeId: props.localeId, chain: props.chain, showAllWallets: props.showAllWallets, chains: props.chains, walletConnect: props.walletConnect }) }));
|
69
71
|
};
|
70
72
|
export default ConnectModal;
|
71
73
|
//# sourceMappingURL=ConnectModal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConnectModal.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"ConnectModal.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC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EAC5C,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,aAAa,EAAE,KAAK,CAAC,aAAa,GAClC,GACI,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
3
3
|
import { Suspense, lazy, useCallback } from "react";
|
4
|
-
import { useSiweAuth } from "../../../../core/hooks/auth/useSiweAuth.js";
|
5
|
-
import { useConnectUI } from "../../../../core/hooks/others/useWalletConnectionCtx.js";
|
4
|
+
import { useSiweAuth, } from "../../../../core/hooks/auth/useSiweAuth.js";
|
6
5
|
import { useActiveWallet } from "../../../hooks/wallets/useActiveWallet.js";
|
7
6
|
import { useSetActiveWallet } from "../../../hooks/wallets/useSetActiveWallet.js";
|
8
7
|
import { useSetSelectionData } from "../../../providers/wallet-ui-states-provider.js";
|
@@ -22,18 +21,17 @@ const AllWalletsUI = /* @__PURE__ */ lazy(() => import("./AllWalletsUI.js"));
|
|
22
21
|
export const ConnectModalContent = (props) => {
|
23
22
|
const { setModalVisibility, onClose, shouldSetActive } = props;
|
24
23
|
const { screen, setScreen, initialScreen } = props.screenSetup;
|
25
|
-
const { wallets, accountAbstraction, auth, onConnect, connectModal, connectLocale, client, } = useConnectUI();
|
26
24
|
const setActiveWallet = useSetActiveWallet();
|
27
25
|
const setSelectionData = useSetSelectionData();
|
28
26
|
const activeWallet = useActiveWallet();
|
29
|
-
const siweAuth = useSiweAuth(activeWallet, auth);
|
27
|
+
const siweAuth = useSiweAuth(activeWallet, props.auth);
|
30
28
|
const showSignatureScreen = siweAuth.requiresAuth && !siweAuth.isLoggedIn;
|
31
29
|
const handleConnected = useCallback((wallet) => {
|
32
30
|
if (shouldSetActive) {
|
33
31
|
setActiveWallet(wallet);
|
34
32
|
}
|
35
|
-
if (onConnect) {
|
36
|
-
onConnect(wallet);
|
33
|
+
if (props.onConnect) {
|
34
|
+
props.onConnect(wallet);
|
37
35
|
}
|
38
36
|
onModalUnmount(() => {
|
39
37
|
setSelectionData({});
|
@@ -49,7 +47,7 @@ export const ConnectModalContent = (props) => {
|
|
49
47
|
}, [
|
50
48
|
setModalVisibility,
|
51
49
|
onClose,
|
52
|
-
onConnect,
|
50
|
+
props.onConnect,
|
53
51
|
setActiveWallet,
|
54
52
|
showSignatureScreen,
|
55
53
|
setScreen,
|
@@ -59,7 +57,7 @@ export const ConnectModalContent = (props) => {
|
|
59
57
|
const handleBack = useCallback(() => {
|
60
58
|
setScreen(initialScreen);
|
61
59
|
}, [setScreen, initialScreen]);
|
62
|
-
const walletList = (_jsx(WalletSelector, { title:
|
60
|
+
const walletList = (_jsx(WalletSelector, { title: props.meta.title || props.connectLocale.defaultModalTitle, wallets: props.wallets, onGetStarted: () => {
|
63
61
|
setScreen(reservedScreens.getStarted);
|
64
62
|
}, selectWallet: (newWallet) => {
|
65
63
|
if (newWallet.onConnectRequested) {
|
@@ -73,21 +71,21 @@ export const ConnectModalContent = (props) => {
|
|
73
71
|
}
|
74
72
|
}, onShowAll: () => {
|
75
73
|
setScreen(reservedScreens.showAll);
|
76
|
-
}, done: handleConnected, goBack: wallets.length > 1 ? handleBack : undefined, setModalVisibility: setModalVisibility }));
|
77
|
-
const showAll = (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(AllWalletsUI, { onBack: handleBack, onSelect: setScreen }) }));
|
78
|
-
const getStarted = _jsx(StartScreen, {});
|
79
|
-
const goBack = wallets.length > 1 ? handleBack : undefined;
|
74
|
+
}, done: handleConnected, goBack: props.wallets.length > 1 ? handleBack : undefined, setModalVisibility: setModalVisibility, client: props.client, connectLocale: props.connectLocale, isEmbed: props.isEmbed, recommendedWallets: props.recommendedWallets, accountAbstraction: props.accountAbstraction, localeId: props.localeId, chain: props.chain, showAllWallets: props.showAllWallets, chains: props.chains, walletConnect: props.walletConnect, meta: props.meta, size: props.size }));
|
75
|
+
const showAll = (_jsx(Suspense, { fallback: _jsx(LoadingScreen, {}), children: _jsx(AllWalletsUI, { onBack: handleBack, onSelect: setScreen, client: props.client, connectLocale: props.connectLocale, recommendedWallets: props.recommendedWallets, specifiedWallets: props.wallets, size: props.size }) }));
|
76
|
+
const getStarted = (_jsx(StartScreen, { client: props.client, connectLocale: props.connectLocale, meta: props.meta, welcomeScreen: props.welcomeScreen }));
|
77
|
+
const goBack = props.wallets.length > 1 ? handleBack : undefined;
|
80
78
|
const getWalletUI = (wallet) => {
|
81
|
-
if (accountAbstraction) {
|
82
|
-
return (_jsx(SmartConnectUI, { accountAbstraction: accountAbstraction, done: (smartWallet) => {
|
79
|
+
if (props.accountAbstraction) {
|
80
|
+
return (_jsx(SmartConnectUI, { accountAbstraction: props.accountAbstraction, done: (smartWallet) => {
|
83
81
|
handleConnected(smartWallet);
|
84
|
-
}, personalWallet: wallet, onBack: goBack, setModalVisibility: props.setModalVisibility }, wallet.id));
|
82
|
+
}, personalWallet: wallet, onBack: goBack, setModalVisibility: props.setModalVisibility, meta: props.meta, size: props.size, localeId: props.localeId, chain: props.chain, chains: props.chains, client: props.client, walletConnect: props.walletConnect, connectLocale: props.connectLocale }, wallet.id));
|
85
83
|
}
|
86
84
|
return (_jsx(AnyWalletConnectUI, { wallet: wallet, onBack: goBack, done: () => {
|
87
85
|
handleConnected(wallet);
|
88
|
-
}, setModalVisibility: props.setModalVisibility }, wallet.id));
|
86
|
+
}, setModalVisibility: props.setModalVisibility, chain: props.chain, chains: props.chains, client: props.client, meta: props.meta, size: props.size, localeId: props.localeId, walletConnect: props.walletConnect, connectLocale: props.connectLocale }, wallet.id));
|
89
87
|
};
|
90
|
-
const signatureScreen = (_jsx(SignatureScreen, { onDone: onClose, modalSize:
|
91
|
-
return (_jsx(ScreenSetupContext.Provider, { value: props.screenSetup, children:
|
88
|
+
const signatureScreen = (_jsx(SignatureScreen, { onDone: onClose, modalSize: props.size, termsOfServiceUrl: props.meta.termsOfServiceUrl, privacyPolicyUrl: props.meta.privacyPolicyUrl, auth: props.auth, client: props.client, connectLocale: props.connectLocale }));
|
89
|
+
return (_jsx(ScreenSetupContext.Provider, { value: props.screenSetup, children: props.size === "wide" ? (_jsx(ConnectModalWideLayout, { left: walletList, right: _jsxs(_Fragment, { children: [screen === reservedScreens.signIn && signatureScreen, screen === reservedScreens.main && getStarted, screen === reservedScreens.getStarted && getStarted, screen === reservedScreens.showAll && showAll, typeof screen !== "string" && getWalletUI(screen)] }) })) : (_jsxs(ConnectModalCompactLayout, { children: [screen === reservedScreens.signIn && signatureScreen, screen === reservedScreens.main && walletList, screen === reservedScreens.getStarted && getStarted, screen === reservedScreens.showAll && showAll, typeof screen !== "string" && getWalletUI(screen)] })) }));
|
92
90
|
};
|
93
91
|
//# sourceMappingURL=ConnectModalContent.js.map
|