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
@@ -0,0 +1,172 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { Linking, StyleSheet, TouchableOpacity, View } from "react-native";
4
+ import { getContract } from "../../../../contract/contract.js";
5
+ import { isContractDeployed } from "../../../../utils/bytecode/is-contract-deployed.js";
6
+ import { useChainQuery } from "../../../core/hooks/others/useChainQuery.js";
7
+ import { hasSmartAccount } from "../../../core/utils/isSmartWallet.js";
8
+ import { useConnectedWalletDetails } from "../../../core/utils/wallet.js";
9
+ import { fontSize, radius, spacing } from "../../design-system/index.js";
10
+ import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
11
+ import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
12
+ import { useActiveWalletChain } from "../../hooks/wallets/useActiveWalletChain.js";
13
+ import { useDisconnect } from "../../hooks/wallets/useDisconnect.js";
14
+ import { Address } from "../components/Address.js";
15
+ import { ChainIcon } from "../components/ChainIcon.js";
16
+ import { Header } from "../components/Header.js";
17
+ import { RNImage } from "../components/RNImage.js";
18
+ import { Skeleton } from "../components/Skeleton.js";
19
+ import { WalletImage } from "../components/WalletImage.js";
20
+ import { ThemedButton } from "../components/button.js";
21
+ import { Spacer } from "../components/spacer.js";
22
+ import { ThemedText } from "../components/text.js";
23
+ import { ThemedView } from "../components/view.js";
24
+ import { CLOSE_ICON, COINS_ICON, EXIT_ICON, RECEIVE_ICON, SEND_ICON, SMART_WALLET_ICON, } from "../icons/svgs.js";
25
+ import { ReceiveScreen } from "./ReceiveScreen.js";
26
+ import { SendScreen } from "./SendScreen.js";
27
+ import { TokenListScreen } from "./TokenListScreen.js";
28
+ export function ConnectedModal(props) {
29
+ const { theme, containerType, client } = props;
30
+ const [modalState, setModalState] = useState({
31
+ screen: "account",
32
+ });
33
+ let content;
34
+ switch (modalState.screen) {
35
+ case "send": {
36
+ content = (_jsx(SendScreen, { theme: theme, client: client, onClose: props.onClose, onBack: () => setModalState({ screen: "account" }), containerType: containerType, supportedTokens: props.supportedTokens }));
37
+ break;
38
+ }
39
+ case "receive": {
40
+ content = (_jsx(ReceiveScreen, { account: props.account, wallet: props.wallet, theme: theme, containerType: props.containerType, onBack: () => setModalState({ screen: "account" }), onClose: props.onClose }));
41
+ break;
42
+ }
43
+ case "view_funds": {
44
+ content = (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: props.onClose, onBack: () => setModalState({ screen: "account" }), containerType: containerType, title: "View Funds" }), _jsx(Spacer, { size: "xl" }), _jsx(TokenListScreen, { client: client, theme: theme, supportedTokens: props.supportedTokens })] }));
45
+ break;
46
+ }
47
+ default: {
48
+ content = (_jsxs(_Fragment, { children: [props.onClose && (_jsx(TouchableOpacity, { onPress: props.onClose, style: {
49
+ padding: spacing.lg,
50
+ position: "absolute",
51
+ right: 0,
52
+ top: 0,
53
+ zIndex: 1,
54
+ }, children: _jsx(RNImage, { theme: theme, data: CLOSE_ICON, size: 24, color: theme.colors.secondaryIconColor }) })), _jsx(Spacer, { size: "xl" }), _jsx(AccountHeader, { ...props }), _jsx(Spacer, { size: "lg" }), _jsx(WalletActionsRow, { ...props, setModalState: setModalState }), _jsx(Spacer, { size: "lg" }), _jsx(WalletMenu, { ...props, setModalState: setModalState })] }));
55
+ }
56
+ }
57
+ return (_jsx(ThemedView, { theme: theme, style: containerType === "modal"
58
+ ? styles.modalContainer
59
+ : styles.embedContainer, children: content }));
60
+ }
61
+ const AccountHeader = (props) => {
62
+ const { account, wallet, theme } = props;
63
+ const walletChain = useActiveWalletChain();
64
+ const { ensAvatarQuery, addressOrENS, balanceQuery } = useConnectedWalletDetails(props.client, walletChain, account, props.detailsButton?.displayBalanceToken);
65
+ return (_jsxs(View, { style: styles.accountHeaderContainer, children: [_jsx(WalletImage, { theme: theme, size: 64, wallet: wallet, ensAvatar: ensAvatarQuery.data }), _jsx(SmartAccountBadge, { client: props.client, theme: theme }), _jsx(Spacer, { size: "smd" }), _jsx(Address, { account: account, theme: theme, addressOrENS: addressOrENS }), _jsx(Spacer, { size: "xxs" }), balanceQuery.data ? (_jsxs(ThemedText, { theme: theme, type: "subtext", style: {
66
+ fontSize: fontSize.sm,
67
+ }, children: [Number(balanceQuery.data.displayValue).toFixed(3), " ", balanceQuery.data?.symbol] })) : (_jsx(Skeleton, { theme: theme, style: { width: 80, height: 16 } }))] }));
68
+ };
69
+ const WalletActionsRow = (props) => {
70
+ const { theme, setModalState } = props;
71
+ return (_jsxs(View, { style: styles.walletActionRowContainer, children: [_jsxs(ThemedButton, { theme: theme, variant: "secondary", style: styles.walletActionButton, onPress: () => setModalState({ screen: "send" }), children: [_jsx(RNImage, { theme: theme, size: 24, data: SEND_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "Send" })] }), _jsxs(ThemedButton, { theme: theme, variant: "secondary", style: styles.walletActionButton, onPress: () => setModalState({ screen: "receive" }), children: [_jsx(RNImage, { theme: theme, size: 24, data: RECEIVE_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "Receive" })] })] }));
72
+ };
73
+ const WalletMenu = (props) => {
74
+ return (_jsxs(View, { style: styles.walletMenuContainer, children: [_jsx(ChainSwitcher, { ...props }), _jsx(ViewFunds, { ...props }), _jsx(DisconnectWallet, { ...props })] }));
75
+ };
76
+ const ChainSwitcher = (props) => {
77
+ const { client, wallet, theme } = props;
78
+ const chain = wallet.getChain();
79
+ const chainQuery = useChainQuery(chain);
80
+ return (_jsxs(TouchableOpacity, { style: styles.walletMenuRow, children: [_jsx(ChainIcon, { client: client, size: 32, chain: chain, theme: theme }), chainQuery.data?.name ? (_jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: chainQuery.data?.name })) : (_jsx(Skeleton, { theme: theme, style: { width: 80, height: 16 } }))] }));
81
+ };
82
+ const ViewFunds = (props) => {
83
+ const { theme, setModalState } = props;
84
+ return (_jsxs(TouchableOpacity, { style: styles.walletMenuRow, onPress: () => setModalState({ screen: "view_funds" }), children: [_jsx(RNImage, { theme: theme, size: 32, data: COINS_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "View Funds" })] }));
85
+ };
86
+ const DisconnectWallet = (props) => {
87
+ const { wallet, theme, onClose } = props;
88
+ const { disconnect } = useDisconnect();
89
+ return (_jsxs(TouchableOpacity, { style: styles.walletMenuRow, onPress: () => {
90
+ onClose?.();
91
+ disconnect(wallet);
92
+ }, children: [_jsx(RNImage, { theme: theme, size: 32, data: EXIT_ICON, color: theme.colors.secondaryIconColor }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: "Disconnect Wallet" })] }));
93
+ };
94
+ function SmartAccountBadge(props) {
95
+ const activeAccount = useActiveAccount();
96
+ const activeWallet = useActiveWallet();
97
+ const isSmartWallet = hasSmartAccount(activeWallet);
98
+ const chain = useActiveWalletChain();
99
+ const { client, theme } = props;
100
+ const [isSmartWalletDeployed, setIsSmartWalletDeployed] = useState(false);
101
+ useEffect(() => {
102
+ if (activeAccount && isSmartWallet && activeAccount.address && chain) {
103
+ const contract = getContract({
104
+ address: activeAccount.address,
105
+ chain,
106
+ client,
107
+ });
108
+ isContractDeployed(contract).then((isDeployed) => {
109
+ setIsSmartWalletDeployed(isDeployed);
110
+ });
111
+ }
112
+ else {
113
+ setIsSmartWalletDeployed(false);
114
+ }
115
+ }, [activeAccount, chain, client, isSmartWallet]);
116
+ const content = (_jsxs(View, { style: {
117
+ flexDirection: "row",
118
+ alignItems: "center",
119
+ justifyContent: "center",
120
+ gap: spacing.xs,
121
+ backgroundColor: theme.colors.secondaryButtonBg,
122
+ borderRadius: radius.md,
123
+ paddingVertical: spacing.xs,
124
+ paddingLeft: spacing.sm,
125
+ paddingRight: spacing.smd,
126
+ }, children: [_jsx(RNImage, { theme: theme, data: SMART_WALLET_ICON, size: 14, color: theme.colors.accentButtonBg }), _jsx(ThemedText, { theme: theme, style: { color: theme.colors.primaryText, fontSize: fontSize.xs }, children: "Smart Account" })] }));
127
+ if (chain && activeAccount && isSmartWallet) {
128
+ return (_jsxs(_Fragment, { children: [_jsx(Spacer, { size: "smd" }), isSmartWalletDeployed ? (_jsx(TouchableOpacity, { onPress: () => Linking.openURL(`https://thirdweb.com/${chain.id}/${activeAccount.address}/account`), children: content })) : (_jsx(View, { children: content }))] }));
129
+ }
130
+ return null;
131
+ }
132
+ const styles = StyleSheet.create({
133
+ modalContainer: {
134
+ flex: 1,
135
+ width: "100%",
136
+ flexDirection: "column",
137
+ borderTopLeftRadius: radius.lg,
138
+ borderTopRightRadius: radius.lg,
139
+ },
140
+ embedContainer: {
141
+ flex: 1,
142
+ width: "100%",
143
+ flexDirection: "column",
144
+ backgroundColor: "transparent",
145
+ },
146
+ accountHeaderContainer: {
147
+ flexDirection: "column",
148
+ justifyContent: "center",
149
+ alignItems: "center",
150
+ paddingHorizontal: spacing.lg,
151
+ },
152
+ walletActionRowContainer: {
153
+ flexDirection: "row",
154
+ justifyContent: "space-evenly",
155
+ alignItems: "center",
156
+ gap: spacing.md,
157
+ paddingHorizontal: spacing.lg,
158
+ },
159
+ walletActionButton: { flex: 1, padding: spacing.smd, gap: spacing.smd },
160
+ walletMenuContainer: {
161
+ flexDirection: "column",
162
+ gap: spacing.lg,
163
+ paddingHorizontal: spacing.lg,
164
+ },
165
+ walletMenuRow: {
166
+ flexDirection: "row",
167
+ justifyContent: "flex-start",
168
+ alignItems: "center",
169
+ gap: spacing.md,
170
+ },
171
+ });
172
+ //# sourceMappingURL=ConnectedModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectedModal.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ConnectedModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAIxF,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC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AAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,QAAQ;QACvB,mBAAmB,EAAE,MAAM,CAAC,EAAE;QAC9B,oBAAoB,EAAE,MAAM,CAAC,EAAE;KAChC;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,QAAQ;QACvB,eAAe,EAAE,aAAa;KAC/B;IACD,sBAAsB,EAAE;QACtB,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,OAAO,CAAC,EAAE;KAC9B;IACD,wBAAwB,EAAE;QACxB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,iBAAiB,EAAE,OAAO,CAAC,EAAE;KAC9B;IACD,kBAAkB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;IACvE,mBAAmB,EAAE;QACnB,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,iBAAiB,EAAE,OAAO,CAAC,EAAE;KAC9B;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,YAAY;QAC5B,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StyleSheet, View } from "react-native";
3
+ import { spacing } from "../../design-system/index.js";
4
+ import { RNImage } from "../components/RNImage.js";
5
+ import { ThemedText } from "../components/text.js";
6
+ import { CLOSE_CIRCLE } from "../icons/svgs.js";
7
+ export const ErrorView = (props) => {
8
+ const { theme, title } = props;
9
+ return (_jsxs(View, { style: styles.container, children: [_jsx(RNImage, { theme: theme, data: CLOSE_CIRCLE, size: 64, color: theme.colors.danger }), _jsx(ThemedText, { type: "defaultSemiBold", theme: theme, style: { color: theme.colors.danger, textAlign: "center" }, children: title })] }));
10
+ };
11
+ const styles = StyleSheet.create({
12
+ container: {
13
+ paddingHorizontal: spacing.lg,
14
+ paddingVertical: spacing.xxl,
15
+ flexDirection: "column",
16
+ justifyContent: "center",
17
+ alignItems: "center",
18
+ gap: spacing.lg,
19
+ },
20
+ });
21
+ //# sourceMappingURL=ErrorView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorView.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ErrorView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IACjD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC3B,KAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAC1B,EACF,KAAC,UAAU,IACT,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,YAEzD,KAAK,GACK,IACR,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,iBAAiB,EAAE,OAAO,CAAC,EAAE;QAC7B,eAAe,EAAE,OAAO,CAAC,GAAG;QAC5B,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { Image, Linking, ScrollView, StyleSheet, TouchableOpacity, View, } from "react-native";
4
+ import { useWalletImage, useWalletInfo } from "../../../core/utils/wallet.js";
5
+ import { spacing } from "../../design-system/index.js";
6
+ import { Skeleton } from "../components/Skeleton.js";
7
+ import { ThemedSpinner } from "../components/spinner.js";
8
+ import { ThemedText } from "../components/text.js";
9
+ export function ExternalWalletsList(props) {
10
+ const { connectMutation, client, theme } = props;
11
+ const [selectedWallet, setSelectedWallet] = useState();
12
+ const connectWallet = (wallet) => {
13
+ setSelectedWallet(wallet);
14
+ connectMutation.connect(async () => {
15
+ await wallet.connect({
16
+ client,
17
+ });
18
+ return wallet;
19
+ });
20
+ };
21
+ return (_jsxs(View, { style: styles.container, children: [_jsx(ScrollView, { style: {
22
+ flex: 1,
23
+ paddingHorizontal: props.containerType === "modal" ? spacing.lg : 0,
24
+ paddingBottom: spacing.md,
25
+ }, children: _jsx(View, { style: { flexDirection: "column", gap: spacing.md }, children: props.externalWallets.map((wallet) => (_jsx(ExternalWalletRow, { wallet: wallet, connectWallet: connectWallet, theme: theme, isConnecting: connectMutation.isConnecting && wallet.id === selectedWallet?.id }, wallet.id))) }) }), _jsx(NewToWallets, { theme: props.theme, containerType: props.containerType })] }));
26
+ }
27
+ function ExternalWalletRow(props) {
28
+ const { wallet, theme, isConnecting, connectWallet } = props;
29
+ const imageQuery = useWalletImage(wallet.id);
30
+ const infoQuery = useWalletInfo(wallet.id);
31
+ return (_jsxs(TouchableOpacity, { style: styles.row, onPress: () => connectWallet(wallet), children: [imageQuery.data ? (isConnecting ? (_jsx(View, { style: {
32
+ width: 52,
33
+ height: 52,
34
+ justifyContent: "center",
35
+ alignItems: "center",
36
+ }, children: _jsx(ThemedSpinner, { color: theme.colors.primaryText }) })) : (_jsx(Image, { source: { uri: imageQuery.data ?? "" }, style: { width: 52, height: 52, borderRadius: 6 } }))) : (_jsx(Skeleton, { theme: theme, style: {
37
+ width: 52,
38
+ height: 52,
39
+ } })), _jsx(ThemedText, { theme: theme, type: "subtitle", children: infoQuery.data?.name || "" })] }));
40
+ }
41
+ function NewToWallets({ theme, containerType, }) {
42
+ return (_jsxs(View, { style: [
43
+ styles.row,
44
+ {
45
+ borderTopWidth: 1,
46
+ borderColor: theme.colors.borderColor,
47
+ paddingVertical: spacing.md,
48
+ paddingHorizontal: containerType === "modal" ? spacing.lg : 0,
49
+ },
50
+ ], children: [_jsx(ThemedText, { theme: theme, type: "subtext", children: "New to wallets?" }), _jsx(View, { style: { flex: 1 } }), _jsx(ThemedText, { type: "subtext", style: { color: theme.colors.primaryText }, theme: theme, onPress: () => Linking.openURL("https://blog.thirdweb.com/web3-wallet/"), children: "Get started" })] }));
51
+ }
52
+ const styles = StyleSheet.create({
53
+ container: {
54
+ flex: 1,
55
+ flexDirection: "column",
56
+ },
57
+ row: {
58
+ flexDirection: "row",
59
+ gap: spacing.md,
60
+ justifyContent: "flex-start",
61
+ alignItems: "center",
62
+ },
63
+ });
64
+ //# sourceMappingURL=ExternalWalletsList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalWalletsList.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ExternalWalletsList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ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KACxB;IACD,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,cAAc,EAAE,YAAY;QAC5B,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC"}
@@ -0,0 +1,163 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useMutation } from "@tanstack/react-query";
3
+ import { useCallback, useState } from "react";
4
+ import { Alert, StyleSheet, TouchableOpacity, View } from "react-native";
5
+ import { nativeLocalStorage } from "../../../../utils/storage/nativeStorage.js";
6
+ import { preAuthenticate } from "../../../../wallets/in-app/native/auth/index.js";
7
+ import { setLastAuthProvider } from "../../../core/utils/storage.js";
8
+ import { radius, spacing } from "../../design-system/index.js";
9
+ import { RNImage } from "../components/RNImage.js";
10
+ import { ThemedButton, ThemedButtonWithIcon } from "../components/button.js";
11
+ import { ThemedInput, ThemedInputWithSubmit } from "../components/input.js";
12
+ import { Spacer } from "../components/spacer.js";
13
+ import { ThemedSpinner } from "../components/spinner.js";
14
+ import { ThemedText } from "../components/text.js";
15
+ import { APPLE_ICON, EMAIL_ICON, FACEBOOK_ICON, GOOGLE_ICON, PHONE_ICON, } from "../icons/svgs.js";
16
+ const defaultAuthOptions = [
17
+ "email",
18
+ "phone",
19
+ "google",
20
+ "facebook",
21
+ "apple",
22
+ ];
23
+ const socialIcons = {
24
+ google: GOOGLE_ICON,
25
+ facebook: FACEBOOK_ICON,
26
+ apple: APPLE_ICON,
27
+ };
28
+ export function InAppWalletUI(props) {
29
+ const { wallet, theme } = props;
30
+ const config = wallet.getConfig();
31
+ const authOptions = config?.auth?.options || defaultAuthOptions;
32
+ const socialLogins = authOptions.filter((x) => x === "google" || x === "apple" || x === "facebook");
33
+ const [inputMode, setInputMode] = useState("email");
34
+ return (_jsxs(View, { style: styles.container, children: [_jsx(View, { style: styles.row, children: socialLogins.map((auth) => (_jsx(SocialLogin, { auth: auth, ...props }, auth))) }), inputMode === "email" ? (_jsx(PreOtpLogin, { auth: "email", ...props })) : (_jsx(ThemedButtonWithIcon, { theme: theme, title: "Email address", icon: EMAIL_ICON, onPress: () => setInputMode("email") })), inputMode === "phone" ? (_jsx(PreOtpLogin, { auth: "phone", ...props })) : (_jsx(ThemedButtonWithIcon, { theme: theme, title: "Phone number", icon: PHONE_ICON, onPress: () => setInputMode("phone") }))] }));
35
+ }
36
+ function SocialLogin(props) {
37
+ const { theme, wallet, auth, client, connectMutation } = props;
38
+ // TODO (rn) - move this onPress and state up
39
+ const strategy = props.auth;
40
+ const [selectedAuth, setSelectedAuth] = useState();
41
+ const connectInAppWallet = useCallback(() => {
42
+ setSelectedAuth(strategy);
43
+ connectMutation.connect(async () => {
44
+ await wallet.connect({
45
+ client,
46
+ strategy: auth,
47
+ });
48
+ await setLastAuthProvider(auth, nativeLocalStorage);
49
+ return wallet;
50
+ });
51
+ }, [connectMutation, auth, client, wallet, strategy]);
52
+ return (_jsx(View, { style: [
53
+ styles.socialIconContainer,
54
+ { borderColor: theme.colors.borderColor },
55
+ ], children: connectMutation.isConnecting && selectedAuth === auth ? (_jsx(ThemedSpinner, { color: theme.colors.primaryText })) : (_jsx(TouchableOpacity, { onPress: connectInAppWallet, disabled: connectMutation.isConnecting, children: _jsx(RNImage, { theme: theme, size: 38, data: socialIcons[auth] }) }, strategy)) }));
56
+ }
57
+ function PreOtpLogin(props) {
58
+ const { theme, auth, client, setScreen, wallet } = props;
59
+ const [phoneOrEmail, setPhoneNumberOrEmail] = useState("");
60
+ const sendCode = useMutation({
61
+ mutationFn: async (options) => {
62
+ const { auth, phoneOrEmail } = options;
63
+ if (auth === "phone") {
64
+ await preAuthenticate({
65
+ client,
66
+ strategy: auth,
67
+ phoneNumber: phoneOrEmail,
68
+ });
69
+ }
70
+ else {
71
+ await preAuthenticate({
72
+ client,
73
+ strategy: auth,
74
+ email: phoneOrEmail,
75
+ });
76
+ }
77
+ },
78
+ });
79
+ return (_jsx(ThemedInputWithSubmit, { theme: theme, placeholder: auth === "phone" ? "Phone number" : "Email address", onChangeText: setPhoneNumberOrEmail, value: phoneOrEmail, keyboardType: auth === "phone" ? "phone-pad" : "email-address", onSubmit: () => sendCode.mutate({
80
+ auth,
81
+ phoneOrEmail,
82
+ }, {
83
+ onSuccess: (_, vars) => {
84
+ if (vars.auth === "phone") {
85
+ setScreen({
86
+ screen: "otp",
87
+ auth: {
88
+ strategy: vars.auth,
89
+ phoneNumber: vars.phoneOrEmail,
90
+ },
91
+ wallet,
92
+ });
93
+ }
94
+ else {
95
+ setScreen({
96
+ screen: "otp",
97
+ auth: { strategy: vars.auth, email: vars.phoneOrEmail },
98
+ wallet,
99
+ });
100
+ }
101
+ },
102
+ onError: (error) => {
103
+ // TODO (rn) - handle error toast or input error border/label
104
+ Alert.alert("Error", error.message);
105
+ },
106
+ }), isSubmitting: sendCode.isPending }));
107
+ }
108
+ export function OtpLogin(props) {
109
+ const { theme, auth, wallet, client, connectMutation } = props;
110
+ const [verificationCode, setVerificationCode] = useState("");
111
+ const connectInAppWallet = async () => {
112
+ if (!verificationCode || !verificationCode)
113
+ return;
114
+ await connectMutation.connect(async () => {
115
+ if (auth.strategy === "phone") {
116
+ await wallet.connect({
117
+ client,
118
+ strategy: auth.strategy,
119
+ phoneNumber: auth.phoneNumber,
120
+ verificationCode,
121
+ });
122
+ }
123
+ else {
124
+ await wallet.connect({
125
+ client,
126
+ strategy: auth.strategy,
127
+ email: auth.email,
128
+ verificationCode,
129
+ });
130
+ }
131
+ await setLastAuthProvider(auth.strategy, nativeLocalStorage);
132
+ return wallet;
133
+ });
134
+ };
135
+ return (_jsxs(_Fragment, { children: [_jsxs(View, { style: {
136
+ flexDirection: "column",
137
+ justifyContent: "center",
138
+ alignItems: "center",
139
+ }, children: [_jsx(ThemedText, { theme: theme, style: { color: theme.colors.secondaryText }, children: "Enter the verification code sent to" }), _jsx(ThemedText, { theme: theme, type: "defaultSemiBold", children: auth.strategy === "phone" ? auth.phoneNumber : auth.email })] }), _jsx(Spacer, { size: "xs" }), _jsx(ThemedInput, { theme: theme, placeholder: "Verification code", onChangeText: setVerificationCode, value: verificationCode, keyboardType: "number-pad" }), _jsx(ThemedButton, { theme: theme, onPress: connectInAppWallet, variant: "accent", disabled: connectMutation.isConnecting, children: connectMutation.isConnecting ? (_jsx(ThemedSpinner, { color: theme.colors.accentButtonText })) : (_jsx(ThemedText, { theme: theme, type: "defaultSemiBold", style: { color: theme.colors.accentButtonText }, children: "Verify" })) }), connectMutation.error && (_jsx(ThemedText, { theme: theme, type: "subtext", style: { color: theme.colors.danger }, children: connectMutation.error.message }))] }));
140
+ }
141
+ const styles = StyleSheet.create({
142
+ container: {
143
+ flexDirection: "column",
144
+ gap: spacing.md,
145
+ },
146
+ row: {
147
+ flexDirection: "row",
148
+ flexWrap: "wrap",
149
+ gap: spacing.md,
150
+ justifyContent: "space-evenly",
151
+ },
152
+ socialIconContainer: {
153
+ flex: 1,
154
+ flexDirection: "column",
155
+ alignItems: "center",
156
+ justifyContent: "center",
157
+ borderStyle: "solid",
158
+ borderWidth: 1,
159
+ borderRadius: radius.lg,
160
+ height: 60,
161
+ },
162
+ });
163
+ //# sourceMappingURL=InAppWalletUI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InAppWalletUI.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/InAppWalletUI.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAShF,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAGlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,O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GAAG,EAAE,OAAO,CAAC,EAAE;KAChB;IACD,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,MAAM;QAChB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,cAAc,EAAE,cAAc;KAC/B;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,MAAM,CAAC,EAAE;QACvB,MAAM,EAAE,EAAE;KACX;CACF,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { StyleSheet, View } from "react-native";
3
+ import { shortenAddress } from "../../../../utils/address.js";
4
+ import { spacing } from "../../design-system/index.js";
5
+ import { Address } from "../components/Address.js";
6
+ import { Header } from "../components/Header.js";
7
+ import { WalletImage } from "../components/WalletImage.js";
8
+ import { Spacer } from "../components/spacer.js";
9
+ import { ThemedText } from "../components/text.js";
10
+ export const ReceiveScreen = (props) => {
11
+ const { wallet, account, theme, onClose, onBack, containerType } = props;
12
+ return (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: onClose, onBack: onBack, containerType: containerType, title: "Receive Funds" }), _jsxs(View, { style: styles.container, children: [_jsx(WalletImage, { theme: theme, wallet: wallet, size: 72 }), _jsx(Spacer, { size: "lg" }), _jsx(View, { style: [
13
+ styles.addressContainer,
14
+ { borderColor: theme.colors.borderColor },
15
+ ], children: _jsx(Address, { account: account, addressOrENS: shortenAddress(account?.address, 8), theme: theme }) }), _jsx(ThemedText, { theme: theme, type: "subtext", style: { textAlign: "center" }, children: "Copy your address to send funds to this wallet" })] })] }));
16
+ };
17
+ const styles = StyleSheet.create({
18
+ container: {
19
+ paddingHorizontal: spacing.lg,
20
+ paddingVertical: spacing.xxl,
21
+ flexDirection: "column",
22
+ gap: spacing.md,
23
+ alignItems: "center",
24
+ justifyContent: "center",
25
+ flex: 1,
26
+ },
27
+ addressContainer: {
28
+ width: "100%",
29
+ flexDirection: "row",
30
+ gap: spacing.sm,
31
+ alignItems: "center",
32
+ justifyContent: "center",
33
+ borderWidth: 1,
34
+ padding: spacing.md,
35
+ borderRadius: spacing.lg,
36
+ },
37
+ });
38
+ //# sourceMappingURL=ReceiveScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceiveScreen.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/ReceiveScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAsB,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAWnD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IACzD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL,8BACE,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAC,eAAe,GACrB,EACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAE3B,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,GAAI,EACvD,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,GAAG,EACpB,KAAC,IAAI,IACH,KAAK,EAAE;4BACL,MAAM,CAAC,gBAAgB;4BACvB,EAAE,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;yBAC1C,YAED,KAAC,OAAO,IACN,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,EACjD,KAAK,EAAE,KAAK,GACZ,GACG,EACP,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,+DAGnB,IACR,IACN,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,iBAAiB,EAAE,OAAO,CAAC,EAAE;QAC7B,eAAe,EAAE,OAAO,CAAC,GAAG;QAC5B,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE,CAAC;KACR;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,OAAO,CAAC,EAAE;QACf,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,OAAO,CAAC,EAAE;QACnB,YAAY,EAAE,OAAO,CAAC,EAAE;KACzB;CACF,CAAC,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { StyleSheet, View } from "react-native";
4
+ import { useChainQuery } from "../../../core/hooks/others/useChainQuery.js";
5
+ import { radius, spacing } from "../../design-system/index.js";
6
+ import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
7
+ import { useActiveWalletChain } from "../../hooks/wallets/useActiveWalletChain.js";
8
+ import { useSendToken } from "../../hooks/wallets/useSendToken.js";
9
+ import { Header } from "../components/Header.js";
10
+ import { ThemedButton } from "../components/button.js";
11
+ import { ThemedInput } from "../components/input.js";
12
+ import { Spacer } from "../components/spacer.js";
13
+ import { ThemedSpinner } from "../components/spinner.js";
14
+ import { ThemedText } from "../components/text.js";
15
+ import { ErrorView } from "./ErrorView.js";
16
+ import { SuccessView } from "./SuccessView.js";
17
+ import { TokenListScreen, TokenRow } from "./TokenListScreen.js";
18
+ export const SendScreen = (props) => {
19
+ const { theme, client, onClose, onBack, containerType, supportedTokens } = props;
20
+ const [receiverAddress, setReceiverAddress] = useState("");
21
+ const [amount, setAmount] = useState("0");
22
+ const [selectedToken, setSelectedToken] = useState();
23
+ const account = useActiveAccount();
24
+ const chain = useActiveWalletChain();
25
+ const chainIfo = useChainQuery(chain);
26
+ const sendMutation = useSendToken(client);
27
+ const [screen, setScreen] = useState("base");
28
+ const handleTokenClicked = () => {
29
+ setScreen("tokenList");
30
+ };
31
+ const handleSend = async () => {
32
+ sendMutation.mutate({
33
+ amount,
34
+ receiverAddress,
35
+ tokenAddress: selectedToken?.address,
36
+ }, {
37
+ onSuccess() {
38
+ setScreen("success");
39
+ },
40
+ onError() {
41
+ setScreen("error");
42
+ },
43
+ });
44
+ };
45
+ if (screen === "success") {
46
+ return (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: onClose, onBack: () => setScreen("base"), containerType: containerType, title: "Funds Sent" }), _jsx(Spacer, { size: "xl" }), _jsx(View, { style: { flex: 1 }, children: _jsx(SuccessView, { theme: theme, title: "Transaction Successful" }) })] }));
47
+ }
48
+ if (screen === "error") {
49
+ return (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: onClose, onBack: () => setScreen("base"), containerType: containerType, title: "Error Sending Funds" }), _jsx(Spacer, { size: "xl" }), _jsx(View, { style: { flex: 1 }, children: _jsx(ErrorView, { theme: theme, title: sendMutation.error?.message || "Unknown error" }) })] }));
50
+ }
51
+ if (screen === "tokenList") {
52
+ return (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: onClose, onBack: () => setScreen("base"), containerType: containerType, title: "Token to Send" }), _jsx(Spacer, { size: "xl" }), _jsx(View, { style: { flex: 1 }, children: _jsx(TokenListScreen, { theme: theme, client: client, supportedTokens: supportedTokens, onTokenSelected: (t) => {
53
+ setSelectedToken(t);
54
+ setScreen("base");
55
+ } }) })] }));
56
+ }
57
+ return (_jsxs(_Fragment, { children: [_jsx(Header, { theme: theme, onClose: onClose, onBack: onBack, containerType: containerType, title: "Send Funds" }), _jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.inputContainer, children: [_jsx(ThemedText, { theme: theme, type: "subtext", children: "Token" }), _jsx(View, { style: {
58
+ borderColor: theme.colors.borderColor,
59
+ borderWidth: 1,
60
+ paddingHorizontal: spacing.md,
61
+ paddingVertical: spacing.smd,
62
+ borderRadius: radius.lg,
63
+ }, children: _jsx(TokenRow, { theme: theme, client: client, address: account?.address, chain: chain, token: selectedToken, onTokenSelected: handleTokenClicked }) })] }), _jsxs(View, { style: styles.inputContainer, children: [_jsx(ThemedText, { theme: theme, type: "subtext", children: "Send to" }), _jsx(ThemedInput, { theme: theme, onChangeText: setReceiverAddress, value: receiverAddress, placeholder: "0x... / ENS name", textContentType: "URL", keyboardType: "url", autoCapitalize: "none" })] }), _jsxs(View, { style: styles.inputContainer, children: [_jsx(ThemedText, { theme: theme, type: "subtext", children: "Amount" }), _jsx(ThemedInput, { theme: theme, onChangeText: setAmount, value: amount, inputMode: "numeric", rightView: _jsx(ThemedText, { theme: theme, type: "subtext", style: { marginRight: spacing.md }, children: selectedToken?.symbol || chainIfo.data?.nativeCurrency?.symbol }) })] }), _jsx(View, { style: styles.inputContainer, children: _jsx(ThemedButton, { theme: theme, variant: "accent", onPress: handleSend, disabled: sendMutation.isPending, children: sendMutation.isPending ? (_jsx(ThemedSpinner, { color: theme.colors.accentButtonText })) : (_jsx(ThemedText, { theme: theme, type: "defaultSemiBold", style: {
64
+ color: theme.colors.accentButtonText,
65
+ }, children: "Send" })) }) })] })] }));
66
+ };
67
+ const styles = StyleSheet.create({
68
+ container: {
69
+ paddingHorizontal: spacing.lg,
70
+ paddingVertical: spacing.lg,
71
+ flexDirection: "column",
72
+ gap: spacing.md,
73
+ },
74
+ inputContainer: {
75
+ gap: spacing.sm,
76
+ },
77
+ });
78
+ //# sourceMappingURL=SendScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendScreen.js","sourceRoot":"","sources":["../../../../../../src/react/native/ui/connect/SendScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAK5E,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAsB,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,C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