thirdweb 5.31.1 → 5.32.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.
Files changed (525) hide show
  1. package/dist/cjs/exports/react.js +4 -4
  2. package/dist/cjs/exports/react.js.map +1 -1
  3. package/dist/cjs/exports/react.native.js +14 -6
  4. package/dist/cjs/exports/react.native.js.map +1 -1
  5. package/dist/cjs/exports/wallets/in-app.js +1 -1
  6. package/dist/cjs/exports/wallets/in-app.js.map +1 -1
  7. package/dist/cjs/pay/utils/definitions.js +17 -10
  8. package/dist/cjs/pay/utils/definitions.js.map +1 -1
  9. package/dist/cjs/react/core/hooks/connection/ConnectButtonProps.js.map +1 -0
  10. package/dist/cjs/react/core/hooks/connection/ConnectEmbedProps.js +3 -0
  11. package/dist/cjs/react/core/hooks/connection/ConnectEmbedProps.js.map +1 -0
  12. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  13. package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
  14. package/dist/cjs/react/core/hooks/wallets/useSendToken.js +81 -0
  15. package/dist/cjs/react/core/hooks/wallets/useSendToken.js.map +1 -0
  16. package/dist/cjs/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.js +20 -25
  17. package/dist/cjs/react/core/utils/defaultTokens.js.map +1 -0
  18. package/dist/cjs/react/core/utils/isSmartWallet.js.map +1 -0
  19. package/dist/cjs/react/{web/ui/ConnectWallet/icons/dataUris.js → core/utils/socialIcons.js} +19 -2
  20. package/dist/cjs/react/core/utils/socialIcons.js.map +1 -0
  21. package/dist/cjs/react/core/utils/storage.js.map +1 -0
  22. package/dist/cjs/react/core/utils/wallet.js +85 -0
  23. package/dist/cjs/react/core/utils/wallet.js.map +1 -0
  24. package/dist/cjs/react/native/design-system/index.js +33 -0
  25. package/dist/cjs/react/native/design-system/index.js.map +1 -0
  26. package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js +5 -1
  27. package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
  28. package/dist/cjs/react/native/hooks/wallets/useSendToken.js +31 -0
  29. package/dist/cjs/react/native/hooks/wallets/useSendToken.js.map +1 -0
  30. package/dist/cjs/react/native/ui/components/Address.js +31 -0
  31. package/dist/cjs/react/native/ui/components/Address.js.map +1 -0
  32. package/dist/cjs/react/native/ui/components/ChainIcon.js +30 -0
  33. package/dist/cjs/react/native/ui/components/ChainIcon.js.map +1 -0
  34. package/dist/cjs/react/native/ui/components/Header.js +30 -0
  35. package/dist/cjs/react/native/ui/components/Header.js.map +1 -0
  36. package/dist/cjs/react/native/ui/components/RNImage.js +43 -0
  37. package/dist/cjs/react/native/ui/components/RNImage.js.map +1 -0
  38. package/dist/cjs/react/native/ui/components/Skeleton.js +62 -0
  39. package/dist/cjs/react/native/ui/components/Skeleton.js.map +1 -0
  40. package/dist/cjs/react/native/ui/components/TokenIcon.js +16 -0
  41. package/dist/cjs/react/native/ui/components/TokenIcon.js.map +1 -0
  42. package/dist/cjs/react/native/ui/components/WalletImage.js +69 -0
  43. package/dist/cjs/react/native/ui/components/WalletImage.js.map +1 -0
  44. package/dist/cjs/react/native/ui/components/button.js +23 -8
  45. package/dist/cjs/react/native/ui/components/button.js.map +1 -1
  46. package/dist/cjs/react/native/ui/components/input.js +64 -0
  47. package/dist/cjs/react/native/ui/components/input.js.map +1 -0
  48. package/dist/cjs/react/native/ui/components/spacer.js +10 -0
  49. package/dist/cjs/react/native/ui/components/spacer.js.map +1 -0
  50. package/dist/cjs/react/native/ui/components/text.js +10 -7
  51. package/dist/cjs/react/native/ui/components/text.js.map +1 -1
  52. package/dist/cjs/react/native/ui/connect/ConnectButton.js +106 -0
  53. package/dist/cjs/react/native/ui/connect/ConnectButton.js.map +1 -0
  54. package/dist/cjs/react/native/ui/connect/ConnectModal.js +133 -0
  55. package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -0
  56. package/dist/cjs/react/native/ui/connect/ConnectedButton.js +42 -0
  57. package/dist/cjs/react/native/ui/connect/ConnectedButton.js.map +1 -0
  58. package/dist/cjs/react/native/ui/connect/ConnectedModal.js +175 -0
  59. package/dist/cjs/react/native/ui/connect/ConnectedModal.js.map +1 -0
  60. package/dist/cjs/react/native/ui/connect/ErrorView.js +25 -0
  61. package/dist/cjs/react/native/ui/connect/ErrorView.js.map +1 -0
  62. package/dist/cjs/react/native/ui/connect/ExternalWalletsList.js +67 -0
  63. package/dist/cjs/react/native/ui/connect/ExternalWalletsList.js.map +1 -0
  64. package/dist/cjs/react/native/ui/connect/InAppWalletUI.js +167 -0
  65. package/dist/cjs/react/native/ui/connect/InAppWalletUI.js.map +1 -0
  66. package/dist/cjs/react/native/ui/connect/ReceiveScreen.js +42 -0
  67. package/dist/cjs/react/native/ui/connect/ReceiveScreen.js.map +1 -0
  68. package/dist/cjs/react/native/ui/connect/SendScreen.js +82 -0
  69. package/dist/cjs/react/native/ui/connect/SendScreen.js.map +1 -0
  70. package/dist/cjs/react/native/ui/connect/SuccessView.js +25 -0
  71. package/dist/cjs/react/native/ui/connect/SuccessView.js.map +1 -0
  72. package/dist/cjs/react/native/ui/connect/TokenListScreen.js +59 -0
  73. package/dist/cjs/react/native/ui/connect/TokenListScreen.js.map +1 -0
  74. package/dist/cjs/react/native/ui/icons/svgs.js +236 -0
  75. package/dist/cjs/react/native/ui/icons/svgs.js.map +1 -0
  76. package/dist/cjs/react/native/ui/{TransactionButton/TrabsactionButton.js → transaction/TransactionButton.js} +1 -1
  77. package/dist/cjs/react/native/ui/transaction/TransactionButton.js.map +1 -0
  78. package/dist/cjs/react/native/wallets/defaultWallets.js +22 -0
  79. package/dist/cjs/react/native/wallets/defaultWallets.js.map +1 -0
  80. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  81. package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js +7 -2
  82. package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
  83. package/dist/cjs/react/web/hooks/wallets/useSendToken.js +31 -0
  84. package/dist/cjs/react/web/hooks/wallets/useSendToken.js.map +1 -0
  85. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
  86. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  87. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +7 -51
  88. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  89. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +2 -8
  90. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
  91. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +0 -4
  92. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  93. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +3 -1
  94. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
  95. package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +2 -2
  96. package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
  97. package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +2 -2
  98. package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
  99. package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
  100. package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
  101. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  102. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  103. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
  104. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
  105. package/dist/cjs/react/web/ui/ConnectWallet/screens/SendFunds.js +4 -15
  106. package/dist/cjs/react/web/ui/ConnectWallet/screens/SendFunds.js.map +1 -1
  107. package/dist/cjs/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
  108. package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
  109. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js +1 -1
  110. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
  111. package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
  112. package/dist/cjs/react/web/ui/components/ChainIcon.js.map +1 -1
  113. package/dist/cjs/react/web/ui/components/TokenIcon.js +2 -2
  114. package/dist/cjs/react/web/ui/components/TokenIcon.js.map +1 -1
  115. package/dist/cjs/react/web/ui/components/WalletImage.js +12 -13
  116. package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
  117. package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletHeader.js +2 -2
  118. package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletHeader.js.map +1 -1
  119. package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js +8 -4
  120. package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
  121. package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +5 -6
  122. package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
  123. package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js +1 -1
  124. package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
  125. package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js +1 -1
  126. package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
  127. package/dist/cjs/react/web/wallets/shared/SocialLogin.js +1 -1
  128. package/dist/cjs/react/web/wallets/shared/SocialLogin.js.map +1 -1
  129. package/dist/cjs/version.js +1 -1
  130. package/dist/cjs/wallets/in-app/native/native-connector.js +3 -4
  131. package/dist/cjs/wallets/in-app/native/native-connector.js.map +1 -1
  132. package/dist/cjs/wallets/manager/index.js +3 -2
  133. package/dist/cjs/wallets/manager/index.js.map +1 -1
  134. package/dist/esm/exports/react.js +4 -3
  135. package/dist/esm/exports/react.js.map +1 -1
  136. package/dist/esm/exports/react.native.js +6 -2
  137. package/dist/esm/exports/react.native.js.map +1 -1
  138. package/dist/esm/exports/wallets/in-app.js +1 -1
  139. package/dist/esm/exports/wallets/in-app.js.map +1 -1
  140. package/dist/esm/pay/utils/definitions.js +15 -9
  141. package/dist/esm/pay/utils/definitions.js.map +1 -1
  142. package/dist/esm/react/core/hooks/connection/ConnectButtonProps.js.map +1 -0
  143. package/dist/esm/react/core/hooks/connection/ConnectEmbedProps.js +2 -0
  144. package/dist/esm/react/core/hooks/connection/ConnectEmbedProps.js.map +1 -0
  145. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  146. package/dist/esm/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
  147. package/dist/esm/react/core/hooks/wallets/useSendToken.js +78 -0
  148. package/dist/esm/react/core/hooks/wallets/useSendToken.js.map +1 -0
  149. package/dist/esm/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.js +10 -15
  150. package/dist/esm/react/core/utils/defaultTokens.js.map +1 -0
  151. package/dist/esm/react/core/utils/isSmartWallet.js.map +1 -0
  152. package/dist/esm/react/{web/ui/ConnectWallet/icons/dataUris.js → core/utils/socialIcons.js} +18 -1
  153. package/dist/esm/react/core/utils/socialIcons.js.map +1 -0
  154. package/dist/esm/react/core/utils/storage.js.map +1 -0
  155. package/dist/esm/react/core/utils/wallet.js +80 -0
  156. package/dist/esm/react/core/utils/wallet.js.map +1 -0
  157. package/dist/esm/react/native/design-system/index.js +30 -0
  158. package/dist/esm/react/native/design-system/index.js.map +1 -0
  159. package/dist/esm/react/native/hooks/wallets/useAutoConnect.js +5 -1
  160. package/dist/esm/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
  161. package/dist/esm/react/native/hooks/wallets/useSendToken.js +28 -0
  162. package/dist/esm/react/native/hooks/wallets/useSendToken.js.map +1 -0
  163. package/dist/esm/react/native/ui/components/Address.js +27 -0
  164. package/dist/esm/react/native/ui/components/Address.js.map +1 -0
  165. package/dist/esm/react/native/ui/components/ChainIcon.js +26 -0
  166. package/dist/esm/react/native/ui/components/ChainIcon.js.map +1 -0
  167. package/dist/esm/react/native/ui/components/Header.js +27 -0
  168. package/dist/esm/react/native/ui/components/Header.js.map +1 -0
  169. package/dist/esm/react/native/ui/components/RNImage.js +39 -0
  170. package/dist/esm/react/native/ui/components/RNImage.js.map +1 -0
  171. package/dist/esm/react/native/ui/components/Skeleton.js +58 -0
  172. package/dist/esm/react/native/ui/components/Skeleton.js.map +1 -0
  173. package/dist/esm/react/native/ui/components/TokenIcon.js +13 -0
  174. package/dist/esm/react/native/ui/components/TokenIcon.js.map +1 -0
  175. package/dist/esm/react/native/ui/components/WalletImage.js +65 -0
  176. package/dist/esm/react/native/ui/components/WalletImage.js.map +1 -0
  177. package/dist/esm/react/native/ui/components/button.js +24 -10
  178. package/dist/esm/react/native/ui/components/button.js.map +1 -1
  179. package/dist/esm/react/native/ui/components/input.js +60 -0
  180. package/dist/esm/react/native/ui/components/input.js.map +1 -0
  181. package/dist/esm/react/native/ui/components/spacer.js +7 -0
  182. package/dist/esm/react/native/ui/components/spacer.js.map +1 -0
  183. package/dist/esm/react/native/ui/components/text.js +10 -7
  184. package/dist/esm/react/native/ui/components/text.js.map +1 -1
  185. package/dist/esm/react/native/ui/connect/ConnectButton.js +103 -0
  186. package/dist/esm/react/native/ui/connect/ConnectButton.js.map +1 -0
  187. package/dist/esm/react/native/ui/connect/ConnectModal.js +129 -0
  188. package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -0
  189. package/dist/esm/react/native/ui/connect/ConnectedButton.js +39 -0
  190. package/dist/esm/react/native/ui/connect/ConnectedButton.js.map +1 -0
  191. package/dist/esm/react/native/ui/connect/ConnectedModal.js +172 -0
  192. package/dist/esm/react/native/ui/connect/ConnectedModal.js.map +1 -0
  193. package/dist/esm/react/native/ui/connect/ErrorView.js +21 -0
  194. package/dist/esm/react/native/ui/connect/ErrorView.js.map +1 -0
  195. package/dist/esm/react/native/ui/connect/ExternalWalletsList.js +64 -0
  196. package/dist/esm/react/native/ui/connect/ExternalWalletsList.js.map +1 -0
  197. package/dist/esm/react/native/ui/connect/InAppWalletUI.js +163 -0
  198. package/dist/esm/react/native/ui/connect/InAppWalletUI.js.map +1 -0
  199. package/dist/esm/react/native/ui/connect/ReceiveScreen.js +38 -0
  200. package/dist/esm/react/native/ui/connect/ReceiveScreen.js.map +1 -0
  201. package/dist/esm/react/native/ui/connect/SendScreen.js +78 -0
  202. package/dist/esm/react/native/ui/connect/SendScreen.js.map +1 -0
  203. package/dist/esm/react/native/ui/connect/SuccessView.js +21 -0
  204. package/dist/esm/react/native/ui/connect/SuccessView.js.map +1 -0
  205. package/dist/esm/react/native/ui/connect/TokenListScreen.js +54 -0
  206. package/dist/esm/react/native/ui/connect/TokenListScreen.js.map +1 -0
  207. package/dist/esm/react/native/ui/icons/svgs.js +233 -0
  208. package/dist/esm/react/native/ui/icons/svgs.js.map +1 -0
  209. package/dist/esm/react/native/ui/{TransactionButton/TrabsactionButton.js → transaction/TransactionButton.js} +1 -1
  210. package/dist/esm/react/native/ui/transaction/TransactionButton.js.map +1 -0
  211. package/dist/esm/react/native/wallets/defaultWallets.js +19 -0
  212. package/dist/esm/react/native/wallets/defaultWallets.js.map +1 -0
  213. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  214. package/dist/esm/react/web/hooks/wallets/useAutoConnect.js +7 -2
  215. package/dist/esm/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
  216. package/dist/esm/react/web/hooks/wallets/useSendToken.js +28 -0
  217. package/dist/esm/react/web/hooks/wallets/useSendToken.js.map +1 -0
  218. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
  219. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  220. package/dist/esm/react/web/ui/ConnectWallet/Details.js +7 -51
  221. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  222. package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +2 -8
  223. package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
  224. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +1 -5
  225. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  226. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +3 -1
  227. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
  228. package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +1 -1
  229. package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
  230. package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
  231. package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
  232. package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +1 -1
  233. package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
  234. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  235. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  236. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
  237. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
  238. package/dist/esm/react/web/ui/ConnectWallet/screens/SendFunds.js +5 -16
  239. package/dist/esm/react/web/ui/ConnectWallet/screens/SendFunds.js.map +1 -1
  240. package/dist/esm/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
  241. package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
  242. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js +1 -1
  243. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
  244. package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
  245. package/dist/esm/react/web/ui/components/ChainIcon.js.map +1 -1
  246. package/dist/esm/react/web/ui/components/TokenIcon.js +1 -1
  247. package/dist/esm/react/web/ui/components/WalletImage.js +3 -4
  248. package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
  249. package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletHeader.js +1 -1
  250. package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletHeader.js.map +1 -1
  251. package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js +8 -4
  252. package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
  253. package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +2 -3
  254. package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
  255. package/dist/esm/react/web/wallets/shared/OTPLoginUI.js +1 -1
  256. package/dist/esm/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
  257. package/dist/esm/react/web/wallets/shared/PassKeyLogin.js +1 -1
  258. package/dist/esm/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
  259. package/dist/esm/react/web/wallets/shared/SocialLogin.js +1 -1
  260. package/dist/esm/react/web/wallets/shared/SocialLogin.js.map +1 -1
  261. package/dist/esm/version.js +1 -1
  262. package/dist/esm/wallets/in-app/native/native-connector.js +3 -4
  263. package/dist/esm/wallets/in-app/native/native-connector.js.map +1 -1
  264. package/dist/esm/wallets/manager/index.js +3 -2
  265. package/dist/esm/wallets/manager/index.js.map +1 -1
  266. package/dist/types/exports/react.d.ts +7 -6
  267. package/dist/types/exports/react.d.ts.map +1 -1
  268. package/dist/types/exports/react.native.d.ts +7 -2
  269. package/dist/types/exports/react.native.d.ts.map +1 -1
  270. package/dist/types/exports/wallets/in-app.d.ts +1 -1
  271. package/dist/types/exports/wallets/in-app.d.ts.map +1 -1
  272. package/dist/types/pay/utils/definitions.d.ts +1 -0
  273. package/dist/types/pay/utils/definitions.d.ts.map +1 -1
  274. package/dist/types/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.d.ts +6 -6
  275. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -0
  276. package/dist/types/react/core/hooks/connection/ConnectEmbedProps.d.ts +264 -0
  277. package/dist/types/react/core/hooks/connection/ConnectEmbedProps.d.ts.map +1 -0
  278. package/dist/types/react/core/hooks/connection/types.d.ts +1 -1
  279. package/dist/types/react/core/hooks/connection/types.d.ts.map +1 -1
  280. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +1 -1
  281. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  282. package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts +3 -1
  283. package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts.map +1 -1
  284. package/dist/types/react/core/hooks/wallets/useSendToken.d.ts +12 -0
  285. package/dist/types/react/core/hooks/wallets/useSendToken.d.ts.map +1 -0
  286. package/dist/types/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.d.ts +1 -0
  287. package/dist/types/react/core/utils/defaultTokens.d.ts.map +1 -0
  288. package/dist/types/react/core/utils/isSmartWallet.d.ts.map +1 -0
  289. package/dist/types/react/{web/ui/ConnectWallet/icons/dataUris.d.ts → core/utils/socialIcons.d.ts} +17 -1
  290. package/dist/types/react/core/utils/socialIcons.d.ts.map +1 -0
  291. package/dist/types/react/core/utils/storage.d.ts +5 -0
  292. package/dist/types/react/core/utils/storage.d.ts.map +1 -0
  293. package/dist/types/react/core/utils/wallet.d.ts +26 -0
  294. package/dist/types/react/core/utils/wallet.d.ts.map +1 -0
  295. package/dist/types/react/native/design-system/index.d.ts +30 -0
  296. package/dist/types/react/native/design-system/index.d.ts.map +1 -0
  297. package/dist/types/react/native/hooks/wallets/useAutoConnect.d.ts.map +1 -1
  298. package/dist/types/react/{web/ui/hooks → native/hooks/wallets}/useSendToken.d.ts +18 -1
  299. package/dist/types/react/native/hooks/wallets/useSendToken.d.ts.map +1 -0
  300. package/dist/types/react/native/ui/components/Address.d.ts +9 -0
  301. package/dist/types/react/native/ui/components/Address.d.ts.map +1 -0
  302. package/dist/types/react/native/ui/components/ChainIcon.d.ts +11 -0
  303. package/dist/types/react/native/ui/components/ChainIcon.d.ts.map +1 -0
  304. package/dist/types/react/native/ui/components/Header.d.ts +10 -0
  305. package/dist/types/react/native/ui/components/Header.d.ts.map +1 -0
  306. package/dist/types/react/native/ui/components/RNImage.d.ts +10 -0
  307. package/dist/types/react/native/ui/components/RNImage.d.ts.map +1 -0
  308. package/dist/types/react/native/ui/components/Skeleton.d.ts +11 -0
  309. package/dist/types/react/native/ui/components/Skeleton.d.ts.map +1 -0
  310. package/dist/types/react/native/ui/components/TokenIcon.d.ts +15 -0
  311. package/dist/types/react/native/ui/components/TokenIcon.d.ts.map +1 -0
  312. package/dist/types/react/native/ui/components/WalletImage.d.ts +9 -0
  313. package/dist/types/react/native/ui/components/WalletImage.d.ts.map +1 -0
  314. package/dist/types/react/native/ui/components/button.d.ts +5 -1
  315. package/dist/types/react/native/ui/components/button.d.ts.map +1 -1
  316. package/dist/types/react/native/ui/components/input.d.ts +12 -0
  317. package/dist/types/react/native/ui/components/input.d.ts.map +1 -0
  318. package/dist/types/react/native/ui/components/spacer.d.ts +5 -0
  319. package/dist/types/react/native/ui/components/spacer.d.ts.map +1 -0
  320. package/dist/types/react/native/ui/components/text.d.ts +1 -1
  321. package/dist/types/react/native/ui/components/text.d.ts.map +1 -1
  322. package/dist/types/react/native/ui/connect/ConnectButton.d.ts +18 -0
  323. package/dist/types/react/native/ui/connect/ConnectButton.d.ts.map +1 -0
  324. package/dist/types/react/native/ui/connect/ConnectModal.d.ts +40 -0
  325. package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -0
  326. package/dist/types/react/native/ui/connect/ConnectedButton.d.ts +9 -0
  327. package/dist/types/react/native/ui/connect/ConnectedButton.d.ts.map +1 -0
  328. package/dist/types/react/native/ui/connect/ConnectedModal.d.ts +14 -0
  329. package/dist/types/react/native/ui/connect/ConnectedModal.d.ts.map +1 -0
  330. package/dist/types/react/native/ui/connect/ErrorView.d.ts +7 -0
  331. package/dist/types/react/native/ui/connect/ErrorView.d.ts.map +1 -0
  332. package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts +15 -0
  333. package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts.map +1 -0
  334. package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts +19 -0
  335. package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts.map +1 -0
  336. package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts +13 -0
  337. package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts.map +1 -0
  338. package/dist/types/react/native/ui/connect/SendScreen.d.ts +14 -0
  339. package/dist/types/react/native/ui/connect/SendScreen.d.ts.map +1 -0
  340. package/dist/types/react/native/ui/connect/SuccessView.d.ts +7 -0
  341. package/dist/types/react/native/ui/connect/SuccessView.d.ts.map +1 -0
  342. package/dist/types/react/native/ui/connect/TokenListScreen.d.ts +20 -0
  343. package/dist/types/react/native/ui/connect/TokenListScreen.d.ts.map +1 -0
  344. package/dist/types/react/native/ui/icons/svgs.d.ts +22 -0
  345. package/dist/types/react/native/ui/icons/svgs.d.ts.map +1 -0
  346. package/dist/types/react/native/ui/{TransactionButton/TrabsactionButton.d.ts → transaction/TransactionButton.d.ts} +1 -1
  347. package/dist/types/react/native/ui/transaction/TransactionButton.d.ts.map +1 -0
  348. package/dist/types/react/native/wallets/defaultWallets.d.ts +11 -0
  349. package/dist/types/react/native/wallets/defaultWallets.d.ts.map +1 -0
  350. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  351. package/dist/types/react/web/hooks/wallets/useAutoConnect.d.ts.map +1 -1
  352. package/dist/types/react/web/hooks/wallets/useSendToken.d.ts +28 -0
  353. package/dist/types/react/web/hooks/wallets/useSendToken.d.ts.map +1 -0
  354. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +1 -1
  355. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
  356. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +2 -2
  357. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  358. package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts.map +1 -1
  359. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +1 -267
  360. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
  361. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
  362. package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
  363. package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts.map +1 -1
  364. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts +2 -2
  365. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
  366. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts +1 -1
  367. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts.map +1 -1
  368. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts +1 -1
  369. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +1 -1
  370. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts +1 -1
  371. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +1 -1
  372. package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts +1 -1
  373. package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts.map +1 -1
  374. package/dist/types/react/web/ui/ConnectWallet/screens/SignatureScreen.d.ts +1 -1
  375. package/dist/types/react/web/ui/ConnectWallet/screens/SignatureScreen.d.ts.map +1 -1
  376. package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts +1 -1
  377. package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
  378. package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts +1 -1
  379. package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts.map +1 -1
  380. package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts +1 -1
  381. package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts.map +1 -1
  382. package/dist/types/react/web/ui/PayEmbed.d.ts +2 -2
  383. package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
  384. package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
  385. package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
  386. package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
  387. package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
  388. package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts.map +1 -1
  389. package/dist/types/react/web/wallets/shared/SocialLogin.d.ts.map +1 -1
  390. package/dist/types/version.d.ts +1 -1
  391. package/dist/types/wallets/in-app/native/native-connector.d.ts.map +1 -1
  392. package/dist/types/wallets/manager/index.d.ts +1 -0
  393. package/dist/types/wallets/manager/index.d.ts.map +1 -1
  394. package/package.json +19 -3
  395. package/src/exports/react.native.ts +19 -5
  396. package/src/exports/react.ts +7 -12
  397. package/src/exports/wallets/in-app.ts +1 -1
  398. package/src/pay/utils/definitions.ts +16 -9
  399. package/src/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.ts +7 -10
  400. package/src/react/core/hooks/connection/ConnectEmbedProps.ts +285 -0
  401. package/src/react/core/hooks/connection/types.ts +1 -1
  402. package/src/react/core/hooks/transaction/useSendTransaction.ts +1 -1
  403. package/src/react/core/hooks/wallets/useAutoConnect.ts +1 -1
  404. package/src/react/core/hooks/wallets/useSendToken.ts +94 -0
  405. package/src/react/{web/ui/ConnectWallet → core/utils}/defaultTokens.ts +10 -15
  406. package/src/react/{web/ui/ConnectWallet/icons/dataUris.ts → core/utils/socialIcons.ts} +30 -0
  407. package/src/react/{web/wallets/shared → core/utils}/storage.ts +2 -2
  408. package/src/react/core/utils/wallet.ts +101 -0
  409. package/src/react/native/design-system/index.ts +31 -0
  410. package/src/react/native/hooks/wallets/useAutoConnect.ts +5 -1
  411. package/src/react/native/hooks/wallets/useSendToken.ts +29 -0
  412. package/src/react/native/ui/components/Address.tsx +52 -0
  413. package/src/react/native/ui/components/ChainIcon.tsx +42 -0
  414. package/src/react/native/ui/components/Header.tsx +84 -0
  415. package/src/react/native/ui/components/RNImage.tsx +71 -0
  416. package/src/react/native/ui/components/Skeleton.tsx +93 -0
  417. package/src/react/native/ui/components/TokenIcon.tsx +31 -0
  418. package/src/react/native/ui/components/WalletImage.tsx +81 -0
  419. package/src/react/native/ui/components/button.tsx +41 -9
  420. package/src/react/native/ui/components/input.tsx +128 -0
  421. package/src/react/native/ui/components/spacer.tsx +6 -0
  422. package/src/react/native/ui/components/text.tsx +17 -8
  423. package/src/react/native/ui/connect/ConnectButton.tsx +188 -0
  424. package/src/react/native/ui/connect/ConnectModal.tsx +301 -0
  425. package/src/react/native/ui/connect/ConnectedButton.tsx +94 -0
  426. package/src/react/native/ui/connect/ConnectedModal.tsx +434 -0
  427. package/src/react/native/ui/connect/ErrorView.tsx +44 -0
  428. package/src/react/native/ui/connect/ExternalWalletsList.tsx +162 -0
  429. package/src/react/native/ui/connect/InAppWalletUI.tsx +320 -0
  430. package/src/react/native/ui/connect/ReceiveScreen.tsx +81 -0
  431. package/src/react/native/ui/connect/SendScreen.tsx +238 -0
  432. package/src/react/native/ui/connect/SuccessView.tsx +44 -0
  433. package/src/react/native/ui/connect/TokenListScreen.tsx +147 -0
  434. package/src/react/native/ui/icons/svgs.ts +252 -0
  435. package/src/react/native/wallets/defaultWallets.ts +30 -0
  436. package/src/react/web/hooks/transaction/useSendTransaction.tsx +2 -2
  437. package/src/react/web/hooks/wallets/useAutoConnect.ts +18 -8
  438. package/src/react/web/hooks/wallets/useSendToken.ts +29 -0
  439. package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +2 -2
  440. package/src/react/web/ui/ConnectWallet/Details.tsx +26 -78
  441. package/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx +2 -9
  442. package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +6 -285
  443. package/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx +3 -1
  444. package/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx +1 -1
  445. package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +1 -1
  446. package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +1 -1
  447. package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +2 -2
  448. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +1 -1
  449. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts +1 -1
  450. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +1 -1
  451. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +1 -1
  452. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx +1 -1
  453. package/src/react/web/ui/ConnectWallet/screens/SendFunds.tsx +8 -21
  454. package/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx +1 -1
  455. package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +1 -1
  456. package/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx +4 -1
  457. package/src/react/web/ui/ConnectWallet/screens/nativeToken.ts +1 -1
  458. package/src/react/web/ui/PayEmbed.tsx +3 -3
  459. package/src/react/web/ui/components/ChainIcon.tsx +0 -1
  460. package/src/react/web/ui/components/TokenIcon.tsx +1 -1
  461. package/src/react/web/ui/components/WalletImage.tsx +7 -9
  462. package/src/react/web/wallets/ecosystem/EcosystemWalletHeader.tsx +1 -1
  463. package/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx +8 -4
  464. package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +6 -6
  465. package/src/react/web/wallets/shared/OTPLoginUI.tsx +1 -1
  466. package/src/react/web/wallets/shared/PassKeyLogin.tsx +1 -1
  467. package/src/react/web/wallets/shared/SocialLogin.tsx +1 -1
  468. package/src/version.ts +1 -1
  469. package/src/wallets/in-app/native/native-connector.ts +4 -6
  470. package/src/wallets/manager/index.ts +4 -2
  471. package/dist/cjs/react/native/ui/TransactionButton/TrabsactionButton.js.map +0 -1
  472. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButtonProps.js.map +0 -1
  473. package/dist/cjs/react/web/ui/ConnectWallet/defaultTokens.js.map +0 -1
  474. package/dist/cjs/react/web/ui/ConnectWallet/icons/dataUris.js.map +0 -1
  475. package/dist/cjs/react/web/ui/ConnectWallet/icons/socialLogins.js +0 -15
  476. package/dist/cjs/react/web/ui/ConnectWallet/icons/socialLogins.js.map +0 -1
  477. package/dist/cjs/react/web/ui/hooks/useSendToken.js +0 -57
  478. package/dist/cjs/react/web/ui/hooks/useSendToken.js.map +0 -1
  479. package/dist/cjs/react/web/ui/hooks/useWalletInfo.js +0 -37
  480. package/dist/cjs/react/web/ui/hooks/useWalletInfo.js.map +0 -1
  481. package/dist/cjs/react/web/utils/isSmartWallet.js.map +0 -1
  482. package/dist/cjs/react/web/wallets/in-app/socialIcons.js +0 -10
  483. package/dist/cjs/react/web/wallets/in-app/socialIcons.js.map +0 -1
  484. package/dist/cjs/react/web/wallets/shared/storage.js.map +0 -1
  485. package/dist/esm/react/native/ui/TransactionButton/TrabsactionButton.js.map +0 -1
  486. package/dist/esm/react/web/ui/ConnectWallet/ConnectButtonProps.js.map +0 -1
  487. package/dist/esm/react/web/ui/ConnectWallet/defaultTokens.js.map +0 -1
  488. package/dist/esm/react/web/ui/ConnectWallet/icons/dataUris.js.map +0 -1
  489. package/dist/esm/react/web/ui/ConnectWallet/icons/socialLogins.js +0 -12
  490. package/dist/esm/react/web/ui/ConnectWallet/icons/socialLogins.js.map +0 -1
  491. package/dist/esm/react/web/ui/hooks/useSendToken.js +0 -54
  492. package/dist/esm/react/web/ui/hooks/useSendToken.js.map +0 -1
  493. package/dist/esm/react/web/ui/hooks/useWalletInfo.js +0 -33
  494. package/dist/esm/react/web/ui/hooks/useWalletInfo.js.map +0 -1
  495. package/dist/esm/react/web/utils/isSmartWallet.js.map +0 -1
  496. package/dist/esm/react/web/wallets/in-app/socialIcons.js +0 -7
  497. package/dist/esm/react/web/wallets/in-app/socialIcons.js.map +0 -1
  498. package/dist/esm/react/web/wallets/shared/storage.js.map +0 -1
  499. package/dist/types/react/native/ui/TransactionButton/TrabsactionButton.d.ts.map +0 -1
  500. package/dist/types/react/web/ui/ConnectWallet/ConnectButtonProps.d.ts.map +0 -1
  501. package/dist/types/react/web/ui/ConnectWallet/defaultTokens.d.ts.map +0 -1
  502. package/dist/types/react/web/ui/ConnectWallet/icons/dataUris.d.ts.map +0 -1
  503. package/dist/types/react/web/ui/ConnectWallet/icons/socialLogins.d.ts +0 -12
  504. package/dist/types/react/web/ui/ConnectWallet/icons/socialLogins.d.ts.map +0 -1
  505. package/dist/types/react/web/ui/hooks/useSendToken.d.ts.map +0 -1
  506. package/dist/types/react/web/ui/hooks/useWalletInfo.d.ts +0 -13
  507. package/dist/types/react/web/ui/hooks/useWalletInfo.d.ts.map +0 -1
  508. package/dist/types/react/web/utils/isSmartWallet.d.ts.map +0 -1
  509. package/dist/types/react/web/wallets/in-app/socialIcons.d.ts +0 -6
  510. package/dist/types/react/web/wallets/in-app/socialIcons.d.ts.map +0 -1
  511. package/dist/types/react/web/wallets/shared/storage.d.ts +0 -5
  512. package/dist/types/react/web/wallets/shared/storage.d.ts.map +0 -1
  513. package/src/react/web/ui/ConnectWallet/icons/socialLogins.ts +0 -22
  514. package/src/react/web/ui/hooks/useSendToken.ts +0 -66
  515. package/src/react/web/ui/hooks/useWalletInfo.ts +0 -37
  516. package/src/react/web/wallets/in-app/socialIcons.ts +0 -11
  517. /package/dist/cjs/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.js +0 -0
  518. /package/dist/cjs/react/{web → core}/utils/isSmartWallet.js +0 -0
  519. /package/dist/cjs/react/{web/wallets/shared → core/utils}/storage.js +0 -0
  520. /package/dist/esm/react/{web/ui/ConnectWallet → core/hooks/connection}/ConnectButtonProps.js +0 -0
  521. /package/dist/esm/react/{web → core}/utils/isSmartWallet.js +0 -0
  522. /package/dist/esm/react/{web/wallets/shared → core/utils}/storage.js +0 -0
  523. /package/dist/types/react/{web → core}/utils/isSmartWallet.d.ts +0 -0
  524. /package/src/react/{web → core}/utils/isSmartWallet.ts +0 -0
  525. /package/src/react/native/ui/{TransactionButton/TrabsactionButton.tsx → transaction/TransactionButton.tsx} +0 -0
@@ -10,12 +10,9 @@ import {
10
10
  } from "@radix-ui/react-icons";
11
11
  import { useQuery } from "@tanstack/react-query";
12
12
  import { useContext, useEffect, useState } from "react";
13
- import { ethereum } from "../../../../chains/chain-definitions/ethereum.js";
14
13
  import type { Chain } from "../../../../chains/types.js";
15
14
  import type { ThirdwebClient } from "../../../../client/client.js";
16
15
  import { getContract } from "../../../../contract/contract.js";
17
- import { resolveAvatar } from "../../../../extensions/ens/resolve-avatar.js";
18
- import { resolveName } from "../../../../extensions/ens/resolve-name.js";
19
16
  import { isContractDeployed } from "../../../../utils/bytecode/is-contract-deployed.js";
20
17
  import type { Account, Wallet } from "../../../../wallets/interfaces/wallet.js";
21
18
  import {
@@ -30,19 +27,25 @@ import {
30
27
  radius,
31
28
  spacing,
32
29
  } from "../../../core/design-system/index.js";
30
+ import type {
31
+ ConnectButtonProps,
32
+ ConnectButton_detailsButtonOptions,
33
+ ConnectButton_detailsModalOptions,
34
+ PayUIOptions,
35
+ } from "../../../core/hooks/connection/ConnectButtonProps.js";
33
36
  import {
34
37
  useChainQuery,
35
38
  useChainsQuery,
36
39
  } from "../../../core/hooks/others/useChainQuery.js";
37
- import { useWalletBalance } from "../../../core/hooks/others/useWalletBalance.js";
38
40
  import { SetRootElementContext } from "../../../core/providers/RootElementContext.js";
39
- import { shortenString } from "../../../core/utils/addresses.js";
41
+ import type { SupportedTokens } from "../../../core/utils/defaultTokens.js";
42
+ import { hasSmartAccount } from "../../../core/utils/isSmartWallet.js";
43
+ import { useConnectedWalletDetails } from "../../../core/utils/wallet.js";
40
44
  import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
41
45
  import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
42
46
  import { useActiveWalletChain } from "../../hooks/wallets/useActiveWalletChain.js";
43
47
  import { useDisconnect } from "../../hooks/wallets/useDisconnect.js";
44
48
  import { useSwitchActiveWalletChain } from "../../hooks/wallets/useSwitchActiveWalletChain.js";
45
- import { hasSmartAccount } from "../../utils/isSmartWallet.js";
46
49
  import { ChainIcon } from "../components/ChainIcon.js";
47
50
  import { CopyIcon } from "../components/CopyIcon.js";
48
51
  import { Img } from "../components/Img.js";
@@ -57,19 +60,12 @@ import { Link, Text } from "../components/text.js";
57
60
  import { fadeInAnimation } from "../design-system/animations.js";
58
61
  import { StyledButton } from "../design-system/elements.js";
59
62
  import type { LocaleId } from "../types.js";
60
- import type {
61
- ConnectButtonProps,
62
- ConnectButton_detailsButtonOptions,
63
- ConnectButton_detailsModalOptions,
64
- PayUIOptions,
65
- } from "./ConnectButtonProps.js";
66
63
  import { MenuButton, MenuLink } from "./MenuButton.js";
67
64
  import {
68
65
  NetworkSelectorContent,
69
66
  type NetworkSelectorProps,
70
67
  } from "./NetworkSelector.js";
71
68
  import { onModalUnmount } from "./constants.js";
72
- import type { SupportedTokens } from "./defaultTokens.js";
73
69
  import { CoinsIcon } from "./icons/CoinsIcon.js";
74
70
  import { FundsIcon } from "./icons/FundsIcon.js";
75
71
  import { GenericWalletIcon } from "./icons/GenericWalletIcon.js";
@@ -113,14 +109,18 @@ export const ConnectedWalletDetails: React.FC<{
113
109
 
114
110
  const setRootEl = useContext(SetRootElementContext);
115
111
  const activeWallet = useActiveWallet();
112
+ const activeAccount = useActiveAccount();
116
113
  const walletChain = useActiveWalletChain();
117
114
 
118
115
  useChainsQuery(props.chains, 5);
119
116
 
120
- const { ensAvatarQuery, addressOrENS, balanceQuery } = useWalletInfo(
121
- client,
122
- props.detailsButton?.displayBalanceToken,
123
- );
117
+ const { ensAvatarQuery, addressOrENS, balanceQuery } =
118
+ useConnectedWalletDetails(
119
+ client,
120
+ walletChain,
121
+ activeAccount,
122
+ props.detailsButton?.displayBalanceToken,
123
+ );
124
124
 
125
125
  function closeModal() {
126
126
  setRootEl(null);
@@ -245,14 +245,17 @@ function DetailsModal(props: {
245
245
  const [isOpen, setIsOpen] = useState(true);
246
246
 
247
247
  const { client, locale } = props;
248
- const { ensAvatarQuery, addressOrENS, balanceQuery } = useWalletInfo(
249
- client,
250
- props.displayBalanceToken,
251
- );
248
+ const walletChain = useActiveWalletChain();
249
+ const activeAccount = useActiveAccount();
250
+ const { ensAvatarQuery, addressOrENS, balanceQuery } =
251
+ useConnectedWalletDetails(
252
+ client,
253
+ walletChain,
254
+ activeAccount,
255
+ props.displayBalanceToken,
256
+ );
252
257
 
253
258
  const activeWallet = useActiveWallet();
254
- const activeAccount = useActiveAccount();
255
- const walletChain = useActiveWalletChain();
256
259
  const chainQuery = useChainQuery(walletChain);
257
260
 
258
261
  const disableSwitchChain = !activeWallet?.switchChain;
@@ -1184,58 +1187,3 @@ export function useWalletDetailsModal() {
1184
1187
  open: openModal,
1185
1188
  };
1186
1189
  }
1187
-
1188
- function useWalletInfo(
1189
- client: ThirdwebClient,
1190
- displayBalanceToken?: Record<number, string>,
1191
- ) {
1192
- const walletChain = useActiveWalletChain();
1193
-
1194
- const tokenAddress =
1195
- walletChain && displayBalanceToken
1196
- ? displayBalanceToken[Number(walletChain.id)]
1197
- : undefined;
1198
-
1199
- const activeAccount = useActiveAccount();
1200
- const ensNameQuery = useQuery({
1201
- queryKey: ["ens-name", activeAccount?.address],
1202
- enabled: !!activeAccount?.address,
1203
- queryFn: () =>
1204
- resolveName({
1205
- client,
1206
- address: activeAccount?.address || "",
1207
- resolverChain: ethereum,
1208
- }),
1209
- });
1210
-
1211
- const ensAvatarQuery = useQuery({
1212
- queryKey: ["ens-avatar", ensNameQuery.data],
1213
- enabled: !!ensNameQuery.data,
1214
- queryFn: async () =>
1215
- resolveAvatar({
1216
- client,
1217
- name: ensNameQuery.data || "",
1218
- }),
1219
- });
1220
-
1221
- const shortAddress = activeAccount?.address
1222
- ? shortenString(activeAccount.address, false)
1223
- : "";
1224
-
1225
- const balanceQuery = useWalletBalance({
1226
- chain: walletChain ? walletChain : undefined,
1227
- tokenAddress,
1228
- address: activeAccount?.address,
1229
- client,
1230
- });
1231
-
1232
- const addressOrENS = ensNameQuery.data || shortAddress;
1233
-
1234
- return {
1235
- ensNameQuery,
1236
- ensAvatarQuery,
1237
- addressOrENS,
1238
- shortAddress,
1239
- balanceQuery,
1240
- };
1241
- }
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useQuery } from "@tanstack/react-query";
3
- import { Suspense, lazy, useEffect, useState } from "react";
3
+ import { Suspense, lazy, useState } from "react";
4
4
  import type { Chain } from "../../../../../chains/types.js";
5
5
  import type { ThirdwebClient } from "../../../../../client/client.js";
6
6
  import { isMobile } from "../../../../../utils/web/isMobile.js";
@@ -15,7 +15,7 @@ import { getInstalledWalletProviders } from "../../../../../wallets/injected/mip
15
15
  import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
16
16
  import type { EcosystemWalletId } from "../../../../../wallets/wallet-types.js";
17
17
  import { iconSize } from "../../../../core/design-system/index.js";
18
- import { useSetSelectionData } from "../../../providers/wallet-ui-states-provider.js";
18
+ import { useWalletInfo } from "../../../../core/utils/wallet.js";
19
19
  import EcosystemWalletConnectUI from "../../../wallets/ecosystem/EcosystemWalletConnectUI.js";
20
20
  import { getInjectedWalletLocale } from "../../../wallets/injected/locale/getInjectedWalletLocale.js";
21
21
  import { GetStartedScreen } from "../../../wallets/shared/GetStartedScreen.js";
@@ -27,7 +27,6 @@ import {
27
27
  import { Spacer } from "../../components/Spacer.js";
28
28
  import { Container, ModalHeader } from "../../components/basic.js";
29
29
  import { Text } from "../../components/text.js";
30
- import { useWalletInfo } from "../../hooks/useWalletInfo.js";
31
30
  import type { LocaleId } from "../../types.js";
32
31
  import { AccentFailIcon } from "../icons/AccentFailIcon.js";
33
32
  import type { ConnectLocale } from "../locale/types.js";
@@ -71,12 +70,6 @@ export function AnyWalletConnectUI(props: {
71
70
  const [screen, setScreen] = useState<"main" | "get-started">("main");
72
71
  const { wallet } = props;
73
72
  const walletInfo = useWalletInfo(props.wallet.id);
74
- const setSelectionData = useSetSelectionData();
75
-
76
- // biome-ignore lint/correctness/useExhaustiveDependencies: reset the selection data when the wallet changes
77
- useEffect(() => {
78
- setSelectionData({});
79
- }, [wallet.id]);
80
73
 
81
74
  const localeFnQuery = useQuery({
82
75
  queryKey: ["injectedWalletLocale", props.localeId, walletInfo.data?.name],
@@ -4,14 +4,16 @@ import type { Chain } from "../../../../../chains/types.js";
4
4
  import type { ThirdwebClient } from "../../../../../client/client.js";
5
5
  import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
6
6
  import type { SmartWalletOptions } from "../../../../../wallets/smart/types.js";
7
- import type { AppMetadata } from "../../../../../wallets/types.js";
8
7
  import {
9
8
  CustomThemeProvider,
10
9
  useCustomTheme,
11
10
  } from "../../../../core/design-system/CustomThemeProvider.js";
12
- import { type Theme, radius } from "../../../../core/design-system/index.js";
13
- import type { SiweAuthOptions } from "../../../../core/hooks/auth/useSiweAuth.js";
14
- import { useSiweAuth } from "../../../../core/hooks/auth/useSiweAuth.js";
11
+ import { radius } from "../../../../core/design-system/index.js";
12
+ import {
13
+ type SiweAuthOptions,
14
+ useSiweAuth,
15
+ } from "../../../../core/hooks/auth/useSiweAuth.js";
16
+ import type { ConnectEmbedProps } from "../../../../core/hooks/connection/ConnectEmbedProps.js";
15
17
  import { useActiveAccount } from "../../../hooks/wallets/useActiveAccount.js";
16
18
  import { useActiveWallet } from "../../../hooks/wallets/useActiveWallet.js";
17
19
  import { useIsAutoConnecting } from "../../../hooks/wallets/useIsAutoConnecting.js";
@@ -35,283 +37,6 @@ import type { ConnectLocale } from "../locale/types.js";
35
37
  import { ConnectModalContent } from "./ConnectModalContent.js";
36
38
  import { useSetupScreen } from "./screen.js";
37
39
 
38
- export type ConnectEmbedProps = {
39
- /**
40
- * A client is the entry point to the thirdweb SDK.
41
- * It is required for all other actions.
42
- * You can create a client using the `createThirdwebClient` function. Refer to the [Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information.
43
- *
44
- * You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage.
45
- *
46
- * ```tsx
47
- * import { createThirdwebClient } from "thirdweb";
48
- *
49
- * const client = createThirdwebClient({
50
- * clientId: "<your_client_id>",
51
- * })
52
- * ```
53
- */
54
- client: ThirdwebClient;
55
-
56
- /**
57
- * Metadata of the app that will be passed to connected wallet. Setting this is highly recommended.
58
- *
59
- * Some wallets display this information to the user when they connect to your app.
60
- * @example
61
- * ```ts
62
- * {
63
- * name: "My App",
64
- * url: "https://my-app.com",
65
- * description: "some description about your app",
66
- * logoUrl: "https://path/to/my-app/logo.svg",
67
- * };
68
- * ```
69
- */
70
- appMetadata?: AppMetadata;
71
-
72
- /**
73
- * By default - ConnectEmbed UI uses the `en-US` locale for english language users.
74
- *
75
- * You can customize the language used in the ConnectEmbed UI by setting the `locale` prop.
76
- *
77
- * Refer to the [`LocaleId`](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales.
78
- */
79
- locale?: LocaleId;
80
-
81
- /**
82
- * Array of supported wallets. If not provided, default wallets will be used.
83
- * @example
84
- * ```tsx
85
- * import { AutoConnect } from "thirdweb/react";
86
- * import { createWallet, inAppWallet } from "thirdweb/wallets";
87
- *
88
- * const wallets = [
89
- * inAppWallet(),
90
- * createWallet("io.metamask"),
91
- * createWallet("com.coinbase.wallet"),
92
- * createWallet("me.rainbow"),
93
- * ];
94
- *
95
- * function Example() {
96
- * return (
97
- * <ConnectEmbed
98
- * client={client}
99
- * wallets={wallets}
100
- * />
101
- * )
102
- * }
103
- * ```
104
- *
105
- * If no wallets are specified. The component will show All the EIP-6963 compliant installed wallet extensions, as well as below default wallets:
106
- *
107
- * ```tsx
108
- * const defaultWallets = [
109
- * inAppWallet(),
110
- * createWallet("io.metamask"),
111
- * createWallet("com.coinbase.wallet"),
112
- * createWallet("me.rainbow"),
113
- * createWallet("io.zerion.wallet"),
114
- * ]
115
- * ```
116
- *
117
- * The `ConnectEmbed` also shows a "All wallets" button at the end of wallet list which allows user to connect to any of the 350+ wallets
118
- */
119
- wallets?: Wallet[];
120
-
121
- /**
122
- * When the user has connected their wallet to your site, this configuration determines whether or not you want to automatically connect to the last connected wallet when user visits your site again in the future.
123
- *
124
- * By default it is set to `{ timeout: 15000 }` meaning that autoConnect is enabled and if the autoConnection does not succeed within 15 seconds, it will be cancelled.
125
- *
126
- * If you want to disable autoConnect, set this prop to `false`.
127
- *
128
- * If you want to customize the timeout, you can assign an object with a `timeout` key to this prop.
129
- * ```tsx
130
- * <ConnectEmbed client={client} autoConnect={{ timeout: 10000 }} />
131
- * ```
132
- */
133
- autoConnect?:
134
- | {
135
- timeout: number;
136
- }
137
- | boolean;
138
-
139
- /**
140
- * The [`Chain`](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the blockchain you want the wallet to connect to
141
- *
142
- * If a `chain` is not specified, Wallet will be connected to whatever is the default set in the wallet.
143
- *
144
- * If a `chain` is specified, Wallet will be prompted to switch to given chain after connection if it is not already connected to it.
145
- * This ensures that the wallet is connected to the correct blockchain before interacting with your app.
146
- *
147
- * You can create a `Chain` object using the [`defineChain`](https://portal.thirdweb.com/references/typescript/v5/defineChain) function.
148
- * At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object.
149
- * @example
150
- * ```tsx
151
- * import { polygon } from "thirdweb/chains";
152
- *
153
- * function Example() {
154
- * return <div> <ConnectEmbed chain={polygon} /> </div>
155
- * }
156
- * ```
157
- */
158
- chain?: Chain;
159
-
160
- /**
161
- * Array of chains that your app supports.
162
- *
163
- * This is only relevant if your app is a multi-chain app and works across multiple blockchains.
164
- * If your app only works on a single blockchain, you should only specify the `chain` prop.
165
- *
166
- * Given list of chains will used in various ways:
167
- * - They will be displayed in the network selector in the `ConnectEmbed`'s details modal post connection
168
- * - They will be sent to wallet at the time of connection if the wallet supports requesting multiple chains ( example: WalletConnect ) so that users can switch between the chains post connection easily
169
- *
170
- * ```tsx
171
- * <ConnectEmbed chains={[ethereum, polygon, optimism]} />
172
- * ```
173
- *
174
- * You can create a `Chain` object using the [`defineChain`](https://portal.thirdweb.com/references/typescript/v5/defineChain) function.
175
- * At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object.
176
- *
177
- * ```tsx
178
- * import { defineChain } from "thirdweb/react";
179
- *
180
- * const polygon = defineChain({
181
- * id: 137,
182
- * });
183
- * ```
184
- */
185
- chains?: Chain[];
186
-
187
- /**
188
- * Class name to be added to the root element of ConnectEmbed
189
- */
190
- className?: string;
191
-
192
- /**
193
- * Set the theme for the `ConnectEmbed` component. By default it is set to `"dark"`
194
- *
195
- * theme can be set to either `"dark"`, `"light"` or a custom theme object.
196
- * You can also import [`lightTheme`](https://portal.thirdweb.com/references/typescript/v5/lightTheme)
197
- * or [`darkTheme`](https://portal.thirdweb.com/references/typescript/v5/darkTheme)
198
- * functions from `thirdweb/react` to use the default themes as base and overrides parts of it.
199
- * @example
200
- * ```ts
201
- * import { lightTheme } from "thirdweb/react";
202
- *
203
- * const customTheme = lightTheme({
204
- * colors: {
205
- * modalBg: 'red'
206
- * }
207
- * })
208
- *
209
- * function Example() {
210
- * return <ConnectEmbed theme={customTheme} />
211
- * }
212
- * ```
213
- */
214
- theme?: "dark" | "light" | Theme;
215
-
216
- /**
217
- * CSS styles to be applied to the root element of ConnectEmbed
218
- */
219
- style?: React.CSSProperties;
220
-
221
- /**
222
- * If provided, Embed will show a Terms of Service message at the bottom with below link
223
- */
224
- termsOfServiceUrl?: string;
225
-
226
- /**
227
- * If provided, Embed will show a Privacy Policy message at the bottom with below link
228
- */
229
- privacyPolicyUrl?: string;
230
-
231
- /**
232
- * Callback to be called on successful connection of wallet - including auto-connect.
233
- * The callback is called with the connected wallet
234
- *
235
- * ```tsx
236
- * <ConnectEmbed
237
- * onConnect={(wallet) => {
238
- * console.log("connected to", wallet)
239
- * }}
240
- * />
241
- * ```
242
- * ```
243
- */
244
- onConnect?: (wallet: Wallet) => void;
245
-
246
- /**
247
- * By default, A "Powered by Thirdweb" branding is shown at the bottom of the embed.
248
- *
249
- * If you want to hide it, set this to `false`
250
- * @example
251
- * ```tsx
252
- * <ConnectEmbed showThirdwebBranding={false} />
253
- * ```
254
- */
255
- showThirdwebBranding?: boolean;
256
-
257
- /**
258
- * Configure options for WalletConnect
259
- *
260
- * By default WalletConnect uses the thirdweb's default project id.
261
- * Setting your own project id is recommended.
262
- *
263
- * You can create a project id by signing up on [walletconnect.com](https://walletconnect.com/)
264
- */
265
- walletConnect?: {
266
- projectId?: string;
267
- };
268
-
269
- /**
270
- * Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options.
271
- *
272
- * This allows to sponsor gas fees for your user's transaction using the thirdweb account abstraction infrastructure.
273
- *
274
- * ```tsx
275
- * <ConnectEmbed
276
- * accountAbstraction={{
277
- * factoryAddress: "0x123...",
278
- * chain: sepolia,
279
- * gasless: true;
280
- * }}
281
- * />
282
- */
283
- accountAbstraction?: SmartWalletOptions;
284
-
285
- /**
286
- * Wallets to show as recommended in the `ConnectEmbed` UI
287
- */
288
- recommendedWallets?: Wallet[];
289
-
290
- /**
291
- * By default, `ConnectEmbed` shows a "All Wallets" button that shows a list of 350+ wallets.
292
- *
293
- * You can disable this button by setting `showAllWallets` prop to `false`
294
- */
295
- showAllWallets?: boolean;
296
-
297
- /**
298
- * ConnectEmbed supports two modal size variants: `compact` and `wide`.
299
- *
300
- * By default it is set to `compact`, you can set it to `wide` if you want to show a wider modal.
301
- *
302
- * Note that if the screen width can not fit the wide modal, the `compact` version will be shown regardless of this `modalSize` options provided
303
- */
304
- modalSize?: "compact" | "wide";
305
-
306
- /**
307
- * Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to
308
- * enforce the users to sign a message after connecting their wallet to authenticate themselves.
309
- *
310
- * Refer to the [`SiweAuthOptions`](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details
311
- */
312
- auth?: SiweAuthOptions;
313
- };
314
-
315
40
  /**
316
41
  * A component that allows the user to connect their wallet.
317
42
  *
@@ -322,10 +47,6 @@ export type ConnectEmbedProps = {
322
47
  * ```tsx
323
48
  * <ConnectEmbed
324
49
  * client={client}
325
- * appMetadata={{
326
- * name: "Example",
327
- * url: "https://example.com",
328
- * }}
329
50
  * />
330
51
  * ```
331
52
  * @param props -
@@ -109,8 +109,9 @@ export const ConnectModalContent = (props: {
109
109
  );
110
110
 
111
111
  const handleBack = useCallback(() => {
112
+ setSelectionData({});
112
113
  setScreen(initialScreen);
113
- }, [setScreen, initialScreen]);
114
+ }, [setScreen, initialScreen, setSelectionData]);
114
115
 
115
116
  const walletList = (
116
117
  <WalletSelector
@@ -120,6 +121,7 @@ export const ConnectModalContent = (props: {
120
121
  setScreen(reservedScreens.getStarted);
121
122
  }}
122
123
  selectWallet={(newWallet) => {
124
+ setSelectionData({});
123
125
  if (newWallet.onConnectRequested) {
124
126
  newWallet
125
127
  .onConnectRequested()
@@ -13,6 +13,7 @@ import {
13
13
  iconSize,
14
14
  spacing,
15
15
  } from "../../../../core/design-system/index.js";
16
+ import { useWalletInfo } from "../../../../core/utils/wallet.js";
16
17
  import { LoadingScreen } from "../../../wallets/shared/LoadingScreen.js";
17
18
  import { getSmartWalletLocale } from "../../../wallets/smartWallet/locale/getSmartWalletLocale.js";
18
19
  import type { SmartWalletLocale } from "../../../wallets/smartWallet/locale/types.js";
@@ -21,7 +22,6 @@ import { Spinner } from "../../components/Spinner.js";
21
22
  import { Container, ModalHeader } from "../../components/basic.js";
22
23
  import { Button } from "../../components/buttons.js";
23
24
  import { Text } from "../../components/text.js";
24
- import { useWalletInfo } from "../../hooks/useWalletInfo.js";
25
25
  import type { LocaleId } from "../../types.js";
26
26
  import type { ConnectLocale } from "../locale/types.js";
27
27
  import { AnyWalletConnectUI } from "./AnyWalletConnectUI.js";
@@ -10,12 +10,12 @@ import {
10
10
  radius,
11
11
  spacing,
12
12
  } from "../../../core/design-system/index.js";
13
+ import { useWalletInfo } from "../../../core/utils/wallet.js";
13
14
  import { Skeleton } from "../components/Skeleton.js";
14
15
  import { WalletImage } from "../components/WalletImage.js";
15
16
  import { Container } from "../components/basic.js";
16
17
  import { Text } from "../components/text.js";
17
18
  import { StyledButton } from "../design-system/elements.js";
18
- import { useWalletInfo } from "../hooks/useWalletInfo.js";
19
19
  import { useScreenContext } from "./Modal/screen.js";
20
20
  import type { ConnectLocale } from "./locale/types.js";
21
21
 
@@ -16,6 +16,7 @@ import {
16
16
  radius,
17
17
  spacing,
18
18
  } from "../../../core/design-system/index.js";
19
+ import { genericWalletIcon } from "../../../core/utils/socialIcons.js";
19
20
  import { sortWallets } from "../../utils/sortWallets.js";
20
21
  import { LoadingScreen } from "../../wallets/shared/LoadingScreen.js";
21
22
  import { Img } from "../components/Img.js";
@@ -40,7 +41,6 @@ import { PoweredByThirdweb } from "./PoweredByTW.js";
40
41
  import { WalletButton, WalletEntryButton } from "./WalletEntryButton.js";
41
42
  import { WalletTypeRowButton } from "./WalletTypeRowButton.js";
42
43
  import { compactModalMaxHeight } from "./constants.js";
43
- import { genericWalletIcon } from "./icons/dataUris.js";
44
44
  import type { ConnectLocale } from "./locale/types.js";
45
45
 
46
46
  const InAppWalletSelectionUI = /* @__PURE__ */ lazy(
@@ -14,6 +14,7 @@ import {
14
14
  iconSize,
15
15
  spacing,
16
16
  } from "../../../../../core/design-system/index.js";
17
+ import type { PayUIOptions } from "../../../../../core/hooks/connection/ConnectButtonProps.js";
17
18
  import {
18
19
  useChainQuery,
19
20
  useChainsQuery,
@@ -21,6 +22,7 @@ import {
21
22
  import { useWalletBalance } from "../../../../../core/hooks/others/useWalletBalance.js";
22
23
  import { useBuyWithCryptoQuote } from "../../../../../core/hooks/pay/useBuyWithCryptoQuote.js";
23
24
  import { useBuyWithFiatQuote } from "../../../../../core/hooks/pay/useBuyWithFiatQuote.js";
25
+ import type { SupportedTokens } from "../../../../../core/utils/defaultTokens.js";
24
26
  import { useActiveAccount } from "../../../../hooks/wallets/useActiveAccount.js";
25
27
  import { useActiveWalletChain } from "../../../../hooks/wallets/useActiveWalletChain.js";
26
28
  import { LoadingScreen } from "../../../../wallets/shared/LoadingScreen.js";
@@ -40,9 +42,7 @@ import { Container, Line, ModalHeader } from "../../../components/basic.js";
40
42
  import { Button } from "../../../components/buttons.js";
41
43
  import { Text } from "../../../components/text.js";
42
44
  import { TokenSymbol } from "../../../components/token/TokenSymbol.js";
43
- import type { PayUIOptions } from "../../ConnectButtonProps.js";
44
45
  import { ChainButton, NetworkSelectorContent } from "../../NetworkSelector.js";
45
- import type { SupportedTokens } from "../../defaultTokens.js";
46
46
  import { CoinsIcon } from "../../icons/CoinsIcon.js";
47
47
  import type { ConnectLocale } from "../../locale/types.js";
48
48
  import { TokenSelector } from "../TokenSelector.js";
@@ -18,13 +18,13 @@ import {
18
18
  spacing,
19
19
  } from "../../../../../../core/design-system/index.js";
20
20
  import { useChainQuery } from "../../../../../../core/hooks/others/useChainQuery.js";
21
+ import type { TokenInfo } from "../../../../../../core/utils/defaultTokens.js";
21
22
  import { Spacer } from "../../../../components/Spacer.js";
22
23
  import { Spinner } from "../../../../components/Spinner.js";
23
24
  import { Container, Line, ModalHeader } from "../../../../components/basic.js";
24
25
  import { Button, ButtonLink } from "../../../../components/buttons.js";
25
26
  import { Text } from "../../../../components/text.js";
26
27
  import { TokenSymbol } from "../../../../components/token/TokenSymbol.js";
27
- import type { TokenInfo } from "../../../defaultTokens.js";
28
28
  import { type ERC20OrNativeToken, NATIVE_TOKEN } from "../../nativeToken.js";
29
29
  import { PayTokenIcon } from "../PayTokenIcon.js";
30
30
  import { StepIcon } from "../Stepper.js";
@@ -1,6 +1,6 @@
1
1
  import type { Chain } from "../../../../../../../chains/types.js";
2
2
  import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.js";
3
- import type { PayUIOptions } from "../../../ConnectButtonProps.js";
3
+ import type { PayUIOptions } from "../../../../../../core/hooks/connection/ConnectButtonProps.js";
4
4
  import { type ERC20OrNativeToken, isNativeToken } from "../../nativeToken.js";
5
5
  import type { SupportedChainAndTokens } from "../swap/useSwapSupportedChains.js";
6
6
 
@@ -3,9 +3,9 @@ import { polygon } from "../../../../../../../chains/chain-definitions/polygon.j
3
3
  import type { Chain } from "../../../../../../../chains/types.js";
4
4
  import { formatNumber } from "../../../../../../../utils/formatNumber.js";
5
5
  import { toEther } from "../../../../../../../utils/units.js";
6
+ import type { PayUIOptions } from "../../../../../../core/hooks/connection/ConnectButtonProps.js";
6
7
  import { useActiveWalletChain } from "../../../../../hooks/wallets/useActiveWalletChain.js";
7
8
  import { useDebouncedValue } from "../../../../hooks/useDebouncedValue.js";
8
- import type { PayUIOptions } from "../../../ConnectButtonProps.js";
9
9
  import { type ERC20OrNativeToken, NATIVE_TOKEN } from "../../nativeToken.js";
10
10
  import { defaultSelectedCurrency } from "../fiat/currencies.js";
11
11
  import type { SupportedChainAndTokens } from "../swap/useSwapSupportedChains.js";
@@ -10,13 +10,13 @@ import {
10
10
  } from "../../../../../../core/design-system/index.js";
11
11
  import { useChainQuery } from "../../../../../../core/hooks/others/useChainQuery.js";
12
12
  import { useWalletBalance } from "../../../../../../core/hooks/others/useWalletBalance.js";
13
+ import type { TokenInfo } from "../../../../../../core/utils/defaultTokens.js";
13
14
  import { useActiveAccount } from "../../../../../hooks/wallets/useActiveAccount.js";
14
15
  import { Skeleton } from "../../../../components/Skeleton.js";
15
16
  import { Container } from "../../../../components/basic.js";
16
17
  import { Button } from "../../../../components/buttons.js";
17
18
  import { Text } from "../../../../components/text.js";
18
19
  import { TokenSymbol } from "../../../../components/token/TokenSymbol.js";
19
- import type { TokenInfo } from "../../../defaultTokens.js";
20
20
  import { GenericWalletIcon } from "../../../icons/GenericWalletIcon.js";
21
21
  import { formatTokenBalance } from "../../formatTokenBalance.js";
22
22
  import { type NativeToken, isNativeToken } from "../../nativeToken.js";