thirdweb 5.47.1 → 5.48.0
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/adapters/ethers5.js +87 -1
- package/dist/cjs/adapters/ethers5.js.map +1 -1
- package/dist/cjs/adapters/ethers6.js +85 -15
- package/dist/cjs/adapters/ethers6.js.map +1 -1
- package/dist/cjs/adapters/viem.js +117 -43
- package/dist/cjs/adapters/viem.js.map +1 -1
- package/dist/cjs/contract/actions/compiler-metadata.js.map +1 -1
- package/dist/cjs/exports/utils.js +7 -1
- package/dist/cjs/exports/utils.js.map +1 -1
- package/dist/cjs/extensions/erc721/read/getOwnedNFTs.js +1 -0
- package/dist/cjs/extensions/erc721/read/getOwnedNFTs.js.map +1 -1
- package/dist/cjs/react/core/design-system/index.js +1 -0
- package/dist/cjs/react/core/design-system/index.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +58 -1
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAddConnectedWallet.js +23 -0
- package/dist/cjs/react/core/hooks/wallets/useAddConnectedWallet.js.map +1 -0
- package/dist/cjs/react/native/ui/connect/ConnectModal.js +1 -0
- package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
- package/dist/cjs/react/native/ui/transaction/TransactionButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +62 -53
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +8 -6
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js +1 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +9 -9
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +3 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js +7 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/index.js +1 -1
- package/dist/cjs/react/web/ui/components/ChainIcon.js +3 -2
- package/dist/cjs/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/CopyAddress.js +22 -0
- package/dist/cjs/react/web/ui/components/CopyAddress.js.map +1 -0
- package/dist/cjs/react/web/ui/components/IconContainer.js +25 -0
- package/dist/cjs/react/web/ui/components/IconContainer.js.map +1 -0
- package/dist/cjs/react/web/ui/components/Modal.js +1 -1
- package/dist/cjs/react/web/ui/components/Modal.js.map +1 -1
- package/dist/cjs/react/web/ui/components/WalletImage.js +4 -11
- package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/cjs/react/web/ui/components/formElements.js +3 -3
- package/dist/cjs/react/web/ui/components/formElements.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/CountrySelector.js +1 -3
- package/dist/cjs/react/web/wallets/in-app/CountrySelector.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js +4 -0
- package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/WalletAuth.js +70 -0
- package/dist/cjs/react/web/wallets/in-app/WalletAuth.js.map +1 -0
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +9 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ErrorState.js +14 -0
- package/dist/cjs/react/web/wallets/shared/ErrorState.js.map +1 -0
- package/dist/cjs/react/web/wallets/shared/LoadingState.js +19 -0
- package/dist/cjs/react/web/wallets/shared/LoadingState.js.map +1 -0
- package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js +6 -20
- package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/de.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/de.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/en.js +2 -1
- package/dist/cjs/react/web/wallets/shared/locale/en.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/es.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/es.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/fr.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/fr.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/ja.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/ja.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/kr.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/kr.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/tl.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/tl.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/vi.js +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/vi.js.map +1 -1
- package/dist/cjs/transaction/actions/gasless/providers/biconomy.js.map +1 -1
- package/dist/cjs/transaction/actions/gasless/providers/engine.js.map +1 -1
- package/dist/cjs/transaction/actions/gasless/providers/openzeppelin.js.map +1 -1
- package/dist/cjs/transaction/prepare-contract-call.js +1 -1
- package/dist/cjs/transaction/read-contract.js +21 -2
- package/dist/cjs/transaction/read-contract.js.map +1 -1
- package/dist/cjs/utils/bigint.js +2 -0
- package/dist/cjs/utils/bigint.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/custom/smart/image.js +1 -1
- package/dist/cjs/wallets/custom/smart/image.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/authentication/getLoginPath.js +1 -1
- package/dist/cjs/wallets/in-app/core/authentication/getLoginPath.js.map +1 -1
- package/dist/cjs/wallets/manager/index.js +0 -1
- package/dist/cjs/wallets/manager/index.js.map +1 -1
- package/dist/cjs/wallets/types.js +0 -1
- package/dist/cjs/wallets/types.js.map +1 -1
- package/dist/esm/adapters/ethers5.js +87 -1
- package/dist/esm/adapters/ethers5.js.map +1 -1
- package/dist/esm/adapters/ethers6.js +85 -15
- package/dist/esm/adapters/ethers6.js.map +1 -1
- package/dist/esm/adapters/viem.js +117 -43
- package/dist/esm/adapters/viem.js.map +1 -1
- package/dist/esm/contract/actions/compiler-metadata.js.map +1 -1
- package/dist/esm/exports/utils.js +4 -0
- package/dist/esm/exports/utils.js.map +1 -1
- package/dist/esm/extensions/erc721/read/getOwnedNFTs.js +1 -0
- package/dist/esm/extensions/erc721/read/getOwnedNFTs.js.map +1 -1
- package/dist/esm/react/core/design-system/index.js +1 -0
- package/dist/esm/react/core/design-system/index.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +57 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useAddConnectedWallet.js +20 -0
- package/dist/esm/react/core/hooks/wallets/useAddConnectedWallet.js.map +1 -0
- package/dist/esm/react/native/ui/connect/ConnectModal.js +1 -1
- package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
- package/dist/esm/react/native/ui/transaction/TransactionButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +64 -55
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.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/WalletSelector.js +8 -6
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js +1 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +9 -9
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +4 -4
- package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js +7 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/index.js +1 -1
- package/dist/esm/react/web/ui/components/ChainIcon.js +3 -2
- package/dist/esm/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/CopyAddress.js +18 -0
- package/dist/esm/react/web/ui/components/CopyAddress.js.map +1 -0
- package/dist/esm/react/web/ui/components/IconContainer.js +21 -0
- package/dist/esm/react/web/ui/components/IconContainer.js.map +1 -0
- package/dist/esm/react/web/ui/components/Modal.js +1 -1
- package/dist/esm/react/web/ui/components/Modal.js.map +1 -1
- package/dist/esm/react/web/ui/components/WalletImage.js +1 -8
- package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/esm/react/web/ui/components/formElements.js +3 -3
- package/dist/esm/react/web/ui/components/formElements.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/CountrySelector.js +2 -4
- package/dist/esm/react/web/wallets/in-app/CountrySelector.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js +4 -0
- package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/WalletAuth.js +67 -0
- package/dist/esm/react/web/wallets/in-app/WalletAuth.js.map +1 -0
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +10 -2
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ErrorState.js +11 -0
- package/dist/esm/react/web/wallets/shared/ErrorState.js.map +1 -0
- package/dist/esm/react/web/wallets/shared/LoadingState.js +16 -0
- package/dist/esm/react/web/wallets/shared/LoadingState.js.map +1 -0
- package/dist/esm/react/web/wallets/shared/PassKeyLogin.js +4 -18
- package/dist/esm/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/de.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/de.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/en.js +2 -1
- package/dist/esm/react/web/wallets/shared/locale/en.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/es.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/es.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/fr.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/fr.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/ja.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/ja.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/kr.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/kr.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/tl.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/tl.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/vi.js +1 -0
- package/dist/esm/react/web/wallets/shared/locale/vi.js.map +1 -1
- package/dist/esm/transaction/actions/gasless/providers/biconomy.js.map +1 -1
- package/dist/esm/transaction/actions/gasless/providers/engine.js.map +1 -1
- package/dist/esm/transaction/actions/gasless/providers/openzeppelin.js.map +1 -1
- package/dist/esm/transaction/prepare-contract-call.js +1 -1
- package/dist/esm/transaction/read-contract.js +21 -2
- package/dist/esm/transaction/read-contract.js.map +1 -1
- package/dist/esm/utils/bigint.js +2 -0
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/custom/smart/image.js +1 -1
- package/dist/esm/wallets/custom/smart/image.js.map +1 -1
- package/dist/esm/wallets/in-app/core/authentication/getLoginPath.js +1 -1
- package/dist/esm/wallets/in-app/core/authentication/getLoginPath.js.map +1 -1
- package/dist/esm/wallets/manager/index.js +0 -1
- package/dist/esm/wallets/manager/index.js.map +1 -1
- package/dist/esm/wallets/types.js +0 -1
- package/dist/esm/wallets/types.js.map +1 -1
- package/dist/types/adapters/ethers5.d.ts +87 -1
- package/dist/types/adapters/ethers5.d.ts.map +1 -1
- package/dist/types/adapters/ethers6.d.ts +85 -15
- package/dist/types/adapters/ethers6.d.ts.map +1 -1
- package/dist/types/adapters/viem.d.ts +117 -43
- package/dist/types/adapters/viem.d.ts.map +1 -1
- package/dist/types/contract/actions/compiler-metadata.d.ts +7 -1
- package/dist/types/contract/actions/compiler-metadata.d.ts.map +1 -1
- package/dist/types/exports/transaction.d.ts +7 -0
- package/dist/types/exports/transaction.d.ts.map +1 -1
- package/dist/types/exports/utils.d.ts +1 -0
- package/dist/types/exports/utils.d.ts.map +1 -1
- package/dist/types/extensions/erc721/read/getOwnedNFTs.d.ts +1 -0
- package/dist/types/extensions/erc721/read/getOwnedNFTs.d.ts.map +1 -1
- package/dist/types/react/core/design-system/index.d.ts +1 -0
- package/dist/types/react/core/design-system/index.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts +1 -0
- package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +1 -0
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useAddConnectedWallet.d.ts +16 -0
- package/dist/types/react/core/hooks/wallets/useAddConnectedWallet.d.ts.map +1 -0
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts +3 -0
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/native/ui/transaction/TransactionButton.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/MenuButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts +1 -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.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts +1 -0
- package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts +3 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/index.d.ts +1 -1
- package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/CopyAddress.d.ts +7 -0
- package/dist/types/react/web/ui/components/CopyAddress.d.ts.map +1 -0
- package/dist/types/react/web/ui/components/IconContainer.d.ts +10 -0
- package/dist/types/react/web/ui/components/IconContainer.d.ts.map +1 -0
- package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/CountrySelector.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts +3 -0
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts +24 -0
- package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts.map +1 -0
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts +1 -0
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ErrorState.d.ts +5 -0
- package/dist/types/react/web/wallets/shared/ErrorState.d.ts.map +1 -0
- package/dist/types/react/web/wallets/shared/LoadingState.d.ts +7 -0
- package/dist/types/react/web/wallets/shared/LoadingState.d.ts.map +1 -0
- package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/de.d.ts +1 -0
- package/dist/types/react/web/wallets/shared/locale/de.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/en.d.ts +1 -0
- 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 +1 -0
- package/dist/types/react/web/wallets/shared/locale/es.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/fr.d.ts +1 -0
- package/dist/types/react/web/wallets/shared/locale/fr.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/ja.d.ts +1 -0
- package/dist/types/react/web/wallets/shared/locale/ja.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/kr.d.ts +1 -0
- package/dist/types/react/web/wallets/shared/locale/kr.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/tl.d.ts +1 -0
- 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 -0
- package/dist/types/react/web/wallets/shared/locale/types.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/vi.d.ts +1 -0
- package/dist/types/react/web/wallets/shared/locale/vi.d.ts.map +1 -1
- package/dist/types/transaction/actions/gasless/providers/biconomy.d.ts +3 -0
- package/dist/types/transaction/actions/gasless/providers/biconomy.d.ts.map +1 -1
- package/dist/types/transaction/actions/gasless/providers/engine.d.ts +3 -0
- package/dist/types/transaction/actions/gasless/providers/engine.d.ts.map +1 -1
- package/dist/types/transaction/actions/gasless/providers/openzeppelin.d.ts +3 -0
- package/dist/types/transaction/actions/gasless/providers/openzeppelin.d.ts.map +1 -1
- package/dist/types/transaction/actions/gasless/types.d.ts +12 -0
- package/dist/types/transaction/actions/gasless/types.d.ts.map +1 -1
- package/dist/types/transaction/prepare-contract-call.d.ts +1 -1
- package/dist/types/transaction/read-contract.d.ts +21 -2
- package/dist/types/transaction/read-contract.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts +2 -0
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/custom/smart/image.d.ts +1 -1
- package/dist/types/wallets/custom/smart/image.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts +2 -2
- package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/authentication/types.d.ts +1 -1
- package/dist/types/wallets/in-app/core/authentication/types.d.ts.map +1 -1
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/dist/types/wallets/types.d.ts +1 -1
- package/dist/types/wallets/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapters/ethers5.ts +87 -1
- package/src/adapters/ethers6.ts +85 -15
- package/src/adapters/viem.ts +117 -44
- package/src/contract/actions/compiler-metadata.ts +4 -2
- package/src/exports/transaction.ts +8 -0
- package/src/exports/utils.ts +5 -0
- package/src/extensions/erc721/read/getOwnedNFTs.ts +1 -0
- package/src/extensions/lens/read/resolveAddress.test.ts +1 -1
- package/src/react/core/design-system/index.ts +1 -0
- package/src/react/core/hooks/transaction/transaction-button-utils.ts +1 -0
- package/src/react/core/hooks/transaction/useSendTransaction.ts +70 -1
- package/src/react/core/hooks/wallets/useAddConnectedWallet.ts +20 -0
- package/src/react/native/ui/connect/ConnectModal.tsx +1 -1
- package/src/react/native/ui/transaction/TransactionButton.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/Details.tsx +158 -157
- package/src/react/web/ui/ConnectWallet/MenuButton.tsx +0 -1
- package/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx +4 -1
- package/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx +1 -0
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +10 -1
- package/src/react/web/ui/ConnectWallet/locale/en.ts +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.tsx +0 -6
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.tsx +10 -10
- package/src/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.tsx +8 -9
- package/src/react/web/ui/ConnectWallet/screens/LinkProfileScreen.tsx +2 -0
- package/src/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.tsx +21 -7
- package/src/react/web/ui/TransactionButton/index.tsx +1 -1
- package/src/react/web/ui/components/ChainIcon.tsx +4 -3
- package/src/react/web/ui/components/CopyAddress.tsx +34 -0
- package/src/react/web/ui/components/IconContainer.tsx +31 -0
- package/src/react/web/ui/components/Modal.tsx +1 -1
- package/src/react/web/ui/components/WalletImage.tsx +1 -8
- package/src/react/web/ui/components/formElements.tsx +3 -3
- package/src/react/web/wallets/in-app/CountrySelector.tsx +2 -8
- package/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx +18 -0
- package/src/react/web/wallets/in-app/WalletAuth.tsx +166 -0
- package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +22 -0
- package/src/react/web/wallets/shared/ErrorState.tsx +29 -0
- package/src/react/web/wallets/shared/LoadingState.tsx +47 -0
- package/src/react/web/wallets/shared/PassKeyLogin.tsx +4 -67
- package/src/react/web/wallets/shared/locale/de.ts +1 -0
- package/src/react/web/wallets/shared/locale/en.ts +2 -1
- package/src/react/web/wallets/shared/locale/es.ts +1 -0
- package/src/react/web/wallets/shared/locale/fr.ts +1 -0
- package/src/react/web/wallets/shared/locale/ja.ts +1 -0
- package/src/react/web/wallets/shared/locale/kr.ts +1 -0
- package/src/react/web/wallets/shared/locale/tl.ts +1 -0
- package/src/react/web/wallets/shared/locale/types.ts +1 -0
- package/src/react/web/wallets/shared/locale/vi.ts +1 -0
- package/src/transaction/actions/gasless/providers/biconomy.ts +3 -0
- package/src/transaction/actions/gasless/providers/engine.ts +3 -0
- package/src/transaction/actions/gasless/providers/openzeppelin.ts +3 -0
- package/src/transaction/actions/gasless/types.ts +12 -0
- package/src/transaction/prepare-contract-call.ts +1 -1
- package/src/transaction/read-contract.ts +21 -2
- package/src/utils/bigint.ts +2 -0
- package/src/version.ts +1 -1
- package/src/wallets/custom/smart/image.ts +1 -1
- package/src/wallets/in-app/core/authentication/getLoginPath.ts +4 -4
- package/src/wallets/in-app/core/authentication/types.ts +1 -1
- package/src/wallets/manager/index.ts +0 -2
- package/src/wallets/types.ts +0 -1
@@ -34,6 +34,7 @@ function AllWalletsUI(props: {
|
|
34
34
|
client: ThirdwebClient;
|
35
35
|
recommendedWallets: Wallet[] | undefined;
|
36
36
|
connectLocale: ConnectLocale;
|
37
|
+
disableSelectionDataReset?: boolean;
|
37
38
|
}) {
|
38
39
|
const { itemsToShow, lastItemRef } = useShowMore<HTMLLIElement>(10, 10);
|
39
40
|
const setSelectionData = useSetSelectionData();
|
@@ -143,7 +144,9 @@ function AllWalletsUI(props: {
|
|
143
144
|
selectWallet={() => {
|
144
145
|
const wallet = createWallet(walletInfo.id);
|
145
146
|
props.onSelect(wallet);
|
146
|
-
|
147
|
+
if (!props.disableSelectionDataReset) {
|
148
|
+
setSelectionData({});
|
149
|
+
}
|
147
150
|
}}
|
148
151
|
client={props.client}
|
149
152
|
recommendedWallets={props.recommendedWallets}
|
@@ -87,6 +87,7 @@ export type WalletSelectorProps = {
|
|
87
87
|
}
|
88
88
|
| undefined;
|
89
89
|
walletIdsToHide: WalletId[] | undefined;
|
90
|
+
disableSelectionDataReset?: boolean;
|
90
91
|
};
|
91
92
|
|
92
93
|
/**
|
@@ -278,6 +279,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
278
279
|
recommendedWallets={props.recommendedWallets}
|
279
280
|
chain={props.chain}
|
280
281
|
showAllWallets={props.showAllWallets}
|
282
|
+
diableSelectionDataReset={props.disableSelectionDataReset}
|
281
283
|
/>
|
282
284
|
);
|
283
285
|
|
@@ -305,6 +307,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
305
307
|
recommendedWallets={props.recommendedWallets}
|
306
308
|
chain={props.chain}
|
307
309
|
showAllWallets={props.showAllWallets}
|
310
|
+
diableSelectionDataReset={props.disableSelectionDataReset}
|
308
311
|
/>
|
309
312
|
);
|
310
313
|
|
@@ -348,6 +351,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
348
351
|
recommendedWallets={props.recommendedWallets}
|
349
352
|
chain={props.chain}
|
350
353
|
showAllWallets={props.showAllWallets}
|
354
|
+
diableSelectionDataReset={props.disableSelectionDataReset}
|
351
355
|
/>
|
352
356
|
{eoaWallets.length > 0 && (
|
353
357
|
<>
|
@@ -418,6 +422,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
418
422
|
recommendedWallets={props.recommendedWallets}
|
419
423
|
chain={props.chain}
|
420
424
|
showAllWallets={props.showAllWallets}
|
425
|
+
diableSelectionDataReset={props.disableSelectionDataReset}
|
421
426
|
/>
|
422
427
|
</Container>
|
423
428
|
|
@@ -456,6 +461,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
456
461
|
recommendedWallets={props.recommendedWallets}
|
457
462
|
chain={props.chain}
|
458
463
|
showAllWallets={props.showAllWallets}
|
464
|
+
diableSelectionDataReset={props.disableSelectionDataReset}
|
459
465
|
/>
|
460
466
|
);
|
461
467
|
|
@@ -578,6 +584,7 @@ const WalletSelection: React.FC<{
|
|
578
584
|
connectLocale: ConnectLocale;
|
579
585
|
client: ThirdwebClient;
|
580
586
|
chain: Chain | undefined;
|
587
|
+
diableSelectionDataReset?: boolean;
|
581
588
|
}> = (props) => {
|
582
589
|
const wallets = sortWallets(props.wallets, props.recommendedWallets);
|
583
590
|
const { screen } = useScreenContext();
|
@@ -615,7 +622,9 @@ const WalletSelection: React.FC<{
|
|
615
622
|
<WalletEntryButton
|
616
623
|
walletId={wallet.id}
|
617
624
|
selectWallet={() => {
|
618
|
-
|
625
|
+
if (!props.diableSelectionDataReset) {
|
626
|
+
setSelectionData({});
|
627
|
+
}
|
619
628
|
props.selectWallet(wallet);
|
620
629
|
}}
|
621
630
|
connectLocale={props.connectLocale}
|
@@ -12,7 +12,7 @@ const connectLocaleEn: ConnectLocale = {
|
|
12
12
|
installed: "Installed",
|
13
13
|
buy: "Buy",
|
14
14
|
continueAsGuest: "Continue as guest",
|
15
|
-
connectAWallet: "Connect a
|
15
|
+
connectAWallet: "Connect a Wallet",
|
16
16
|
newToWallets: "New to wallets?",
|
17
17
|
getStarted: "Get started",
|
18
18
|
guest: "Guest",
|
@@ -15,7 +15,6 @@ import { WalletImage } from "../../../components/WalletImage.js";
|
|
15
15
|
import { Container } from "../../../components/basic.js";
|
16
16
|
import { Button } from "../../../components/buttons.js";
|
17
17
|
import { Text } from "../../../components/text.js";
|
18
|
-
import { SmartWalletBadgeIcon } from "../../icons/SmartAccountBadgeIcon.js";
|
19
18
|
|
20
19
|
export function WalletSelectorButton(props: {
|
21
20
|
address: string;
|
@@ -107,11 +106,6 @@ export function WalletRow(props: {
|
|
107
106
|
<Text size="sm" color="primaryText">
|
108
107
|
{addressOrENS || shortenAddress(props.address)}
|
109
108
|
</Text>
|
110
|
-
{walletId === "smart" && (
|
111
|
-
<Container color="accentText" center="both">
|
112
|
-
<SmartWalletBadgeIcon size={iconSize.sm} />
|
113
|
-
</Container>
|
114
|
-
)}
|
115
109
|
</Container>
|
116
110
|
);
|
117
111
|
}
|
@@ -68,6 +68,16 @@ export function FiatFlow(props: {
|
|
68
68
|
props.openedWindow,
|
69
69
|
);
|
70
70
|
|
71
|
+
const onPostOnrampSuccess = useCallback(() => {
|
72
|
+
// report the status of fiat status instead of post onramp swap status when post onramp swap is successful
|
73
|
+
getBuyWithFiatStatus({
|
74
|
+
intentId: props.quote.intentId,
|
75
|
+
client: props.client,
|
76
|
+
}).then((status) => {
|
77
|
+
props.onSuccess(status);
|
78
|
+
});
|
79
|
+
}, [props.onSuccess, props.quote.intentId, props.client]);
|
80
|
+
|
71
81
|
if (screen.id === "step-1") {
|
72
82
|
return (
|
73
83
|
<FiatSteps
|
@@ -110,16 +120,6 @@ export function FiatFlow(props: {
|
|
110
120
|
);
|
111
121
|
}
|
112
122
|
|
113
|
-
const onPostOnrampSuccess = useCallback(() => {
|
114
|
-
// report the status of fiat status instead of post onramp swap status when post onramp swap is successful
|
115
|
-
getBuyWithFiatStatus({
|
116
|
-
intentId: props.quote.intentId,
|
117
|
-
client: props.client,
|
118
|
-
}).then((status) => {
|
119
|
-
props.onSuccess(status);
|
120
|
-
});
|
121
|
-
}, [props.onSuccess, props.quote.intentId, props.client]);
|
122
|
-
|
123
123
|
if (screen.id === "postonramp-swap") {
|
124
124
|
return (
|
125
125
|
<PostOnRampSwapFlow
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CheckIcon,
|
1
|
+
import { CheckIcon, MinusIcon, PlusIcon } from "@radix-ui/react-icons";
|
2
2
|
import { useState } from "react";
|
3
3
|
import type { Chain } from "../../../../../../chains/types.js";
|
4
4
|
import type { ThirdwebClient } from "../../../../../../client/client.js";
|
@@ -148,20 +148,19 @@ function WalletManangerButton(props: {
|
|
148
148
|
justifyContent: "space-between",
|
149
149
|
}}
|
150
150
|
>
|
151
|
-
<Container flex="row" gap="
|
152
|
-
<WalletImage client={props.client} id={walletId} size={iconSize.
|
151
|
+
<Container flex="row" gap="md" center="y">
|
152
|
+
<WalletImage client={props.client} id={walletId} size={iconSize.lg} />
|
153
153
|
|
154
|
-
<
|
154
|
+
<Container flex="column" gap="4xs">
|
155
155
|
<Text color="primaryText">{shortenAddress(address || "")}</Text>
|
156
|
-
<Spacer y="xxs" />
|
157
156
|
{balanceQuery.data ? (
|
158
|
-
<Text size="
|
157
|
+
<Text size="xs" color="secondaryText" weight={400}>
|
159
158
|
{formatTokenBalance(balanceQuery.data)}
|
160
159
|
</Text>
|
161
160
|
) : (
|
162
161
|
<Skeleton width="100px" height={fontSize.sm} />
|
163
162
|
)}
|
164
|
-
</
|
163
|
+
</Container>
|
165
164
|
</Container>
|
166
165
|
</WalletButtonEl>
|
167
166
|
|
@@ -187,11 +186,11 @@ function WalletManangerButton(props: {
|
|
187
186
|
disconnect(props.wallet);
|
188
187
|
}}
|
189
188
|
>
|
190
|
-
<
|
189
|
+
<MinusIcon
|
191
190
|
width={iconSize.md}
|
192
191
|
height={iconSize.md}
|
193
192
|
style={{
|
194
|
-
color: theme.colors.
|
193
|
+
color: theme.colors.secondaryText,
|
195
194
|
}}
|
196
195
|
/>
|
197
196
|
</IconButton>
|
@@ -23,6 +23,7 @@ export function LinkProfileScreen(props: {
|
|
23
23
|
onBack: () => void;
|
24
24
|
locale: ConnectLocale;
|
25
25
|
client: ThirdwebClient;
|
26
|
+
walletConnect: { projectId?: string } | undefined;
|
26
27
|
}) {
|
27
28
|
const activeWallet = useActiveWallet();
|
28
29
|
const chain = useActiveWalletChain();
|
@@ -36,6 +37,7 @@ export function LinkProfileScreen(props: {
|
|
36
37
|
return (
|
37
38
|
<Suspense fallback={<LoadingScreen />}>
|
38
39
|
<InAppWalletConnectUI
|
40
|
+
walletConnect={props.walletConnect}
|
39
41
|
wallet={activeWallet as Wallet<"inApp">}
|
40
42
|
done={() => {
|
41
43
|
queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
@@ -10,6 +10,7 @@ import { Img } from "../../components/Img.js";
|
|
10
10
|
import { Spacer } from "../../components/Spacer.js";
|
11
11
|
import { Container, Line, ModalHeader } from "../../components/basic.js";
|
12
12
|
import { Text } from "../../components/text.js";
|
13
|
+
import { Blobbie } from "../Blobbie.js";
|
13
14
|
import { MenuButton } from "../MenuButton.js";
|
14
15
|
import { AddUserIcon } from "../icons/AddUserIcon.js";
|
15
16
|
import type { ConnectLocale } from "../locale/types.js";
|
@@ -98,13 +99,26 @@ export function LinkedProfilesScreen(props: {
|
|
98
99
|
}}
|
99
100
|
disabled // disabled until we have more data to show on a dedicated profile screen
|
100
101
|
>
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
102
|
+
{profile.type === "wallet" && profile.details.address ? (
|
103
|
+
<Container
|
104
|
+
style={{
|
105
|
+
width: "24px",
|
106
|
+
height: "24px",
|
107
|
+
borderRadius: "100%",
|
108
|
+
overflow: "hidden",
|
109
|
+
}}
|
110
|
+
>
|
111
|
+
<Blobbie address={profile.details.address} size={24} />
|
112
|
+
</Container>
|
113
|
+
) : (
|
114
|
+
<Img
|
115
|
+
src={getWalletIcon(profile.type)}
|
116
|
+
width={iconSize.md}
|
117
|
+
height={iconSize.md}
|
118
|
+
loading="eager"
|
119
|
+
client={props.client}
|
120
|
+
/>
|
121
|
+
)}
|
108
122
|
<Text color="primaryText">
|
109
123
|
{getProfileDisplayName(profile)}
|
110
124
|
</Text>
|
@@ -11,7 +11,7 @@ import { Button } from "../components/buttons.js";
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* TransactionButton component is used to render a button that triggers a transaction.
|
14
|
-
*
|
14
|
+
* It shows a "Switch Network" button if the connected wallet is on a different chain than the transaction.
|
15
15
|
* @param props - The props for this component.
|
16
16
|
* Refer to [TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps) for details.
|
17
17
|
* @example
|
@@ -2,6 +2,7 @@ import type { ThirdwebClient } from "../../../../client/client.js";
|
|
2
2
|
import { resolveScheme } from "../../../../utils/ipfs.js";
|
3
3
|
import { StyledDiv } from "../design-system/elements.js";
|
4
4
|
import { Img } from "./Img.js";
|
5
|
+
import { Container } from "./basic.js";
|
5
6
|
|
6
7
|
export const fallbackChainIcon =
|
7
8
|
"data:image/svg+xml;charset=UTF-8,%3csvg width='15' height='14' viewBox='0 0 15 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7 8.04238e-07C5.1435 8.04238e-07 3.36301 0.737501 2.05025 2.05025C0.7375 3.36301 0 5.1435 0 7C0 7.225 -1.52737e-07 7.445 0.0349998 7.665C0.16385 9.0151 0.68213 10.2988 1.52686 11.3598C2.37158 12.4209 3.50637 13.2137 4.79326 13.642C6.0801 14.0702 7.4637 14.1153 8.7758 13.7719C10.0879 13.4285 11.2719 12.7113 12.184 11.7075C13.0961 10.7038 13.6969 9.4567 13.9135 8.1178C14.1301 6.7789 13.9531 5.406 13.4039 4.16587C12.8548 2.92574 11.9573 1.87184 10.8204 1.13228C9.6835 0.392721 8.3563 -0.000649196 7 8.04238e-07ZM7 1C8.581 1.00137 10.0975 1.62668 11.22 2.74V3.24C9.2438 2.55991 7.0956 2.56872 5.125 3.265C4.96758 3.1116 4.76997 3.00586 4.555 2.96H4.43C4.37 2.75 4.315 2.54 4.27 2.325C4.225 2.11 4.2 1.92 4.175 1.715C5.043 1.24658 6.0137 1.00091 7 1ZM5.5 3.935C7.3158 3.32693 9.2838 3.34984 11.085 4C10.8414 5.2703 10.3094 6.4677 9.53 7.5C9.312 7.4077 9.0707 7.3855 8.8395 7.4366C8.6083 7.4877 8.3988 7.6094 8.24 7.785C8.065 7.685 7.89 7.585 7.74 7.47C6.7307 6.7966 5.8877 5.9023 5.275 4.855C5.374 4.73221 5.4461 4.58996 5.4866 4.43749C5.5271 4.28502 5.5351 4.12575 5.51 3.97L5.5 3.935ZM3.5 2.135C3.5 2.24 3.53 2.35 3.55 2.455C3.595 2.675 3.655 2.89 3.715 3.105C3.52353 3.21838 3.36943 3.38531 3.2717 3.58522C3.17397 3.78513 3.13688 4.00927 3.165 4.23C2.37575 4.7454 1.67078 5.3795 1.075 6.11C1.19455 5.3189 1.47112 4.55966 1.88843 3.87701C2.30575 3.19437 2.85539 2.60208 3.505 2.135H3.5ZM3.5 9.99C3.30481 10.0555 3.13037 10.1714 2.9943 10.3259C2.85822 10.4804 2.76533 10.6681 2.725 10.87H2.405C1.59754 9.9069 1.1146 8.7136 1.025 7.46L1.08 7.365C1.70611 6.3942 2.52463 5.562 3.485 4.92C3.62899 5.0704 3.81094 5.179 4.01162 5.2345C4.2123 5.2899 4.42423 5.2901 4.625 5.235C5.2938 6.3652 6.208 7.3306 7.3 8.06C7.505 8.195 7.715 8.32 7.925 8.44C7.9082 8.6312 7.9391 8.8237 8.015 9C7.1 9.7266 6.0445 10.256 4.915 10.555C4.78401 10.3103 4.57028 10.1201 4.31199 10.0184C4.05369 9.9167 3.76766 9.9102 3.505 10L3.5 9.99ZM7 12.99C5.9831 12.9903 4.98307 12.7304 4.095 12.235L4.235 12.205C4.43397 12.1397 4.61176 12.0222 4.74984 11.8648C4.88792 11.7074 4.98122 11.5158 5.02 11.31C6.2985 10.984 7.4921 10.3872 8.52 9.56C8.7642 9.7027 9.0525 9.75 9.3295 9.6927C9.6064 9.6355 9.8524 9.4778 10.02 9.25C10.7254 9.4334 11.4511 9.5275 12.18 9.53H12.445C11.9626 10.5673 11.1938 11.4451 10.2291 12.0599C9.2643 12.6747 8.144 13.0009 7 13V12.99ZM10.255 8.54C10.2545 8.3304 10.1975 8.1249 10.09 7.945C10.9221 6.8581 11.5012 5.5991 11.785 4.26C12.035 4.37667 12.2817 4.50667 12.525 4.65C13.0749 5.9495 13.1493 7.4012 12.735 8.75C11.9049 8.8142 11.0698 8.7484 10.26 8.555L10.255 8.54Z' fill='%23646D7A'/%3e%3c/svg%3e";
|
@@ -33,7 +34,7 @@ export const ChainIcon: React.FC<{
|
|
33
34
|
};
|
34
35
|
|
35
36
|
return (
|
36
|
-
<
|
37
|
+
<Container
|
37
38
|
style={{
|
38
39
|
position: "relative",
|
39
40
|
display: "flex",
|
@@ -49,7 +50,7 @@ export const ChainIcon: React.FC<{
|
|
49
50
|
client={props.client}
|
50
51
|
/>
|
51
52
|
{props.active && <ActiveDot />}
|
52
|
-
</
|
53
|
+
</Container>
|
53
54
|
);
|
54
55
|
};
|
55
56
|
|
@@ -58,7 +59,7 @@ const ActiveDot = /* @__PURE__ */ StyledDiv({
|
|
58
59
|
height: "28%",
|
59
60
|
borderRadius: "50%",
|
60
61
|
position: "absolute",
|
61
|
-
|
62
|
+
bottom: 0,
|
62
63
|
right: 0,
|
63
64
|
backgroundColor: "#00d395",
|
64
65
|
boxShadow: "0 0 0 2px var(--bg)",
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use client";
|
2
|
+
import { spacing } from "../../../core/design-system/index.js";
|
3
|
+
import { useClipboard } from "../hooks/useCopyClipboard.js";
|
4
|
+
import { IconButton } from "./buttons.js";
|
5
|
+
import { Text } from "./text.js";
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
export const CopyAddress: React.FC<{
|
11
|
+
addressOrEns: string;
|
12
|
+
}> = (props) => {
|
13
|
+
const { hasCopied, onCopy } = useClipboard(props.addressOrEns);
|
14
|
+
|
15
|
+
return (
|
16
|
+
<IconButton
|
17
|
+
onKeyDown={(e) => {
|
18
|
+
if (e.key === "Enter" || e.key === " ") {
|
19
|
+
onCopy();
|
20
|
+
}
|
21
|
+
}}
|
22
|
+
onClick={onCopy}
|
23
|
+
style={{ padding: `${spacing["4xs"]} ${spacing.xxs}` }}
|
24
|
+
>
|
25
|
+
<Text
|
26
|
+
color={hasCopied ? "primaryText" : "secondaryText"}
|
27
|
+
weight={400}
|
28
|
+
size="sm"
|
29
|
+
>
|
30
|
+
{hasCopied ? "Copied address!" : props.addressOrEns}
|
31
|
+
</Text>
|
32
|
+
</IconButton>
|
33
|
+
);
|
34
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { ReactNode } from "react";
|
2
|
+
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @internal
|
6
|
+
*/
|
7
|
+
export const IconContainer: React.FC<{
|
8
|
+
children: ReactNode | ReactNode[];
|
9
|
+
padding?: string;
|
10
|
+
style?: React.CSSProperties;
|
11
|
+
}> = (props) => {
|
12
|
+
const theme = useCustomTheme();
|
13
|
+
return (
|
14
|
+
<div
|
15
|
+
style={{
|
16
|
+
position: "relative",
|
17
|
+
overflow: "hidden",
|
18
|
+
display: "flex",
|
19
|
+
justifyItems: "center",
|
20
|
+
flexShrink: 0,
|
21
|
+
alignItems: "center",
|
22
|
+
padding: props.padding ?? "6px",
|
23
|
+
borderRadius: "100%",
|
24
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
25
|
+
...props.style,
|
26
|
+
}}
|
27
|
+
>
|
28
|
+
{props.children}
|
29
|
+
</div>
|
30
|
+
);
|
31
|
+
};
|
@@ -114,7 +114,7 @@ export const Modal: React.FC<{
|
|
114
114
|
{!props.hideCloseIcon && (
|
115
115
|
<CrossContainer>
|
116
116
|
<Dialog.Close asChild>
|
117
|
-
<IconButton type="button" aria-label="Close">
|
117
|
+
<IconButton autoFocus type="button" aria-label="Close">
|
118
118
|
<Cross2Icon
|
119
119
|
width={iconSize.md}
|
120
120
|
height={iconSize.md}
|
@@ -4,7 +4,6 @@ import type { ThirdwebClient } from "../../../../client/client.js";
|
|
4
4
|
import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
|
5
5
|
import { getWalletInfo } from "../../../../wallets/__generated__/getWalletInfo.js";
|
6
6
|
import { getInstalledWalletProviders } from "../../../../wallets/injected/mipdStore.js";
|
7
|
-
import { getStoredActiveWalletId } from "../../../../wallets/manager/index.js";
|
8
7
|
import type { WalletId } from "../../../../wallets/wallet-types.js";
|
9
8
|
import { radius } from "../../../core/design-system/index.js";
|
10
9
|
import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js";
|
@@ -33,13 +32,7 @@ export function WalletImage(props: {
|
|
33
32
|
// show auth provider icon for in-app wallets
|
34
33
|
// show the admin EOA icon for smart
|
35
34
|
const storage = webLocalStorage;
|
36
|
-
|
37
|
-
if (props.id === "smart") {
|
38
|
-
const storedId = await getStoredActiveWalletId(storage);
|
39
|
-
if (storedId) {
|
40
|
-
activeEOAId = storedId;
|
41
|
-
}
|
42
|
-
}
|
35
|
+
const activeEOAId = props.id;
|
43
36
|
let image: string | undefined;
|
44
37
|
|
45
38
|
if (
|
@@ -110,16 +110,16 @@ export const InputContainer = /* @__PURE__ */ StyledDiv(() => {
|
|
110
110
|
return {
|
111
111
|
display: "flex",
|
112
112
|
borderRadius: radius.md,
|
113
|
-
boxShadow: `0 0 0px
|
113
|
+
boxShadow: `0 0 0px 1px ${theme.colors.borderColor}`,
|
114
114
|
"&:focus-within": {
|
115
|
-
boxShadow: `0 0 0px
|
115
|
+
boxShadow: `0 0 0px 1px ${theme.colors.accentText}`,
|
116
116
|
},
|
117
117
|
"input:focus": {
|
118
118
|
boxShadow: "none",
|
119
119
|
},
|
120
120
|
// show error ring on container instead of input
|
121
121
|
"&[data-error='true']": {
|
122
|
-
boxShadow: `0 0 0px
|
122
|
+
boxShadow: `0 0 0px 1px ${theme.colors.danger}`,
|
123
123
|
},
|
124
124
|
};
|
125
125
|
});
|
@@ -2,11 +2,7 @@
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
3
3
|
import { useRef } from "react";
|
4
4
|
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
5
|
-
import {
|
6
|
-
fontSize,
|
7
|
-
radius,
|
8
|
-
spacing,
|
9
|
-
} from "../../../core/design-system/index.js";
|
5
|
+
import { radius, spacing } from "../../../core/design-system/index.js";
|
10
6
|
import { StyledOption, StyledSelect } from "../../ui/design-system/elements.js";
|
11
7
|
|
12
8
|
export function CountrySelector({
|
@@ -47,8 +43,7 @@ export function CountrySelector({
|
|
47
43
|
setCountryCode(e.target.value);
|
48
44
|
}}
|
49
45
|
style={{
|
50
|
-
|
51
|
-
paddingRight: "0",
|
46
|
+
padding: `${spacing.sm} ${spacing.md}`,
|
52
47
|
}}
|
53
48
|
>
|
54
49
|
<Option
|
@@ -89,7 +84,6 @@ const Option = /* @__PURE__ */ StyledOption(() => {
|
|
89
84
|
const Select = /* @__PURE__ */ StyledSelect((_) => {
|
90
85
|
const theme = useCustomTheme();
|
91
86
|
return {
|
92
|
-
fontSize: fontSize.sm,
|
93
87
|
display: "block",
|
94
88
|
padding: spacing.sm,
|
95
89
|
boxSizing: "border-box",
|
@@ -14,6 +14,7 @@ import { OTPLoginUI } from "../shared/OTPLoginUI.js";
|
|
14
14
|
import { PassKeyLogin } from "../shared/PassKeyLogin.js";
|
15
15
|
import { SocialLogin } from "../shared/SocialLogin.js";
|
16
16
|
import { InAppWalletFormUIScreen } from "./InAppWalletFormUI.js";
|
17
|
+
import { WalletAuth } from "./WalletAuth.js";
|
17
18
|
import { useInAppWalletLocale } from "./useInAppWalletLocale.js";
|
18
19
|
|
19
20
|
/**
|
@@ -36,6 +37,7 @@ function InAppWalletConnectUI(props: {
|
|
36
37
|
chain: Chain | undefined;
|
37
38
|
connectLocale: ConnectLocale;
|
38
39
|
isLinking?: boolean;
|
40
|
+
walletConnect: { projectId?: string } | undefined;
|
39
41
|
}) {
|
40
42
|
const data = useSelectionData();
|
41
43
|
const setSelectionData = useSetSelectionData();
|
@@ -99,6 +101,22 @@ function InAppWalletConnectUI(props: {
|
|
99
101
|
);
|
100
102
|
}
|
101
103
|
|
104
|
+
if (state?.walletLogin) {
|
105
|
+
return (
|
106
|
+
<WalletAuth
|
107
|
+
meta={props.meta}
|
108
|
+
inAppLocale={locale}
|
109
|
+
walletConnect={props.walletConnect}
|
110
|
+
wallet={props.wallet}
|
111
|
+
client={props.client}
|
112
|
+
size={props.size}
|
113
|
+
done={done}
|
114
|
+
onBack={goBackToMain || (() => setSelectionData({}))}
|
115
|
+
locale={props.connectLocale}
|
116
|
+
/>
|
117
|
+
);
|
118
|
+
}
|
119
|
+
|
102
120
|
if (state?.socialLogin) {
|
103
121
|
return (
|
104
122
|
<SocialLogin
|
@@ -0,0 +1,166 @@
|
|
1
|
+
import { Suspense, useRef, useState } from "react";
|
2
|
+
import { defineChain } from "../../../../chains/utils.js";
|
3
|
+
import type { ThirdwebClient } from "../../../../client/client.js";
|
4
|
+
import { linkProfile } from "../../../../wallets/in-app/core/wallet/profiles.js";
|
5
|
+
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
6
|
+
import { iconSize } from "../../../core/design-system/index.js";
|
7
|
+
import { useAddConnectedWallet } from "../../../core/hooks/wallets/useAddConnectedWallet.js";
|
8
|
+
import AllWalletsUI from "../../ui/ConnectWallet/Modal/AllWalletsUI.js";
|
9
|
+
import { WalletSelector } from "../../ui/ConnectWallet/WalletSelector.js";
|
10
|
+
import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
|
11
|
+
import { Spacer } from "../../ui/components/Spacer.js";
|
12
|
+
import { WalletImage } from "../../ui/components/WalletImage.js";
|
13
|
+
import { Container, ModalHeader } from "../../ui/components/basic.js";
|
14
|
+
import { getDefaultWallets } from "../defaultWallets.js";
|
15
|
+
import { ErrorState } from "../shared/ErrorState.js";
|
16
|
+
import { LoadingScreen } from "../shared/LoadingScreen.js";
|
17
|
+
import { LoadingState } from "../shared/LoadingState.js";
|
18
|
+
import type { InAppWalletLocale } from "../shared/locale/types.js";
|
19
|
+
|
20
|
+
export function WalletAuth(props: {
|
21
|
+
wallet: Wallet<"inApp">;
|
22
|
+
client: ThirdwebClient;
|
23
|
+
done: () => void;
|
24
|
+
size: "compact" | "wide";
|
25
|
+
locale: ConnectLocale;
|
26
|
+
inAppLocale: InAppWalletLocale;
|
27
|
+
onBack: () => void;
|
28
|
+
walletConnect: { projectId?: string } | undefined;
|
29
|
+
meta?: {
|
30
|
+
title?: string;
|
31
|
+
titleIconUrl?: string;
|
32
|
+
showThirdwebBranding?: boolean;
|
33
|
+
termsOfServiceUrl?: string;
|
34
|
+
privacyPolicyUrl?: string;
|
35
|
+
};
|
36
|
+
}) {
|
37
|
+
const { wallet, done } = props;
|
38
|
+
const addConnectedWallet = useAddConnectedWallet();
|
39
|
+
const walletToConnect = useRef<Wallet>();
|
40
|
+
const [status, setStatus] = useState<"loading" | "error" | "selecting">(
|
41
|
+
"selecting",
|
42
|
+
);
|
43
|
+
const [error, setError] = useState<string | undefined>();
|
44
|
+
const [showAll, setShowAll] = useState<boolean>(false);
|
45
|
+
|
46
|
+
const back = () => {
|
47
|
+
setStatus("selecting");
|
48
|
+
walletToConnect.current = undefined;
|
49
|
+
props.onBack();
|
50
|
+
};
|
51
|
+
|
52
|
+
async function login(walletToLink: Wallet) {
|
53
|
+
setStatus("loading");
|
54
|
+
walletToConnect.current = walletToLink;
|
55
|
+
try {
|
56
|
+
await linkProfile(wallet as Wallet<"inApp">, {
|
57
|
+
strategy: "wallet",
|
58
|
+
wallet: walletToLink,
|
59
|
+
chain: wallet.getChain() || defineChain(1),
|
60
|
+
}).catch((e) => {
|
61
|
+
setError(e.message);
|
62
|
+
throw e;
|
63
|
+
});
|
64
|
+
addConnectedWallet(walletToLink);
|
65
|
+
done();
|
66
|
+
} catch {
|
67
|
+
setStatus("error");
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
if (!walletToConnect.current) {
|
72
|
+
if (showAll) {
|
73
|
+
return (
|
74
|
+
<Suspense fallback={<LoadingScreen />}>
|
75
|
+
<AllWalletsUI
|
76
|
+
onBack={() => setShowAll(false)}
|
77
|
+
onSelect={async (newWallet) => {
|
78
|
+
login(newWallet);
|
79
|
+
setShowAll(false);
|
80
|
+
}}
|
81
|
+
client={props.client}
|
82
|
+
connectLocale={props.locale}
|
83
|
+
recommendedWallets={undefined}
|
84
|
+
specifiedWallets={[]}
|
85
|
+
size={props.size}
|
86
|
+
disableSelectionDataReset={true}
|
87
|
+
/>
|
88
|
+
</Suspense>
|
89
|
+
);
|
90
|
+
}
|
91
|
+
return (
|
92
|
+
<WalletSelector
|
93
|
+
title={props.locale.connectAWallet}
|
94
|
+
wallets={getDefaultWallets()}
|
95
|
+
selectWallet={async (newWallet) => {
|
96
|
+
login(newWallet);
|
97
|
+
}}
|
98
|
+
onShowAll={() => {
|
99
|
+
setShowAll(true);
|
100
|
+
}}
|
101
|
+
done={() => {}}
|
102
|
+
goBack={back}
|
103
|
+
setModalVisibility={() => {}}
|
104
|
+
client={props.client}
|
105
|
+
connectLocale={props.locale}
|
106
|
+
isEmbed={false}
|
107
|
+
recommendedWallets={undefined}
|
108
|
+
chain={wallet.getChain()}
|
109
|
+
showAllWallets={true}
|
110
|
+
chains={[]}
|
111
|
+
size={props.size}
|
112
|
+
meta={props.meta || {}}
|
113
|
+
walletConnect={props.walletConnect}
|
114
|
+
modalHeader={{ title: props.inAppLocale.linkWallet, onBack: back }}
|
115
|
+
walletIdsToHide={["inApp"]}
|
116
|
+
disableSelectionDataReset={true}
|
117
|
+
/>
|
118
|
+
);
|
119
|
+
}
|
120
|
+
|
121
|
+
return (
|
122
|
+
<Container animate="fadein" fullHeight flex="column">
|
123
|
+
<Container p="lg">
|
124
|
+
<ModalHeader title={props.inAppLocale.linkWallet} onBack={back} />
|
125
|
+
</Container>
|
126
|
+
|
127
|
+
<Container
|
128
|
+
px={props.size === "wide" ? "xxl" : "lg"}
|
129
|
+
expand
|
130
|
+
flex="column"
|
131
|
+
center="y"
|
132
|
+
>
|
133
|
+
<div>
|
134
|
+
{status === "error" ? (
|
135
|
+
<>
|
136
|
+
<ErrorState
|
137
|
+
onTryAgain={() => {
|
138
|
+
if (!walletToConnect.current) {
|
139
|
+
throw new Error("Failed to connect to unknown wallet");
|
140
|
+
}
|
141
|
+
login(walletToConnect.current);
|
142
|
+
}}
|
143
|
+
title={error || "Failed to Login"}
|
144
|
+
/>
|
145
|
+
<Spacer y="lg" />
|
146
|
+
</>
|
147
|
+
) : (
|
148
|
+
<>
|
149
|
+
<LoadingState
|
150
|
+
title="Sign in with your wallet"
|
151
|
+
subtitle="A pop-up prompt will appear to sign-in and verify your wallet"
|
152
|
+
icon={
|
153
|
+
<WalletImage
|
154
|
+
id={walletToConnect.current.id ?? ""}
|
155
|
+
size={iconSize.xl}
|
156
|
+
client={props.client}
|
157
|
+
/>
|
158
|
+
}
|
159
|
+
/>
|
160
|
+
</>
|
161
|
+
)}
|
162
|
+
</div>
|
163
|
+
</Container>
|
164
|
+
</Container>
|
165
|
+
);
|
166
|
+
}
|