thirdweb 5.31.1 → 5.32.0-nightly-931cca3a7e8f3946bdb7e40880333790387d4cef-20240702071901
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/exports/react.js +4 -4
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/exports/react.native.js +14 -6
- package/dist/cjs/exports/react.native.js.map +1 -1
- package/dist/cjs/exports/wallets/in-app.js +1 -1
- package/dist/cjs/exports/wallets/in-app.js.map +1 -1
- package/dist/cjs/pay/utils/definitions.js +17 -10
- package/dist/cjs/pay/utils/definitions.js.map +1 -1
- package/dist/cjs/react/core/hooks/connection/ConnectButtonProps.js.map +1 -0
- package/dist/cjs/react/core/hooks/connection/ConnectEmbedProps.js +3 -0
- package/dist/cjs/react/core/hooks/connection/ConnectEmbedProps.js.map +1 -0
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSendToken.js +81 -0
- package/dist/cjs/react/core/hooks/wallets/useSendToken.js.map +1 -0
- package/dist/cjs/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.js +20 -25
- package/dist/cjs/react/core/utils/defaultTokens.js.map +1 -0
- package/dist/cjs/react/core/utils/isSmartWallet.js.map +1 -0
- package/dist/cjs/react/{web/ui/ConnectWallet/icons/dataUris.js → core/utils/socialIcons.js} +19 -2
- package/dist/cjs/react/core/utils/socialIcons.js.map +1 -0
- package/dist/cjs/react/core/utils/storage.js.map +1 -0
- package/dist/cjs/react/core/utils/wallet.js +85 -0
- package/dist/cjs/react/core/utils/wallet.js.map +1 -0
- package/dist/cjs/react/native/design-system/index.js +33 -0
- package/dist/cjs/react/native/design-system/index.js.map +1 -0
- package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js +5 -1
- package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/native/hooks/wallets/useSendToken.js +31 -0
- package/dist/cjs/react/native/hooks/wallets/useSendToken.js.map +1 -0
- package/dist/cjs/react/native/ui/components/Address.js +31 -0
- package/dist/cjs/react/native/ui/components/Address.js.map +1 -0
- package/dist/cjs/react/native/ui/components/ChainIcon.js +30 -0
- package/dist/cjs/react/native/ui/components/ChainIcon.js.map +1 -0
- package/dist/cjs/react/native/ui/components/Header.js +30 -0
- package/dist/cjs/react/native/ui/components/Header.js.map +1 -0
- package/dist/cjs/react/native/ui/components/RNImage.js +43 -0
- package/dist/cjs/react/native/ui/components/RNImage.js.map +1 -0
- package/dist/cjs/react/native/ui/components/Skeleton.js +62 -0
- package/dist/cjs/react/native/ui/components/Skeleton.js.map +1 -0
- package/dist/cjs/react/native/ui/components/TokenIcon.js +16 -0
- package/dist/cjs/react/native/ui/components/TokenIcon.js.map +1 -0
- package/dist/cjs/react/native/ui/components/WalletImage.js +69 -0
- package/dist/cjs/react/native/ui/components/WalletImage.js.map +1 -0
- package/dist/cjs/react/native/ui/components/button.js +23 -8
- package/dist/cjs/react/native/ui/components/button.js.map +1 -1
- package/dist/cjs/react/native/ui/components/input.js +64 -0
- package/dist/cjs/react/native/ui/components/input.js.map +1 -0
- package/dist/cjs/react/native/ui/components/spacer.js +10 -0
- package/dist/cjs/react/native/ui/components/spacer.js.map +1 -0
- package/dist/cjs/react/native/ui/components/text.js +10 -7
- package/dist/cjs/react/native/ui/components/text.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectButton.js +106 -0
- package/dist/cjs/react/native/ui/connect/ConnectButton.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ConnectModal.js +130 -0
- package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ConnectedButton.js +42 -0
- package/dist/cjs/react/native/ui/connect/ConnectedButton.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ConnectedModal.js +175 -0
- package/dist/cjs/react/native/ui/connect/ConnectedModal.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ErrorView.js +25 -0
- package/dist/cjs/react/native/ui/connect/ErrorView.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ExternalWalletsList.js +67 -0
- package/dist/cjs/react/native/ui/connect/ExternalWalletsList.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/InAppWalletUI.js +167 -0
- package/dist/cjs/react/native/ui/connect/InAppWalletUI.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ReceiveScreen.js +42 -0
- package/dist/cjs/react/native/ui/connect/ReceiveScreen.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/SendScreen.js +82 -0
- package/dist/cjs/react/native/ui/connect/SendScreen.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/SuccessView.js +25 -0
- package/dist/cjs/react/native/ui/connect/SuccessView.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/TokenListScreen.js +59 -0
- package/dist/cjs/react/native/ui/connect/TokenListScreen.js.map +1 -0
- package/dist/cjs/react/native/ui/icons/svgs.js +236 -0
- package/dist/cjs/react/native/ui/icons/svgs.js.map +1 -0
- package/dist/cjs/react/native/ui/{TransactionButton/TrabsactionButton.js → transaction/TransactionButton.js} +1 -1
- package/dist/cjs/react/native/ui/transaction/TransactionButton.js.map +1 -0
- package/dist/cjs/react/native/wallets/defaultWallets.js +22 -0
- package/dist/cjs/react/native/wallets/defaultWallets.js.map +1 -0
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js +7 -2
- package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/web/hooks/wallets/useSendToken.js +31 -0
- package/dist/cjs/react/web/hooks/wallets/useSendToken.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +7 -51
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +0 -4
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- 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/PayWithCrypto.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/SendFunds.js +4 -15
- package/dist/cjs/react/web/ui/ConnectWallet/screens/SendFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/TokenIcon.js +2 -2
- package/dist/cjs/react/web/ui/components/TokenIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/WalletImage.js +12 -13
- package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletHeader.js +2 -2
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletHeader.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +5 -6
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js +1 -1
- package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/SocialLogin.js +1 -1
- package/dist/cjs/react/web/wallets/shared/SocialLogin.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/in-app/native/native-connector.js +3 -4
- package/dist/cjs/wallets/in-app/native/native-connector.js.map +1 -1
- package/dist/cjs/wallets/manager/index.js +3 -2
- package/dist/cjs/wallets/manager/index.js.map +1 -1
- package/dist/esm/exports/react.js +4 -3
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/exports/react.native.js +6 -2
- package/dist/esm/exports/react.native.js.map +1 -1
- package/dist/esm/exports/wallets/in-app.js +1 -1
- package/dist/esm/exports/wallets/in-app.js.map +1 -1
- package/dist/esm/pay/utils/definitions.js +15 -9
- package/dist/esm/pay/utils/definitions.js.map +1 -1
- package/dist/esm/react/core/hooks/connection/ConnectButtonProps.js.map +1 -0
- package/dist/esm/react/core/hooks/connection/ConnectEmbedProps.js +2 -0
- package/dist/esm/react/core/hooks/connection/ConnectEmbedProps.js.map +1 -0
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useSendToken.js +78 -0
- package/dist/esm/react/core/hooks/wallets/useSendToken.js.map +1 -0
- package/dist/esm/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.js +10 -15
- package/dist/esm/react/core/utils/defaultTokens.js.map +1 -0
- package/dist/esm/react/core/utils/isSmartWallet.js.map +1 -0
- package/dist/esm/react/{web/ui/ConnectWallet/icons/dataUris.js → core/utils/socialIcons.js} +18 -1
- package/dist/esm/react/core/utils/socialIcons.js.map +1 -0
- package/dist/esm/react/core/utils/storage.js.map +1 -0
- package/dist/esm/react/core/utils/wallet.js +80 -0
- package/dist/esm/react/core/utils/wallet.js.map +1 -0
- package/dist/esm/react/native/design-system/index.js +30 -0
- package/dist/esm/react/native/design-system/index.js.map +1 -0
- package/dist/esm/react/native/hooks/wallets/useAutoConnect.js +5 -1
- package/dist/esm/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/native/hooks/wallets/useSendToken.js +28 -0
- package/dist/esm/react/native/hooks/wallets/useSendToken.js.map +1 -0
- package/dist/esm/react/native/ui/components/Address.js +27 -0
- package/dist/esm/react/native/ui/components/Address.js.map +1 -0
- package/dist/esm/react/native/ui/components/ChainIcon.js +26 -0
- package/dist/esm/react/native/ui/components/ChainIcon.js.map +1 -0
- package/dist/esm/react/native/ui/components/Header.js +27 -0
- package/dist/esm/react/native/ui/components/Header.js.map +1 -0
- package/dist/esm/react/native/ui/components/RNImage.js +39 -0
- package/dist/esm/react/native/ui/components/RNImage.js.map +1 -0
- package/dist/esm/react/native/ui/components/Skeleton.js +58 -0
- package/dist/esm/react/native/ui/components/Skeleton.js.map +1 -0
- package/dist/esm/react/native/ui/components/TokenIcon.js +13 -0
- package/dist/esm/react/native/ui/components/TokenIcon.js.map +1 -0
- package/dist/esm/react/native/ui/components/WalletImage.js +65 -0
- package/dist/esm/react/native/ui/components/WalletImage.js.map +1 -0
- package/dist/esm/react/native/ui/components/button.js +24 -10
- package/dist/esm/react/native/ui/components/button.js.map +1 -1
- package/dist/esm/react/native/ui/components/input.js +60 -0
- package/dist/esm/react/native/ui/components/input.js.map +1 -0
- package/dist/esm/react/native/ui/components/spacer.js +7 -0
- package/dist/esm/react/native/ui/components/spacer.js.map +1 -0
- package/dist/esm/react/native/ui/components/text.js +10 -7
- package/dist/esm/react/native/ui/components/text.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectButton.js +103 -0
- package/dist/esm/react/native/ui/connect/ConnectButton.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ConnectModal.js +126 -0
- package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ConnectedButton.js +39 -0
- package/dist/esm/react/native/ui/connect/ConnectedButton.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ConnectedModal.js +172 -0
- package/dist/esm/react/native/ui/connect/ConnectedModal.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ErrorView.js +21 -0
- package/dist/esm/react/native/ui/connect/ErrorView.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ExternalWalletsList.js +64 -0
- package/dist/esm/react/native/ui/connect/ExternalWalletsList.js.map +1 -0
- package/dist/esm/react/native/ui/connect/InAppWalletUI.js +163 -0
- package/dist/esm/react/native/ui/connect/InAppWalletUI.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ReceiveScreen.js +38 -0
- package/dist/esm/react/native/ui/connect/ReceiveScreen.js.map +1 -0
- package/dist/esm/react/native/ui/connect/SendScreen.js +78 -0
- package/dist/esm/react/native/ui/connect/SendScreen.js.map +1 -0
- package/dist/esm/react/native/ui/connect/SuccessView.js +21 -0
- package/dist/esm/react/native/ui/connect/SuccessView.js.map +1 -0
- package/dist/esm/react/native/ui/connect/TokenListScreen.js +54 -0
- package/dist/esm/react/native/ui/connect/TokenListScreen.js.map +1 -0
- package/dist/esm/react/native/ui/icons/svgs.js +233 -0
- package/dist/esm/react/native/ui/icons/svgs.js.map +1 -0
- package/dist/esm/react/native/ui/{TransactionButton/TrabsactionButton.js → transaction/TransactionButton.js} +1 -1
- package/dist/esm/react/native/ui/transaction/TransactionButton.js.map +1 -0
- package/dist/esm/react/native/wallets/defaultWallets.js +19 -0
- package/dist/esm/react/native/wallets/defaultWallets.js.map +1 -0
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/hooks/wallets/useAutoConnect.js +7 -2
- package/dist/esm/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/web/hooks/wallets/useSendToken.js +28 -0
- package/dist/esm/react/web/hooks/wallets/useSendToken.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +7 -51
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +1 -5
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- 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/PayWithCrypto.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/SendFunds.js +5 -16
- package/dist/esm/react/web/ui/ConnectWallet/screens/SendFunds.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
- package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/TokenIcon.js +1 -1
- package/dist/esm/react/web/ui/components/WalletImage.js +3 -4
- package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletHeader.js +1 -1
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletHeader.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +2 -3
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/PassKeyLogin.js +1 -1
- package/dist/esm/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/SocialLogin.js +1 -1
- package/dist/esm/react/web/wallets/shared/SocialLogin.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/in-app/native/native-connector.js +3 -4
- package/dist/esm/wallets/in-app/native/native-connector.js.map +1 -1
- package/dist/esm/wallets/manager/index.js +3 -2
- package/dist/esm/wallets/manager/index.js.map +1 -1
- package/dist/types/exports/react.d.ts +7 -6
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/react.native.d.ts +7 -2
- package/dist/types/exports/react.native.d.ts.map +1 -1
- package/dist/types/exports/wallets/in-app.d.ts +1 -1
- package/dist/types/exports/wallets/in-app.d.ts.map +1 -1
- package/dist/types/pay/utils/definitions.d.ts +1 -0
- package/dist/types/pay/utils/definitions.d.ts.map +1 -1
- package/dist/types/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.d.ts +6 -6
- package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -0
- package/dist/types/react/core/hooks/connection/ConnectEmbedProps.d.ts +264 -0
- package/dist/types/react/core/hooks/connection/ConnectEmbedProps.d.ts.map +1 -0
- package/dist/types/react/core/hooks/connection/types.d.ts +1 -1
- package/dist/types/react/core/hooks/connection/types.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts +3 -1
- package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useSendToken.d.ts +12 -0
- package/dist/types/react/core/hooks/wallets/useSendToken.d.ts.map +1 -0
- package/dist/types/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.d.ts +1 -0
- package/dist/types/react/core/utils/defaultTokens.d.ts.map +1 -0
- package/dist/types/react/core/utils/isSmartWallet.d.ts.map +1 -0
- package/dist/types/react/{web/ui/ConnectWallet/icons/dataUris.d.ts → core/utils/socialIcons.d.ts} +17 -1
- package/dist/types/react/core/utils/socialIcons.d.ts.map +1 -0
- package/dist/types/react/core/utils/storage.d.ts +5 -0
- package/dist/types/react/core/utils/storage.d.ts.map +1 -0
- package/dist/types/react/core/utils/wallet.d.ts +26 -0
- package/dist/types/react/core/utils/wallet.d.ts.map +1 -0
- package/dist/types/react/native/design-system/index.d.ts +30 -0
- package/dist/types/react/native/design-system/index.d.ts.map +1 -0
- package/dist/types/react/native/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/{web/ui/hooks → native/hooks/wallets}/useSendToken.d.ts +18 -1
- package/dist/types/react/native/hooks/wallets/useSendToken.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/Address.d.ts +9 -0
- package/dist/types/react/native/ui/components/Address.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/ChainIcon.d.ts +11 -0
- package/dist/types/react/native/ui/components/ChainIcon.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/Header.d.ts +10 -0
- package/dist/types/react/native/ui/components/Header.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/RNImage.d.ts +10 -0
- package/dist/types/react/native/ui/components/RNImage.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/Skeleton.d.ts +11 -0
- package/dist/types/react/native/ui/components/Skeleton.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/TokenIcon.d.ts +15 -0
- package/dist/types/react/native/ui/components/TokenIcon.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/WalletImage.d.ts +9 -0
- package/dist/types/react/native/ui/components/WalletImage.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/button.d.ts +5 -1
- package/dist/types/react/native/ui/components/button.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/input.d.ts +12 -0
- package/dist/types/react/native/ui/components/input.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/spacer.d.ts +5 -0
- package/dist/types/react/native/ui/components/spacer.d.ts.map +1 -0
- package/dist/types/react/native/ui/components/text.d.ts +1 -1
- package/dist/types/react/native/ui/components/text.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectButton.d.ts +18 -0
- package/dist/types/react/native/ui/connect/ConnectButton.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts +40 -0
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ConnectedButton.d.ts +9 -0
- package/dist/types/react/native/ui/connect/ConnectedButton.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ConnectedModal.d.ts +14 -0
- package/dist/types/react/native/ui/connect/ConnectedModal.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ErrorView.d.ts +7 -0
- package/dist/types/react/native/ui/connect/ErrorView.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts +15 -0
- package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts +19 -0
- package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts +13 -0
- package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/SendScreen.d.ts +14 -0
- package/dist/types/react/native/ui/connect/SendScreen.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/SuccessView.d.ts +7 -0
- package/dist/types/react/native/ui/connect/SuccessView.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/TokenListScreen.d.ts +20 -0
- package/dist/types/react/native/ui/connect/TokenListScreen.d.ts.map +1 -0
- package/dist/types/react/native/ui/icons/svgs.d.ts +22 -0
- package/dist/types/react/native/ui/icons/svgs.d.ts.map +1 -0
- package/dist/types/react/native/ui/{TransactionButton/TrabsactionButton.d.ts → transaction/TransactionButton.d.ts} +1 -1
- package/dist/types/react/native/ui/transaction/TransactionButton.d.ts.map +1 -0
- package/dist/types/react/native/wallets/defaultWallets.d.ts +11 -0
- package/dist/types/react/native/wallets/defaultWallets.d.ts.map +1 -0
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/web/hooks/wallets/useSendToken.d.ts +28 -0
- package/dist/types/react/web/hooks/wallets/useSendToken.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +1 -267
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
- 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 +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts +1 -1
- 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 +1 -1
- 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/PayWithCrypto.d.ts +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/SendFunds.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/SignatureScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/SignatureScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts.map +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts +2 -2
- package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/SocialLogin.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/in-app/native/native-connector.d.ts.map +1 -1
- package/dist/types/wallets/manager/index.d.ts +1 -0
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/package.json +19 -3
- package/src/exports/react.native.ts +19 -5
- package/src/exports/react.ts +7 -12
- package/src/exports/wallets/in-app.ts +1 -1
- package/src/pay/utils/definitions.ts +16 -9
- package/src/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.ts +7 -10
- package/src/react/core/hooks/connection/ConnectEmbedProps.ts +285 -0
- package/src/react/core/hooks/connection/types.ts +1 -1
- package/src/react/core/hooks/transaction/useSendTransaction.ts +1 -1
- package/src/react/core/hooks/wallets/useAutoConnect.ts +1 -1
- package/src/react/core/hooks/wallets/useSendToken.ts +94 -0
- package/src/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.ts +10 -15
- package/src/react/{web/ui/ConnectWallet/icons/dataUris.ts → core/utils/socialIcons.ts} +30 -0
- package/src/react/{web/wallets/shared → core/utils}/storage.ts +2 -2
- package/src/react/core/utils/wallet.ts +101 -0
- package/src/react/native/design-system/index.ts +31 -0
- package/src/react/native/hooks/wallets/useAutoConnect.ts +5 -1
- package/src/react/native/hooks/wallets/useSendToken.ts +29 -0
- package/src/react/native/ui/components/Address.tsx +52 -0
- package/src/react/native/ui/components/ChainIcon.tsx +42 -0
- package/src/react/native/ui/components/Header.tsx +84 -0
- package/src/react/native/ui/components/RNImage.tsx +71 -0
- package/src/react/native/ui/components/Skeleton.tsx +93 -0
- package/src/react/native/ui/components/TokenIcon.tsx +31 -0
- package/src/react/native/ui/components/WalletImage.tsx +81 -0
- package/src/react/native/ui/components/button.tsx +41 -9
- package/src/react/native/ui/components/input.tsx +128 -0
- package/src/react/native/ui/components/spacer.tsx +6 -0
- package/src/react/native/ui/components/text.tsx +17 -8
- package/src/react/native/ui/connect/ConnectButton.tsx +188 -0
- package/src/react/native/ui/connect/ConnectModal.tsx +298 -0
- package/src/react/native/ui/connect/ConnectedButton.tsx +94 -0
- package/src/react/native/ui/connect/ConnectedModal.tsx +434 -0
- package/src/react/native/ui/connect/ErrorView.tsx +44 -0
- package/src/react/native/ui/connect/ExternalWalletsList.tsx +162 -0
- package/src/react/native/ui/connect/InAppWalletUI.tsx +320 -0
- package/src/react/native/ui/connect/ReceiveScreen.tsx +81 -0
- package/src/react/native/ui/connect/SendScreen.tsx +238 -0
- package/src/react/native/ui/connect/SuccessView.tsx +44 -0
- package/src/react/native/ui/connect/TokenListScreen.tsx +147 -0
- package/src/react/native/ui/icons/svgs.ts +252 -0
- package/src/react/native/wallets/defaultWallets.ts +30 -0
- package/src/react/web/hooks/transaction/useSendTransaction.tsx +2 -2
- package/src/react/web/hooks/wallets/useAutoConnect.ts +18 -8
- package/src/react/web/hooks/wallets/useSendToken.ts +29 -0
- package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/Details.tsx +26 -78
- package/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +6 -285
- package/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/SendFunds.tsx +8 -21
- package/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx +4 -1
- package/src/react/web/ui/ConnectWallet/screens/nativeToken.ts +1 -1
- package/src/react/web/ui/PayEmbed.tsx +3 -3
- package/src/react/web/ui/components/ChainIcon.tsx +0 -1
- package/src/react/web/ui/components/TokenIcon.tsx +1 -1
- package/src/react/web/ui/components/WalletImage.tsx +7 -9
- package/src/react/web/wallets/ecosystem/EcosystemWalletHeader.tsx +1 -1
- package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +6 -6
- package/src/react/web/wallets/shared/OTPLoginUI.tsx +1 -1
- package/src/react/web/wallets/shared/PassKeyLogin.tsx +1 -1
- package/src/react/web/wallets/shared/SocialLogin.tsx +1 -1
- package/src/version.ts +1 -1
- package/src/wallets/in-app/native/native-connector.ts +4 -6
- package/src/wallets/manager/index.ts +4 -2
- package/dist/cjs/react/native/ui/TransactionButton/TrabsactionButton.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButtonProps.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/defaultTokens.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/icons/dataUris.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/icons/socialLogins.js +0 -15
- package/dist/cjs/react/web/ui/ConnectWallet/icons/socialLogins.js.map +0 -1
- package/dist/cjs/react/web/ui/hooks/useSendToken.js +0 -57
- package/dist/cjs/react/web/ui/hooks/useSendToken.js.map +0 -1
- package/dist/cjs/react/web/ui/hooks/useWalletInfo.js +0 -37
- package/dist/cjs/react/web/ui/hooks/useWalletInfo.js.map +0 -1
- package/dist/cjs/react/web/utils/isSmartWallet.js.map +0 -1
- package/dist/cjs/react/web/wallets/in-app/socialIcons.js +0 -10
- package/dist/cjs/react/web/wallets/in-app/socialIcons.js.map +0 -1
- package/dist/cjs/react/web/wallets/shared/storage.js.map +0 -1
- package/dist/esm/react/native/ui/TransactionButton/TrabsactionButton.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButtonProps.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/defaultTokens.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/icons/dataUris.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/icons/socialLogins.js +0 -12
- package/dist/esm/react/web/ui/ConnectWallet/icons/socialLogins.js.map +0 -1
- package/dist/esm/react/web/ui/hooks/useSendToken.js +0 -54
- package/dist/esm/react/web/ui/hooks/useSendToken.js.map +0 -1
- package/dist/esm/react/web/ui/hooks/useWalletInfo.js +0 -33
- package/dist/esm/react/web/ui/hooks/useWalletInfo.js.map +0 -1
- package/dist/esm/react/web/utils/isSmartWallet.js.map +0 -1
- package/dist/esm/react/web/wallets/in-app/socialIcons.js +0 -7
- package/dist/esm/react/web/wallets/in-app/socialIcons.js.map +0 -1
- package/dist/esm/react/web/wallets/shared/storage.js.map +0 -1
- package/dist/types/react/native/ui/TransactionButton/TrabsactionButton.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButtonProps.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/defaultTokens.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/icons/dataUris.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/icons/socialLogins.d.ts +0 -12
- package/dist/types/react/web/ui/ConnectWallet/icons/socialLogins.d.ts.map +0 -1
- package/dist/types/react/web/ui/hooks/useSendToken.d.ts.map +0 -1
- package/dist/types/react/web/ui/hooks/useWalletInfo.d.ts +0 -13
- package/dist/types/react/web/ui/hooks/useWalletInfo.d.ts.map +0 -1
- package/dist/types/react/web/utils/isSmartWallet.d.ts.map +0 -1
- package/dist/types/react/web/wallets/in-app/socialIcons.d.ts +0 -6
- package/dist/types/react/web/wallets/in-app/socialIcons.d.ts.map +0 -1
- package/dist/types/react/web/wallets/shared/storage.d.ts +0 -5
- package/dist/types/react/web/wallets/shared/storage.d.ts.map +0 -1
- package/src/react/web/ui/ConnectWallet/icons/socialLogins.ts +0 -22
- package/src/react/web/ui/hooks/useSendToken.ts +0 -66
- package/src/react/web/ui/hooks/useWalletInfo.ts +0 -37
- package/src/react/web/wallets/in-app/socialIcons.ts +0 -11
- /package/dist/cjs/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.js +0 -0
- /package/dist/cjs/react/{web → core}/utils/isSmartWallet.js +0 -0
- /package/dist/cjs/react/{web/wallets/shared → core/utils}/storage.js +0 -0
- /package/dist/esm/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.js +0 -0
- /package/dist/esm/react/{web → core}/utils/isSmartWallet.js +0 -0
- /package/dist/esm/react/{web/wallets/shared → core/utils}/storage.js +0 -0
- /package/dist/types/react/{web → core}/utils/isSmartWallet.d.ts +0 -0
- /package/src/react/{web → core}/utils/isSmartWallet.ts +0 -0
- /package/src/react/native/ui/{TransactionButton/TrabsactionButton.tsx → transaction/TransactionButton.tsx} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spacer.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/components/spacer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,EAAkC;IAC7D,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,GAAI,CAAC;AACpD,CAAC"}
|
@@ -8,30 +8,33 @@ export function ThemedText({ style, theme, type = "default", ...rest }) {
|
|
8
8
|
type === "defaultSemiBold" ? styles.defaultSemiBold : undefined,
|
9
9
|
type === "subtitle" ? styles.subtitle : undefined,
|
10
10
|
type === "link" ? styles.link : undefined,
|
11
|
+
type === "subtext"
|
12
|
+
? { ...styles.subtext, color: theme.colors.secondaryText }
|
13
|
+
: undefined,
|
11
14
|
style,
|
12
15
|
], ...rest }));
|
13
16
|
}
|
14
17
|
const styles = StyleSheet.create({
|
15
18
|
default: {
|
16
19
|
fontSize: 16,
|
17
|
-
lineHeight: 24,
|
18
20
|
},
|
19
21
|
defaultSemiBold: {
|
20
22
|
fontSize: 16,
|
21
|
-
lineHeight: 24,
|
22
23
|
fontWeight: "600",
|
23
24
|
},
|
25
|
+
subtext: {
|
26
|
+
fontSize: 14,
|
27
|
+
},
|
24
28
|
title: {
|
25
|
-
fontSize:
|
29
|
+
fontSize: 24,
|
26
30
|
fontWeight: "bold",
|
27
|
-
lineHeight:
|
31
|
+
lineHeight: 28,
|
28
32
|
},
|
29
33
|
subtitle: {
|
30
|
-
fontSize:
|
31
|
-
fontWeight: "
|
34
|
+
fontSize: 18,
|
35
|
+
fontWeight: "600",
|
32
36
|
},
|
33
37
|
link: {
|
34
|
-
lineHeight: 30,
|
35
38
|
fontSize: 16,
|
36
39
|
},
|
37
40
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/components/text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/components/text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAchE,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,IAAI,GAAG,SAAS,EAChB,GAAG,IAAI,EACS;IAChB,OAAO,CACL,KAAC,IAAI,IACH,KAAK,EAAE;YACL,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;YACnC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YAC/C,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;YAC3C,IAAI,KAAK,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;YAC/D,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACjD,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YACzC,IAAI,KAAK,SAAS;gBAChB,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE;gBAC1D,CAAC,CAAC,SAAS;YACb,KAAK;SACN,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;KACb;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,EAAE;KACf;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC"}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useCallback, useRef, useState } from "react";
|
3
|
+
import { Animated, Dimensions, Easing, KeyboardAvoidingView, Modal, Pressable, StyleSheet, View, } from "react-native";
|
4
|
+
import { parseTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
5
|
+
import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
|
6
|
+
import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
|
7
|
+
import { useActiveWalletConnectionStatus } from "../../hooks/wallets/useActiveWalletConnectionStatus.js";
|
8
|
+
import { useAutoConnect } from "../../hooks/wallets/useAutoConnect.js";
|
9
|
+
import { ThemedButton } from "../components/button.js";
|
10
|
+
import { ThemedSpinner } from "../components/spinner.js";
|
11
|
+
import { ThemedText } from "../components/text.js";
|
12
|
+
import { ConnectModal } from "./ConnectModal.js";
|
13
|
+
import { ConnectedButton } from "./ConnectedButton.js";
|
14
|
+
import { ConnectedModal } from "./ConnectedModal.js";
|
15
|
+
/**
|
16
|
+
* A component that allows the user to connect their wallet.
|
17
|
+
* It renders a button which when clicked opens a modal to allow users to connect to wallets specified in `wallets` prop.
|
18
|
+
* @example
|
19
|
+
* ```tsx
|
20
|
+
* <ConnectButton
|
21
|
+
* client={client}
|
22
|
+
* />
|
23
|
+
* ```
|
24
|
+
* @param props
|
25
|
+
* Props for the `ConnectButton` component
|
26
|
+
*
|
27
|
+
* Refer to [ConnectButtonProps](https://portal.thirdweb.com/references/typescript/v5/ConnectButtonProps) to see the available props.
|
28
|
+
* @component
|
29
|
+
*/
|
30
|
+
export function ConnectButton(props) {
|
31
|
+
const theme = parseTheme(props.theme);
|
32
|
+
const [visible, setVisible] = useState(false);
|
33
|
+
const wallet = useActiveWallet();
|
34
|
+
const account = useActiveAccount();
|
35
|
+
const status = useActiveWalletConnectionStatus();
|
36
|
+
useAutoConnect(props);
|
37
|
+
const fadeAnim = useRef(new Animated.Value(0)); // For background opacity
|
38
|
+
const slideAnim = useRef(new Animated.Value(screenHeight)); // For bottom sheet position
|
39
|
+
const openModal = useCallback(() => {
|
40
|
+
setVisible(true);
|
41
|
+
Animated.parallel([
|
42
|
+
Animated.timing(fadeAnim.current, {
|
43
|
+
toValue: 1,
|
44
|
+
duration: 300,
|
45
|
+
useNativeDriver: true,
|
46
|
+
}),
|
47
|
+
Animated.timing(slideAnim.current, {
|
48
|
+
toValue: 0,
|
49
|
+
duration: 300,
|
50
|
+
useNativeDriver: true,
|
51
|
+
easing: Easing.out(Easing.exp),
|
52
|
+
}),
|
53
|
+
]).start();
|
54
|
+
}, []);
|
55
|
+
const closeModal = useCallback(() => {
|
56
|
+
Animated.parallel([
|
57
|
+
Animated.timing(fadeAnim.current, {
|
58
|
+
toValue: 0,
|
59
|
+
duration: 300,
|
60
|
+
useNativeDriver: true,
|
61
|
+
}),
|
62
|
+
Animated.timing(slideAnim.current, {
|
63
|
+
toValue: screenHeight,
|
64
|
+
duration: 300,
|
65
|
+
useNativeDriver: true,
|
66
|
+
easing: Easing.in(Easing.exp),
|
67
|
+
}),
|
68
|
+
]).start(() => {
|
69
|
+
setVisible(false);
|
70
|
+
fadeAnim.current.setValue(0);
|
71
|
+
slideAnim.current.setValue(screenHeight);
|
72
|
+
});
|
73
|
+
}, []);
|
74
|
+
return (_jsxs(View, { children: [wallet && account ? (_jsx(ConnectedButton, { openModal: () => openModal(), onClose: closeModal, wallet: wallet, account: account, ...props })) : (_jsx(ThemedButton, { theme: theme, onPress: () => openModal(), children: status === "connecting" ? (_jsx(_Fragment, { children: _jsx(ThemedSpinner, { color: theme.colors.primaryButtonText }) })) : (_jsx(ThemedText, { theme: theme, type: "defaultSemiBold", style: { color: theme.colors.primaryButtonText }, children: "Connect Wallet" })) })), _jsx(Modal, { visible: visible, animationType: "none", transparent: true, onRequestClose: closeModal, children: _jsxs(KeyboardAvoidingView, { behavior: "padding", style: { flex: 1 }, children: [_jsx(Animated.View, { style: [styles.modalOverlay, { opacity: fadeAnim.current }] }), _jsxs(Animated.View, { style: [
|
75
|
+
{ flex: 1, transform: [{ translateY: slideAnim.current }] },
|
76
|
+
], children: [_jsx(Pressable, { style: styles.dismissArea, onPress: closeModal }), _jsx(View, { style: styles.bottomSheetContainer, children: wallet && account ? (_jsx(ConnectedModal, { ...props, theme: theme, onClose: closeModal, containerType: "modal", wallet: wallet, account: account })) : status === "connecting" ? (_jsx(View, { style: {
|
77
|
+
flexDirection: "column",
|
78
|
+
flex: 1,
|
79
|
+
alignItems: "center",
|
80
|
+
justifyContent: "center",
|
81
|
+
}, children: _jsx(ThemedSpinner, { color: theme.colors.primaryText, size: 32 }) })) : (_jsx(ConnectModal, { ...props, theme: theme, onClose: closeModal, containerType: "modal" })) })] })] }) })] }));
|
82
|
+
}
|
83
|
+
const screenHeight = Dimensions.get("window").height;
|
84
|
+
const modalHeight = 480;
|
85
|
+
const screenWidth = Dimensions.get("window").width;
|
86
|
+
const styles = StyleSheet.create({
|
87
|
+
modalOverlay: {
|
88
|
+
position: "absolute",
|
89
|
+
width: screenWidth,
|
90
|
+
height: screenHeight,
|
91
|
+
backgroundColor: "rgba(0,0,0,0.8)",
|
92
|
+
},
|
93
|
+
dismissArea: {
|
94
|
+
width: "100%",
|
95
|
+
flex: 1,
|
96
|
+
},
|
97
|
+
bottomSheetContainer: {
|
98
|
+
height: modalHeight,
|
99
|
+
width: screenWidth,
|
100
|
+
flexDirection: "column",
|
101
|
+
},
|
102
|
+
});
|
103
|
+
//# sourceMappingURL=ConnectButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectButton.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ConnectButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,oBAAoB,EACpB,KAAK,EACL,SAAS,EACT,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,oDAAoD,CAAC;AAEhF,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,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM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ACO,IACK,GACjB,IACH,CACR,CAAC;AACJ,CAAC;AAED,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AACrD,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;AAEnD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,YAAY,EAAE;QACZ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,YAAY;QACpB,eAAe,EAAE,iBAAiB;KACnC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,CAAC;KACR;IACD,oBAAoB,EAAE;QACpB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,WAAW;QAClB,aAAa,EAAE,QAAQ;KACxB;CACF,CAAC,CAAC"}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useState } from "react";
|
3
|
+
import { Platform, StyleSheet, View } from "react-native";
|
4
|
+
import { SvgXml } from "react-native-svg";
|
5
|
+
import { parseTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
6
|
+
import { genericWalletIcon } from "../../../core/utils/socialIcons.js";
|
7
|
+
import { radius, spacing } from "../../design-system/index.js";
|
8
|
+
import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
|
9
|
+
import { useConnect } from "../../hooks/wallets/useConnect.js";
|
10
|
+
import { getDefaultWallets } from "../../wallets/defaultWallets.js";
|
11
|
+
import { Header } from "../components/Header.js";
|
12
|
+
import { ThemedButtonWithIcon } from "../components/button.js";
|
13
|
+
import { Spacer } from "../components/spacer.js";
|
14
|
+
import { ThemedText } from "../components/text.js";
|
15
|
+
import { ThemedView } from "../components/view.js";
|
16
|
+
import { TW_ICON } from "../icons/svgs.js";
|
17
|
+
import { ExternalWalletsList } from "./ExternalWalletsList.js";
|
18
|
+
import { InAppWalletUI, OtpLogin } from "./InAppWalletUI.js";
|
19
|
+
/**
|
20
|
+
* A component that allows the user to connect their wallet.
|
21
|
+
*
|
22
|
+
* it renders the same UI as the [`ConnectButton`](https://portal.thirdweb.com/react/v4/components/ConnectButton) component's modal - but directly on the page instead of being in a modal.
|
23
|
+
*
|
24
|
+
* It only renders UI if wallet is not connected
|
25
|
+
* @example
|
26
|
+
* ```tsx
|
27
|
+
* <ConnectEmbed
|
28
|
+
* client={client}
|
29
|
+
* />
|
30
|
+
* ```
|
31
|
+
* @param props -
|
32
|
+
* The props for the `ConnectEmbed` component.
|
33
|
+
*
|
34
|
+
* Refer to the [`ConnectEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps) type for more details
|
35
|
+
* @component
|
36
|
+
*/
|
37
|
+
export function ConnectEmbed(props) {
|
38
|
+
const theme = parseTheme(props.theme);
|
39
|
+
const wallet = useActiveWallet();
|
40
|
+
const adaptedProps = {
|
41
|
+
...props,
|
42
|
+
connectModal: { ...props },
|
43
|
+
};
|
44
|
+
return wallet ? null : (_jsx(ConnectModal, { ...adaptedProps, theme: theme, containerType: "embed" }));
|
45
|
+
}
|
46
|
+
export function ConnectModal(props) {
|
47
|
+
const { theme, client, containerType, accountAbstraction, onConnect } = props;
|
48
|
+
const connectMutation = useConnect({
|
49
|
+
client,
|
50
|
+
accountAbstraction,
|
51
|
+
onConnect,
|
52
|
+
});
|
53
|
+
const wallets = props.wallets || getDefaultWallets(props);
|
54
|
+
const [modalState, setModalState] = useState({ screen: "base" });
|
55
|
+
const inAppWallet = wallets.find((wallet) => wallet.id === "inApp");
|
56
|
+
const externalWallets = wallets.filter((wallet) => wallet.id !== "inApp");
|
57
|
+
const showBranding = props.connectModal?.showThirdwebBranding !== false;
|
58
|
+
let content;
|
59
|
+
switch (modalState.screen) {
|
60
|
+
case "otp": {
|
61
|
+
content = (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: props.onClose, containerType: containerType, onBack: () => setModalState({ screen: "base" }) }), _jsx(Spacer, { size: "xl" }), _jsx(View, { style: {
|
62
|
+
flexDirection: "column",
|
63
|
+
gap: spacing.md,
|
64
|
+
paddingHorizontal: containerType === "modal" ? spacing.lg : 0,
|
65
|
+
}, children: _jsx(OtpLogin, { auth: modalState.auth, wallet: modalState.wallet, client: client, setScreen: setModalState, theme: theme, connectMutation: connectMutation }) }), containerType === "modal" ? (_jsx(View, { style: { flex: 1 } })) : (_jsx(Spacer, { size: "md" }))] }));
|
66
|
+
break;
|
67
|
+
}
|
68
|
+
case "external_wallets": {
|
69
|
+
content = (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: props.onClose, containerType: containerType, onBack: () => setModalState({ screen: "base" }) }), _jsx(Spacer, { size: "lg" }), _jsx(ExternalWalletsList, { theme: theme, externalWallets: externalWallets, client: client, connectMutation: connectMutation, containerType: containerType })] }));
|
70
|
+
break;
|
71
|
+
}
|
72
|
+
default: {
|
73
|
+
content = (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: props.onClose, containerType: containerType }), inAppWallet ? (_jsxs(_Fragment, { children: [containerType === "modal" ? (_jsx(View, { style: { flex: 1 } })) : (_jsx(Spacer, { size: "lg" })), _jsxs(View, { style: {
|
74
|
+
flexDirection: "column",
|
75
|
+
gap: spacing.md,
|
76
|
+
paddingHorizontal: containerType === "modal" ? spacing.lg : 0,
|
77
|
+
}, children: [_jsx(InAppWalletUI, { wallet: inAppWallet, setScreen: setModalState, client: client, theme: theme, connectMutation: connectMutation }), externalWallets.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(OrDivider, { theme: theme }), _jsx(ThemedButtonWithIcon, { theme: theme, icon: genericWalletIcon, title: "Connect a wallet", onPress: () => setModalState({ screen: "external_wallets" }) })] })) : null] }), containerType === "modal" ? (_jsx(View, { style: { flex: 1 } })) : (_jsx(Spacer, { size: "md" }))] })) : externalWallets.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(Spacer, { size: "lg" }), _jsx(View, { style: {
|
78
|
+
flex: 1,
|
79
|
+
}, children: _jsx(ExternalWalletsList, { theme: theme, externalWallets: externalWallets, client: client, connectMutation: connectMutation, containerType: containerType }) })] })) : null] }));
|
80
|
+
}
|
81
|
+
}
|
82
|
+
return (_jsxs(ThemedView, { theme: theme, style: containerType === "modal"
|
83
|
+
? styles.modalContainer
|
84
|
+
: styles.embedContainer, children: [content, showBranding && _jsx(PoweredByThirdweb, { theme: theme })] }));
|
85
|
+
}
|
86
|
+
function OrDivider({ theme }) {
|
87
|
+
return (_jsxs(View, { style: {
|
88
|
+
flexDirection: "row",
|
89
|
+
alignItems: "center",
|
90
|
+
justifyContent: "center",
|
91
|
+
gap: spacing.lg,
|
92
|
+
}, children: [_jsx(View, { style: {
|
93
|
+
flex: 1,
|
94
|
+
height: 1,
|
95
|
+
backgroundColor: theme.colors.borderColor,
|
96
|
+
} }), _jsx(ThemedText, { theme: theme, style: { color: theme.colors.secondaryText }, children: "OR" }), _jsx(View, { style: {
|
97
|
+
flex: 1,
|
98
|
+
height: 1,
|
99
|
+
backgroundColor: theme.colors.borderColor,
|
100
|
+
} })] }));
|
101
|
+
}
|
102
|
+
function PoweredByThirdweb({ theme }) {
|
103
|
+
return (_jsxs(View, { style: {
|
104
|
+
flexDirection: "row",
|
105
|
+
justifyContent: "center",
|
106
|
+
alignItems: "center",
|
107
|
+
gap: spacing.xs,
|
108
|
+
paddingBottom: Platform.OS === "android" ? spacing.md : spacing.lg,
|
109
|
+
}, children: [_jsx(ThemedText, { theme: theme, type: "subtext", children: "Powered by" }), _jsx(SvgXml, { xml: TW_ICON, width: 22, height: 22, style: { marginBottom: -2 }, color: theme.colors.secondaryText }), _jsx(ThemedText, { theme: theme, type: "subtext", style: { fontWeight: "600" }, children: "thirdweb" })] }));
|
110
|
+
}
|
111
|
+
const styles = StyleSheet.create({
|
112
|
+
modalContainer: {
|
113
|
+
flex: 1,
|
114
|
+
width: "100%",
|
115
|
+
flexDirection: "column",
|
116
|
+
borderTopLeftRadius: radius.lg,
|
117
|
+
borderTopRightRadius: radius.lg,
|
118
|
+
},
|
119
|
+
embedContainer: {
|
120
|
+
flex: 1,
|
121
|
+
width: "100%",
|
122
|
+
flexDirection: "column",
|
123
|
+
backgroundColor: "transparent",
|
124
|
+
},
|
125
|
+
});
|
126
|
+
//# sourceMappingURL=ConnectModal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectModal.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ConnectModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,oDAAoD,CAAC;AAIhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAsB,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EA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I,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,QAAQ;QACvB,mBAAmB,EAAE,MAAM,CAAC,EAAE;QAC9B,oBAAoB,EAAE,MAAM,CAAC,EAAE;KAChC;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,QAAQ;QACvB,eAAe,EAAE,aAAa;KAC/B;CACF,CAAC,CAAC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { StyleSheet, View } from "react-native";
|
3
|
+
import { parseTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
4
|
+
import { useConnectedWalletDetails } from "../../../core/utils/wallet.js";
|
5
|
+
import { fontSize, spacing } from "../../design-system/index.js";
|
6
|
+
import { useActiveWalletChain } from "../../hooks/wallets/useActiveWalletChain.js";
|
7
|
+
import { Skeleton } from "../components/Skeleton.js";
|
8
|
+
import { WalletImage } from "../components/WalletImage.js";
|
9
|
+
import { ThemedButton } from "../components/button.js";
|
10
|
+
import { ThemedText } from "../components/text.js";
|
11
|
+
export function ConnectedButton(props) {
|
12
|
+
const theme = parseTheme(props.theme);
|
13
|
+
const { account, wallet } = props;
|
14
|
+
const walletChain = useActiveWalletChain();
|
15
|
+
const { ensAvatarQuery, addressOrENS, balanceQuery } = useConnectedWalletDetails(props.client, walletChain, account, props.detailsButton?.displayBalanceToken);
|
16
|
+
return (_jsx(ThemedButton, { theme: theme, onPress: () => {
|
17
|
+
props.openModal();
|
18
|
+
}, style: {
|
19
|
+
paddingHorizontal: spacing.md,
|
20
|
+
paddingVertical: spacing.smd,
|
21
|
+
}, children: _jsxs(View, { style: styles.row, children: [_jsx(WalletImage, { theme: theme, size: 40, wallet: wallet, ensAvatar: ensAvatarQuery.data }), _jsxs(View, { style: styles.col, children: [_jsx(ThemedText, { theme: theme, type: "defaultSemiBold", style: {
|
22
|
+
color: theme.colors.primaryButtonText,
|
23
|
+
}, children: addressOrENS }), balanceQuery.data ? (_jsxs(ThemedText, { theme: theme, type: "subtext", style: {
|
24
|
+
fontSize: fontSize.sm,
|
25
|
+
}, children: [Number(balanceQuery.data.displayValue).toFixed(3), " ", balanceQuery.data?.symbol] })) : (_jsx(Skeleton, { theme: theme, style: { width: 80, height: 16 }, color: theme.colors.secondaryText }))] })] }) }));
|
26
|
+
}
|
27
|
+
const styles = StyleSheet.create({
|
28
|
+
row: {
|
29
|
+
flexDirection: "row",
|
30
|
+
flex: 1,
|
31
|
+
gap: spacing.md,
|
32
|
+
alignItems: "center",
|
33
|
+
},
|
34
|
+
col: {
|
35
|
+
flexDirection: "column",
|
36
|
+
gap: spacing.xxs,
|
37
|
+
},
|
38
|
+
});
|
39
|
+
//# sourceMappingURL=ConnectedButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectedButton.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ConnectedButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,oDAAoD,CAAC;AAEhF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,eAAe,CAC7B,KAKC;IAED,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;I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C,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAChC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,GACjC,CACH,IACI,IACF,GACM,CAChB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,UAAU,EAAE,QAAQ;KACrB;IACD,GAAG,EAAE;QACH,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,OAAO,CAAC,GAAG;KACjB;CACF,CAAC,CAAC"}
|
@@ -0,0 +1,172 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useEffect, useState } from "react";
|
3
|
+
import { Linking, StyleSheet, TouchableOpacity, View } from "react-native";
|
4
|
+
import { getContract } from "../../../../contract/contract.js";
|
5
|
+
import { isContractDeployed } from "../../../../utils/bytecode/is-contract-deployed.js";
|
6
|
+
import { useChainQuery } from "../../../core/hooks/others/useChainQuery.js";
|
7
|
+
import { hasSmartAccount } from "../../../core/utils/isSmartWallet.js";
|
8
|
+
import { useConnectedWalletDetails } from "../../../core/utils/wallet.js";
|
9
|
+
import { fontSize, radius, spacing } from "../../design-system/index.js";
|
10
|
+
import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
|
11
|
+
import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
|
12
|
+
import { useActiveWalletChain } from "../../hooks/wallets/useActiveWalletChain.js";
|
13
|
+
import { useDisconnect } from "../../hooks/wallets/useDisconnect.js";
|
14
|
+
import { Address } from "../components/Address.js";
|
15
|
+
import { ChainIcon } from "../components/ChainIcon.js";
|
16
|
+
import { Header } from "../components/Header.js";
|
17
|
+
import { RNImage } from "../components/RNImage.js";
|
18
|
+
import { Skeleton } from "../components/Skeleton.js";
|
19
|
+
import { WalletImage } from "../components/WalletImage.js";
|
20
|
+
import { ThemedButton } from "../components/button.js";
|
21
|
+
import { Spacer } from "../components/spacer.js";
|
22
|
+
import { ThemedText } from "../components/text.js";
|
23
|
+
import { ThemedView } from "../components/view.js";
|
24
|
+
import { CLOSE_ICON, COINS_ICON, EXIT_ICON, RECEIVE_ICON, SEND_ICON, SMART_WALLET_ICON, } from "../icons/svgs.js";
|
25
|
+
import { ReceiveScreen } from "./ReceiveScreen.js";
|
26
|
+
import { SendScreen } from "./SendScreen.js";
|
27
|
+
import { TokenListScreen } from "./TokenListScreen.js";
|
28
|
+
export function ConnectedModal(props) {
|
29
|
+
const { theme, containerType, client } = props;
|
30
|
+
const [modalState, setModalState] = useState({
|
31
|
+
screen: "account",
|
32
|
+
});
|
33
|
+
let content;
|
34
|
+
switch (modalState.screen) {
|
35
|
+
case "send": {
|
36
|
+
content = (_jsx(SendScreen, { theme: theme, client: client, onClose: props.onClose, onBack: () => setModalState({ screen: "account" }), containerType: containerType, supportedTokens: props.supportedTokens }));
|
37
|
+
break;
|
38
|
+
}
|
39
|
+
case "receive": {
|
40
|
+
content = (_jsx(ReceiveScreen, { account: props.account, wallet: props.wallet, theme: theme, containerType: props.containerType, onBack: () => setModalState({ screen: "account" }), onClose: props.onClose }));
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
case "view_funds": {
|
44
|
+
content = (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: props.onClose, onBack: () => setModalState({ screen: "account" }), containerType: containerType, title: "View Funds" }), _jsx(Spacer, { size: "xl" }), _jsx(TokenListScreen, { client: client, theme: theme, supportedTokens: props.supportedTokens })] }));
|
45
|
+
break;
|
46
|
+
}
|
47
|
+
default: {
|
48
|
+
content = (_jsxs(_Fragment, { children: [props.onClose && (_jsx(TouchableOpacity, { onPress: props.onClose, style: {
|
49
|
+
padding: spacing.lg,
|
50
|
+
position: "absolute",
|
51
|
+
right: 0,
|
52
|
+
top: 0,
|
53
|
+
zIndex: 1,
|
54
|
+
}, children: _jsx(RNImage, { theme: theme, data: CLOSE_ICON, size: 24, color: theme.colors.secondaryIconColor }) })), _jsx(Spacer, { size: "xl" }), _jsx(AccountHeader, { ...props }), _jsx(Spacer, { size: "lg" }), _jsx(WalletActionsRow, { ...props, setModalState: setModalState }), _jsx(Spacer, { size: "lg" }), _jsx(WalletMenu, { ...props, setModalState: setModalState })] }));
|
55
|
+
}
|
56
|
+
}
|
57
|
+
return (_jsx(ThemedView, { theme: theme, style: containerType === "modal"
|
58
|
+
? styles.modalContainer
|
59
|
+
: styles.embedContainer, children: content }));
|
60
|
+
}
|
61
|
+
const AccountHeader = (props) => {
|
62
|
+
const { account, wallet, theme } = props;
|
63
|
+
const walletChain = useActiveWalletChain();
|
64
|
+
const { ensAvatarQuery, addressOrENS, balanceQuery } = useConnectedWalletDetails(props.client, walletChain, account, props.detailsButton?.displayBalanceToken);
|
65
|
+
return (_jsxs(View, { style: styles.accountHeaderContainer, children: [_jsx(WalletImage, { theme: theme, size: 64, wallet: wallet, ensAvatar: ensAvatarQuery.data }), _jsx(SmartAccountBadge, { client: props.client, theme: theme }), _jsx(Spacer, { size: "smd" }), _jsx(Address, { account: account, theme: theme, addressOrENS: addressOrENS }), _jsx(Spacer, { size: "xxs" }), balanceQuery.data ? (_jsxs(ThemedText, { theme: theme, type: "subtext", style: {
|
66
|
+
fontSize: fontSize.sm,
|
67
|
+
}, children: [Number(balanceQuery.data.displayValue).toFixed(3), " ", balanceQuery.data?.symbol] })) : (_jsx(Skeleton, { theme: theme, style: { width: 80, height: 16 } }))] }));
|
68
|
+
};
|
69
|
+
const WalletActionsRow = (props) => {
|
70
|
+
const { theme, setModalState } = props;
|
71
|
+
return (_jsxs(View, { style: styles.walletActionRowContainer, children: [_jsxs(ThemedButton, { theme: theme, variant: "secondary", style: styles.walletActionButton, onPress: () => setModalState({ screen: "send" }), children: [_jsx(RNImage, { theme: theme, size: 24, data: SEND_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "Send" })] }), _jsxs(ThemedButton, { theme: theme, variant: "secondary", style: styles.walletActionButton, onPress: () => setModalState({ screen: "receive" }), children: [_jsx(RNImage, { theme: theme, size: 24, data: RECEIVE_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "Receive" })] })] }));
|
72
|
+
};
|
73
|
+
const WalletMenu = (props) => {
|
74
|
+
return (_jsxs(View, { style: styles.walletMenuContainer, children: [_jsx(ChainSwitcher, { ...props }), _jsx(ViewFunds, { ...props }), _jsx(DisconnectWallet, { ...props })] }));
|
75
|
+
};
|
76
|
+
const ChainSwitcher = (props) => {
|
77
|
+
const { client, wallet, theme } = props;
|
78
|
+
const chain = wallet.getChain();
|
79
|
+
const chainQuery = useChainQuery(chain);
|
80
|
+
return (_jsxs(TouchableOpacity, { style: styles.walletMenuRow, children: [_jsx(ChainIcon, { client: client, size: 32, chain: chain, theme: theme }), chainQuery.data?.name ? (_jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: chainQuery.data?.name })) : (_jsx(Skeleton, { theme: theme, style: { width: 80, height: 16 } }))] }));
|
81
|
+
};
|
82
|
+
const ViewFunds = (props) => {
|
83
|
+
const { theme, setModalState } = props;
|
84
|
+
return (_jsxs(TouchableOpacity, { style: styles.walletMenuRow, onPress: () => setModalState({ screen: "view_funds" }), children: [_jsx(RNImage, { theme: theme, size: 32, data: COINS_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "View Funds" })] }));
|
85
|
+
};
|
86
|
+
const DisconnectWallet = (props) => {
|
87
|
+
const { wallet, theme, onClose } = props;
|
88
|
+
const { disconnect } = useDisconnect();
|
89
|
+
return (_jsxs(TouchableOpacity, { style: styles.walletMenuRow, onPress: () => {
|
90
|
+
onClose?.();
|
91
|
+
disconnect(wallet);
|
92
|
+
}, children: [_jsx(RNImage, { theme: theme, size: 32, data: EXIT_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "Disconnect Wallet" })] }));
|
93
|
+
};
|
94
|
+
function SmartAccountBadge(props) {
|
95
|
+
const activeAccount = useActiveAccount();
|
96
|
+
const activeWallet = useActiveWallet();
|
97
|
+
const isSmartWallet = hasSmartAccount(activeWallet);
|
98
|
+
const chain = useActiveWalletChain();
|
99
|
+
const { client, theme } = props;
|
100
|
+
const [isSmartWalletDeployed, setIsSmartWalletDeployed] = useState(false);
|
101
|
+
useEffect(() => {
|
102
|
+
if (activeAccount && isSmartWallet && activeAccount.address && chain) {
|
103
|
+
const contract = getContract({
|
104
|
+
address: activeAccount.address,
|
105
|
+
chain,
|
106
|
+
client,
|
107
|
+
});
|
108
|
+
isContractDeployed(contract).then((isDeployed) => {
|
109
|
+
setIsSmartWalletDeployed(isDeployed);
|
110
|
+
});
|
111
|
+
}
|
112
|
+
else {
|
113
|
+
setIsSmartWalletDeployed(false);
|
114
|
+
}
|
115
|
+
}, [activeAccount, chain, client, isSmartWallet]);
|
116
|
+
const content = (_jsxs(View, { style: {
|
117
|
+
flexDirection: "row",
|
118
|
+
alignItems: "center",
|
119
|
+
justifyContent: "center",
|
120
|
+
gap: spacing.xs,
|
121
|
+
backgroundColor: theme.colors.secondaryButtonBg,
|
122
|
+
borderRadius: radius.md,
|
123
|
+
paddingVertical: spacing.xs,
|
124
|
+
paddingLeft: spacing.sm,
|
125
|
+
paddingRight: spacing.smd,
|
126
|
+
}, children: [_jsx(RNImage, { theme: theme, data: SMART_WALLET_ICON, size: 14, color: theme.colors.accentButtonBg }), _jsx(ThemedText, { theme: theme, style: { color: theme.colors.primaryText, fontSize: fontSize.xs }, children: "Smart Account" })] }));
|
127
|
+
if (chain && activeAccount && isSmartWallet) {
|
128
|
+
return (_jsxs(_Fragment, { children: [_jsx(Spacer, { size: "smd" }), isSmartWalletDeployed ? (_jsx(TouchableOpacity, { onPress: () => Linking.openURL(`https://thirdweb.com/${chain.id}/${activeAccount.address}/account`), children: content })) : (_jsx(View, { children: content }))] }));
|
129
|
+
}
|
130
|
+
return null;
|
131
|
+
}
|
132
|
+
const styles = StyleSheet.create({
|
133
|
+
modalContainer: {
|
134
|
+
flex: 1,
|
135
|
+
width: "100%",
|
136
|
+
flexDirection: "column",
|
137
|
+
borderTopLeftRadius: radius.lg,
|
138
|
+
borderTopRightRadius: radius.lg,
|
139
|
+
},
|
140
|
+
embedContainer: {
|
141
|
+
flex: 1,
|
142
|
+
width: "100%",
|
143
|
+
flexDirection: "column",
|
144
|
+
backgroundColor: "transparent",
|
145
|
+
},
|
146
|
+
accountHeaderContainer: {
|
147
|
+
flexDirection: "column",
|
148
|
+
justifyContent: "center",
|
149
|
+
alignItems: "center",
|
150
|
+
paddingHorizontal: spacing.lg,
|
151
|
+
},
|
152
|
+
walletActionRowContainer: {
|
153
|
+
flexDirection: "row",
|
154
|
+
justifyContent: "space-evenly",
|
155
|
+
alignItems: "center",
|
156
|
+
gap: spacing.md,
|
157
|
+
paddingHorizontal: spacing.lg,
|
158
|
+
},
|
159
|
+
walletActionButton: { flex: 1, padding: spacing.smd, gap: spacing.smd },
|
160
|
+
walletMenuContainer: {
|
161
|
+
flexDirection: "column",
|
162
|
+
gap: spacing.lg,
|
163
|
+
paddingHorizontal: spacing.lg,
|
164
|
+
},
|
165
|
+
walletMenuRow: {
|
166
|
+
flexDirection: "row",
|
167
|
+
justifyContent: "flex-start",
|
168
|
+
alignItems: "center",
|
169
|
+
gap: spacing.md,
|
170
|
+
},
|
171
|
+
});
|
172
|
+
//# sourceMappingURL=ConnectedModal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectedModal.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ConnectedModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAA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AO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;IACvE,mBAAmB,EAAE;QACnB,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,iBAAiB,EAAE,OAAO,CAAC,EAAE;KAC9B;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,YAAY;QAC5B,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;KAChB;CACF,CAAC,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { StyleSheet, View } from "react-native";
|
3
|
+
import { spacing } from "../../design-system/index.js";
|
4
|
+
import { RNImage } from "../components/RNImage.js";
|
5
|
+
import { ThemedText } from "../components/text.js";
|
6
|
+
import { CLOSE_CIRCLE } from "../icons/svgs.js";
|
7
|
+
export const ErrorView = (props) => {
|
8
|
+
const { theme, title } = props;
|
9
|
+
return (_jsxs(View, { style: styles.container, children: [_jsx(RNImage, { theme: theme, data: CLOSE_CIRCLE, size: 64, color: theme.colors.danger }), _jsx(ThemedText, { type: "defaultSemiBold", theme: theme, style: { color: theme.colors.danger, textAlign: "center" }, children: title })] }));
|
10
|
+
};
|
11
|
+
const styles = StyleSheet.create({
|
12
|
+
container: {
|
13
|
+
paddingHorizontal: spacing.lg,
|
14
|
+
paddingVertical: spacing.xxl,
|
15
|
+
flexDirection: "column",
|
16
|
+
justifyContent: "center",
|
17
|
+
alignItems: "center",
|
18
|
+
gap: spacing.lg,
|
19
|
+
},
|
20
|
+
});
|
21
|
+
//# sourceMappingURL=ErrorView.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ErrorView.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ErrorView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IACjD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC3B,KAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAC1B,EACF,KAAC,UAAU,IACT,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,YAEzD,KAAK,GACK,IACR,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,iBAAiB,EAAE,OAAO,CAAC,EAAE;QAC7B,eAAe,EAAE,OAAO,CAAC,GAAG;QAC5B,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;KAChB;CACF,CAAC,CAAC"}
|