thirdweb 5.40.0-nightly-3848327373e49aa83c5902e6a16d5b8e96cf1eeb-20240726000343 → 5.40.1-nightly-b128530355f0dc47d897bd2ef7c3823752ea9b6c-20240727000321

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 (915) hide show
  1. package/dist/cjs/exports/react.js +28 -21
  2. package/dist/cjs/exports/react.js.map +1 -1
  3. package/dist/cjs/exports/react.native.js +22 -20
  4. package/dist/cjs/exports/react.native.js.map +1 -1
  5. package/dist/cjs/react/core/design-system/index.js +2 -0
  6. package/dist/cjs/react/core/design-system/index.js.map +1 -1
  7. package/dist/cjs/react/core/hooks/transaction/useEstimateGas.js +17 -2
  8. package/dist/cjs/react/core/hooks/transaction/useEstimateGas.js.map +1 -1
  9. package/dist/cjs/react/core/hooks/transaction/useEstimateGasCost.js +17 -1
  10. package/dist/cjs/react/core/hooks/transaction/useEstimateGasCost.js.map +1 -1
  11. package/dist/cjs/react/core/hooks/transaction/useSendAndConfirmTransaction.js +17 -2
  12. package/dist/cjs/react/core/hooks/transaction/useSendAndConfirmTransaction.js.map +1 -1
  13. package/dist/cjs/react/core/hooks/transaction/useSendBatchTransaction.js +17 -2
  14. package/dist/cjs/react/core/hooks/transaction/useSendBatchTransaction.js.map +1 -1
  15. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +13 -94
  16. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  17. package/dist/cjs/react/core/hooks/wallets/useActiveAccount.js +15 -2
  18. package/dist/cjs/react/core/hooks/wallets/useActiveAccount.js.map +1 -1
  19. package/dist/cjs/react/core/hooks/wallets/useActiveWallet.js +15 -2
  20. package/dist/cjs/react/core/hooks/wallets/useActiveWallet.js.map +1 -1
  21. package/dist/cjs/react/core/hooks/wallets/useActiveWalletChain.js +15 -2
  22. package/dist/cjs/react/core/hooks/wallets/useActiveWalletChain.js.map +1 -1
  23. package/dist/cjs/react/core/hooks/wallets/useActiveWalletConnectionStatus.js +19 -2
  24. package/dist/cjs/react/core/hooks/wallets/useActiveWalletConnectionStatus.js.map +1 -1
  25. package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js +5 -3
  26. package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
  27. package/dist/cjs/react/core/hooks/wallets/useCallsStatus.js +18 -2
  28. package/dist/cjs/react/core/hooks/wallets/useCallsStatus.js.map +1 -1
  29. package/dist/cjs/react/core/hooks/wallets/useCapabilities.js +19 -2
  30. package/dist/cjs/react/core/hooks/wallets/useCapabilities.js.map +1 -1
  31. package/dist/cjs/react/core/hooks/wallets/useConnect.js +34 -2
  32. package/dist/cjs/react/core/hooks/wallets/useConnect.js.map +1 -1
  33. package/dist/cjs/react/core/hooks/wallets/useConnectedWallets.js +15 -2
  34. package/dist/cjs/react/core/hooks/wallets/useConnectedWallets.js.map +1 -1
  35. package/dist/cjs/react/core/hooks/wallets/useDisconnect.js +24 -2
  36. package/dist/cjs/react/core/hooks/wallets/useDisconnect.js.map +1 -1
  37. package/dist/cjs/react/core/hooks/wallets/useIsAutoConnecting.js +17 -2
  38. package/dist/cjs/react/core/hooks/wallets/useIsAutoConnecting.js.map +1 -1
  39. package/dist/cjs/react/core/hooks/wallets/useSendCalls.js +70 -7
  40. package/dist/cjs/react/core/hooks/wallets/useSendCalls.js.map +1 -1
  41. package/dist/cjs/react/core/hooks/wallets/useSendToken.js +22 -3
  42. package/dist/cjs/react/core/hooks/wallets/useSendToken.js.map +1 -1
  43. package/dist/cjs/react/core/hooks/wallets/useSetActiveWallet.js +18 -2
  44. package/dist/cjs/react/core/hooks/wallets/useSetActiveWallet.js.map +1 -1
  45. package/dist/cjs/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js +18 -2
  46. package/dist/cjs/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +1 -1
  47. package/dist/cjs/react/core/hooks/wallets/useSwitchActiveWalletChain.js +19 -2
  48. package/dist/cjs/react/core/hooks/wallets/useSwitchActiveWalletChain.js.map +1 -1
  49. package/dist/cjs/react/core/providers/connection-manager.js +14 -0
  50. package/dist/cjs/react/core/providers/connection-manager.js.map +1 -0
  51. package/dist/cjs/react/core/providers/thirdweb-provider.js +5 -18
  52. package/dist/cjs/react/core/providers/thirdweb-provider.js.map +1 -1
  53. package/dist/cjs/react/core/utils/defaultTokens.js +32 -25
  54. package/dist/cjs/react/core/utils/defaultTokens.js.map +1 -1
  55. package/dist/cjs/react/core/utils/wallet.js +91 -13
  56. package/dist/cjs/react/core/utils/wallet.js.map +1 -1
  57. package/dist/cjs/react/native/hooks/transaction/useSendTransaction.js +2 -2
  58. package/dist/cjs/react/native/hooks/transaction/useSendTransaction.js.map +1 -1
  59. package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js +1 -2
  60. package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
  61. package/dist/cjs/react/native/providers/thirdweb-provider.js +31 -0
  62. package/dist/cjs/react/native/providers/thirdweb-provider.js.map +1 -0
  63. package/dist/cjs/react/native/ui/AutoConnect/AutoConnect.js +1 -1
  64. package/dist/cjs/react/native/ui/AutoConnect/AutoConnect.js.map +1 -1
  65. package/dist/cjs/react/native/ui/connect/ConnectButton.js +3 -3
  66. package/dist/cjs/react/native/ui/connect/ConnectButton.js.map +1 -1
  67. package/dist/cjs/react/native/ui/connect/ConnectModal.js +13 -5
  68. package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
  69. package/dist/cjs/react/native/ui/connect/ConnectedButton.js +1 -1
  70. package/dist/cjs/react/native/ui/connect/ConnectedButton.js.map +1 -1
  71. package/dist/cjs/react/native/ui/connect/ConnectedModal.js +4 -4
  72. package/dist/cjs/react/native/ui/connect/ConnectedModal.js.map +1 -1
  73. package/dist/cjs/react/native/ui/connect/SendScreen.js +3 -3
  74. package/dist/cjs/react/native/ui/connect/SendScreen.js.map +1 -1
  75. package/dist/cjs/react/native/ui/connect/TokenListScreen.js +2 -2
  76. package/dist/cjs/react/native/ui/connect/TokenListScreen.js.map +1 -1
  77. package/dist/cjs/react/native/ui/transaction/TransactionButton.js +1 -1
  78. package/dist/cjs/react/native/ui/transaction/TransactionButton.js.map +1 -1
  79. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +20 -129
  80. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  81. package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js +1 -2
  82. package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
  83. package/dist/cjs/react/web/providers/thirdweb-provider.js +31 -0
  84. package/dist/cjs/react/web/providers/thirdweb-provider.js.map +1 -0
  85. package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js +1 -1
  86. package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
  87. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +3 -3
  88. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  89. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +8 -6
  90. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  91. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +5 -11
  92. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  93. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModal.js +1 -1
  94. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModal.js.map +1 -1
  95. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +6 -4
  96. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
  97. package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +10 -3
  98. package/dist/cjs/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
  99. package/dist/cjs/react/web/ui/ConnectWallet/Modal/screen.js +1 -1
  100. package/dist/cjs/react/web/ui/ConnectWallet/Modal/screen.js.map +1 -1
  101. package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +2 -2
  102. package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
  103. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js +4 -4
  104. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
  105. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +185 -119
  106. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  107. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +104 -0
  108. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -0
  109. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/ReceiverWalletSelectionScreen.js +3 -2
  110. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/ReceiverWalletSelectionScreen.js.map +1 -1
  111. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +69 -0
  112. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -0
  113. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js +24 -6
  114. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js.map +1 -1
  115. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +4 -4
  116. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +1 -1
  117. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +2 -2
  118. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +1 -1
  119. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js +2 -2
  120. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js.map +1 -1
  121. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js +1 -1
  122. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js.map +1 -1
  123. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +132 -45
  124. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  125. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js +2 -5
  126. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js.map +1 -1
  127. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +14 -9
  128. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
  129. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js +4 -4
  130. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -1
  131. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js +1 -1
  132. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +1 -1
  133. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +1 -1
  134. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -1
  135. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js +1 -1
  136. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +1 -1
  137. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js +1 -1
  138. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +1 -1
  139. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js +1 -1
  140. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +1 -1
  141. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +9 -5
  142. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
  143. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js +1 -1
  144. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js.map +1 -1
  145. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +8 -3
  146. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
  147. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js +1 -1
  148. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js.map +1 -1
  149. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +1 -1
  150. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +1 -1
  151. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js +84 -0
  152. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js.map +1 -0
  153. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletSwitcherDrawerContent.js +14 -8
  154. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletSwitcherDrawerContent.js.map +1 -1
  155. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js +3 -3
  156. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js.map +1 -1
  157. package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +4 -4
  158. package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
  159. package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +1 -1
  160. package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
  161. package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
  162. package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
  163. package/dist/cjs/react/web/ui/ConnectWallet/screens/SendFunds.js +3 -3
  164. package/dist/cjs/react/web/ui/ConnectWallet/screens/SendFunds.js.map +1 -1
  165. package/dist/cjs/react/web/ui/ConnectWallet/screens/SignatureScreen.js +2 -2
  166. package/dist/cjs/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
  167. package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js +1 -1
  168. package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
  169. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js +2 -2
  170. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
  171. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js +2 -2
  172. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
  173. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js +1 -1
  174. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js.map +1 -1
  175. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js +1 -1
  176. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js.map +1 -1
  177. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +1 -1
  178. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -1
  179. package/dist/cjs/react/web/ui/ConnectWallet/screens/nativeToken.js +3 -1
  180. package/dist/cjs/react/web/ui/ConnectWallet/screens/nativeToken.js.map +1 -1
  181. package/dist/cjs/react/web/ui/PayEmbed.js +16 -9
  182. package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
  183. package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js +53 -0
  184. package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -0
  185. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +33 -0
  186. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -0
  187. package/dist/cjs/react/web/ui/TransactionButton/index.js +1 -1
  188. package/dist/cjs/react/web/ui/TransactionButton/index.js.map +1 -1
  189. package/dist/cjs/react/web/ui/components/WalletImage.js +1 -1
  190. package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
  191. package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +1 -1
  192. package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
  193. package/dist/cjs/version.js +1 -1
  194. package/dist/esm/exports/react.js +23 -20
  195. package/dist/esm/exports/react.js.map +1 -1
  196. package/dist/esm/exports/react.native.js +20 -19
  197. package/dist/esm/exports/react.native.js.map +1 -1
  198. package/dist/esm/react/core/design-system/index.js +2 -0
  199. package/dist/esm/react/core/design-system/index.js.map +1 -1
  200. package/dist/esm/react/core/hooks/transaction/useEstimateGas.js +16 -1
  201. package/dist/esm/react/core/hooks/transaction/useEstimateGas.js.map +1 -1
  202. package/dist/esm/react/core/hooks/transaction/useEstimateGasCost.js +17 -1
  203. package/dist/esm/react/core/hooks/transaction/useEstimateGasCost.js.map +1 -1
  204. package/dist/esm/react/core/hooks/transaction/useSendAndConfirmTransaction.js +16 -1
  205. package/dist/esm/react/core/hooks/transaction/useSendAndConfirmTransaction.js.map +1 -1
  206. package/dist/esm/react/core/hooks/transaction/useSendBatchTransaction.js +16 -1
  207. package/dist/esm/react/core/hooks/transaction/useSendBatchTransaction.js.map +1 -1
  208. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +13 -93
  209. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  210. package/dist/esm/react/core/hooks/wallets/useActiveAccount.js +14 -1
  211. package/dist/esm/react/core/hooks/wallets/useActiveAccount.js.map +1 -1
  212. package/dist/esm/react/core/hooks/wallets/useActiveWallet.js +14 -1
  213. package/dist/esm/react/core/hooks/wallets/useActiveWallet.js.map +1 -1
  214. package/dist/esm/react/core/hooks/wallets/useActiveWalletChain.js +14 -1
  215. package/dist/esm/react/core/hooks/wallets/useActiveWalletChain.js.map +1 -1
  216. package/dist/esm/react/core/hooks/wallets/useActiveWalletConnectionStatus.js +18 -1
  217. package/dist/esm/react/core/hooks/wallets/useActiveWalletConnectionStatus.js.map +1 -1
  218. package/dist/esm/react/core/hooks/wallets/useAutoConnect.js +7 -5
  219. package/dist/esm/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
  220. package/dist/esm/react/core/hooks/wallets/useCallsStatus.js +17 -1
  221. package/dist/esm/react/core/hooks/wallets/useCallsStatus.js.map +1 -1
  222. package/dist/esm/react/core/hooks/wallets/useCapabilities.js +18 -1
  223. package/dist/esm/react/core/hooks/wallets/useCapabilities.js.map +1 -1
  224. package/dist/esm/react/core/hooks/wallets/useConnect.js +33 -1
  225. package/dist/esm/react/core/hooks/wallets/useConnect.js.map +1 -1
  226. package/dist/esm/react/core/hooks/wallets/useConnectedWallets.js +14 -1
  227. package/dist/esm/react/core/hooks/wallets/useConnectedWallets.js.map +1 -1
  228. package/dist/esm/react/core/hooks/wallets/useDisconnect.js +23 -1
  229. package/dist/esm/react/core/hooks/wallets/useDisconnect.js.map +1 -1
  230. package/dist/esm/react/core/hooks/wallets/useIsAutoConnecting.js +16 -1
  231. package/dist/esm/react/core/hooks/wallets/useIsAutoConnecting.js.map +1 -1
  232. package/dist/esm/react/core/hooks/wallets/useSendCalls.js +69 -6
  233. package/dist/esm/react/core/hooks/wallets/useSendCalls.js.map +1 -1
  234. package/dist/esm/react/core/hooks/wallets/useSendToken.js +21 -2
  235. package/dist/esm/react/core/hooks/wallets/useSendToken.js.map +1 -1
  236. package/dist/esm/react/core/hooks/wallets/useSetActiveWallet.js +17 -1
  237. package/dist/esm/react/core/hooks/wallets/useSetActiveWallet.js.map +1 -1
  238. package/dist/esm/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js +17 -1
  239. package/dist/esm/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +1 -1
  240. package/dist/esm/react/core/hooks/wallets/useSwitchActiveWalletChain.js +18 -1
  241. package/dist/esm/react/core/hooks/wallets/useSwitchActiveWalletChain.js.map +1 -1
  242. package/dist/esm/react/core/providers/connection-manager.js +10 -0
  243. package/dist/esm/react/core/providers/connection-manager.js.map +1 -0
  244. package/dist/esm/react/core/providers/thirdweb-provider.js +4 -17
  245. package/dist/esm/react/core/providers/thirdweb-provider.js.map +1 -1
  246. package/dist/esm/react/core/utils/defaultTokens.js +31 -25
  247. package/dist/esm/react/core/utils/defaultTokens.js.map +1 -1
  248. package/dist/esm/react/core/utils/wallet.js +88 -13
  249. package/dist/esm/react/core/utils/wallet.js.map +1 -1
  250. package/dist/esm/react/native/hooks/transaction/useSendTransaction.js +2 -2
  251. package/dist/esm/react/native/hooks/transaction/useSendTransaction.js.map +1 -1
  252. package/dist/esm/react/native/hooks/wallets/useAutoConnect.js +1 -2
  253. package/dist/esm/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
  254. package/dist/esm/react/native/providers/thirdweb-provider.js +28 -0
  255. package/dist/esm/react/native/providers/thirdweb-provider.js.map +1 -0
  256. package/dist/esm/react/native/ui/AutoConnect/AutoConnect.js +1 -1
  257. package/dist/esm/react/native/ui/AutoConnect/AutoConnect.js.map +1 -1
  258. package/dist/esm/react/native/ui/connect/ConnectButton.js +3 -3
  259. package/dist/esm/react/native/ui/connect/ConnectButton.js.map +1 -1
  260. package/dist/esm/react/native/ui/connect/ConnectModal.js +12 -4
  261. package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
  262. package/dist/esm/react/native/ui/connect/ConnectedButton.js +1 -1
  263. package/dist/esm/react/native/ui/connect/ConnectedButton.js.map +1 -1
  264. package/dist/esm/react/native/ui/connect/ConnectedModal.js +4 -4
  265. package/dist/esm/react/native/ui/connect/ConnectedModal.js.map +1 -1
  266. package/dist/esm/react/native/ui/connect/SendScreen.js +3 -3
  267. package/dist/esm/react/native/ui/connect/SendScreen.js.map +1 -1
  268. package/dist/esm/react/native/ui/connect/TokenListScreen.js +2 -2
  269. package/dist/esm/react/native/ui/connect/TokenListScreen.js.map +1 -1
  270. package/dist/esm/react/native/ui/transaction/TransactionButton.js +1 -1
  271. package/dist/esm/react/native/ui/transaction/TransactionButton.js.map +1 -1
  272. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +22 -131
  273. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  274. package/dist/esm/react/web/hooks/wallets/useAutoConnect.js +1 -2
  275. package/dist/esm/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
  276. package/dist/esm/react/web/providers/thirdweb-provider.js +28 -0
  277. package/dist/esm/react/web/providers/thirdweb-provider.js.map +1 -0
  278. package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js +1 -1
  279. package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
  280. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +3 -3
  281. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  282. package/dist/esm/react/web/ui/ConnectWallet/Details.js +8 -6
  283. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  284. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +5 -11
  285. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  286. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModal.js +1 -1
  287. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModal.js.map +1 -1
  288. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +5 -3
  289. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
  290. package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js +9 -2
  291. package/dist/esm/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.js.map +1 -1
  292. package/dist/esm/react/web/ui/ConnectWallet/Modal/screen.js +1 -1
  293. package/dist/esm/react/web/ui/ConnectWallet/Modal/screen.js.map +1 -1
  294. package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +2 -2
  295. package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
  296. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js +4 -4
  297. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
  298. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +189 -123
  299. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  300. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +101 -0
  301. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -0
  302. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/ReceiverWalletSelectionScreen.js +2 -1
  303. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/ReceiverWalletSelectionScreen.js.map +1 -1
  304. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +66 -0
  305. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -0
  306. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js +23 -6
  307. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js.map +1 -1
  308. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +4 -4
  309. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +1 -1
  310. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +2 -2
  311. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +1 -1
  312. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js +2 -2
  313. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js.map +1 -1
  314. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js +1 -1
  315. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js.map +1 -1
  316. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +130 -44
  317. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  318. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js +2 -5
  319. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js.map +1 -1
  320. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +14 -9
  321. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
  322. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js +4 -4
  323. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -1
  324. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js +1 -1
  325. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +1 -1
  326. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +1 -1
  327. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -1
  328. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js +1 -1
  329. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +1 -1
  330. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js +1 -1
  331. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +1 -1
  332. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js +1 -1
  333. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +1 -1
  334. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +7 -4
  335. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
  336. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js +1 -1
  337. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js.map +1 -1
  338. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +9 -4
  339. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
  340. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js +1 -1
  341. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js.map +1 -1
  342. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +1 -1
  343. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +1 -1
  344. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js +81 -0
  345. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js.map +1 -0
  346. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletSwitcherDrawerContent.js +15 -9
  347. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletSwitcherDrawerContent.js.map +1 -1
  348. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js +3 -3
  349. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js.map +1 -1
  350. package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +4 -4
  351. package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
  352. package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +1 -1
  353. package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
  354. package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
  355. package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
  356. package/dist/esm/react/web/ui/ConnectWallet/screens/SendFunds.js +3 -3
  357. package/dist/esm/react/web/ui/ConnectWallet/screens/SendFunds.js.map +1 -1
  358. package/dist/esm/react/web/ui/ConnectWallet/screens/SignatureScreen.js +2 -2
  359. package/dist/esm/react/web/ui/ConnectWallet/screens/SignatureScreen.js.map +1 -1
  360. package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js +1 -1
  361. package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
  362. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js +2 -2
  363. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
  364. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js +2 -2
  365. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
  366. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js +1 -1
  367. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js.map +1 -1
  368. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js +1 -1
  369. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js.map +1 -1
  370. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +1 -1
  371. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -1
  372. package/dist/esm/react/web/ui/ConnectWallet/screens/nativeToken.js +3 -1
  373. package/dist/esm/react/web/ui/ConnectWallet/screens/nativeToken.js.map +1 -1
  374. package/dist/esm/react/web/ui/PayEmbed.js +16 -9
  375. package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
  376. package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js +50 -0
  377. package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -0
  378. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +29 -0
  379. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -0
  380. package/dist/esm/react/web/ui/TransactionButton/index.js +1 -1
  381. package/dist/esm/react/web/ui/TransactionButton/index.js.map +1 -1
  382. package/dist/esm/react/web/ui/components/WalletImage.js +1 -1
  383. package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
  384. package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +1 -1
  385. package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
  386. package/dist/esm/version.js +1 -1
  387. package/dist/types/exports/react.d.ts +23 -21
  388. package/dist/types/exports/react.d.ts.map +1 -1
  389. package/dist/types/exports/react.native.d.ts +20 -19
  390. package/dist/types/exports/react.native.d.ts.map +1 -1
  391. package/dist/types/exports/wallets.d.ts +1 -0
  392. package/dist/types/exports/wallets.d.ts.map +1 -1
  393. package/dist/types/react/core/design-system/index.d.ts +2 -0
  394. package/dist/types/react/core/design-system/index.d.ts.map +1 -1
  395. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts +80 -34
  396. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -1
  397. package/dist/types/react/core/hooks/connection/ConnectEmbedProps.d.ts +28 -0
  398. package/dist/types/react/core/hooks/connection/ConnectEmbedProps.d.ts.map +1 -1
  399. package/dist/types/react/core/hooks/transaction/useEstimateGas.d.ts +14 -2
  400. package/dist/types/react/core/hooks/transaction/useEstimateGas.d.ts.map +1 -1
  401. package/dist/types/react/core/hooks/transaction/useEstimateGasCost.d.ts +15 -2
  402. package/dist/types/react/core/hooks/transaction/useEstimateGasCost.d.ts.map +1 -1
  403. package/dist/types/react/core/hooks/transaction/useSendAndConfirmTransaction.d.ts +14 -2
  404. package/dist/types/react/core/hooks/transaction/useSendAndConfirmTransaction.d.ts.map +1 -1
  405. package/dist/types/react/core/hooks/transaction/useSendBatchTransaction.d.ts +14 -2
  406. package/dist/types/react/core/hooks/transaction/useSendBatchTransaction.d.ts.map +1 -1
  407. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +3 -15
  408. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  409. package/dist/types/react/core/hooks/wallets/useActiveAccount.d.ts +12 -2
  410. package/dist/types/react/core/hooks/wallets/useActiveAccount.d.ts.map +1 -1
  411. package/dist/types/react/core/hooks/wallets/useActiveWallet.d.ts +12 -2
  412. package/dist/types/react/core/hooks/wallets/useActiveWallet.d.ts.map +1 -1
  413. package/dist/types/react/core/hooks/wallets/useActiveWalletChain.d.ts +12 -2
  414. package/dist/types/react/core/hooks/wallets/useActiveWalletChain.d.ts.map +1 -1
  415. package/dist/types/react/core/hooks/wallets/useActiveWalletConnectionStatus.d.ts +16 -2
  416. package/dist/types/react/core/hooks/wallets/useActiveWalletConnectionStatus.d.ts.map +1 -1
  417. package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts +1 -2
  418. package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts.map +1 -1
  419. package/dist/types/react/core/hooks/wallets/useCallsStatus.d.ts +16 -3
  420. package/dist/types/react/core/hooks/wallets/useCallsStatus.d.ts.map +1 -1
  421. package/dist/types/react/core/hooks/wallets/useCapabilities.d.ts +17 -3
  422. package/dist/types/react/core/hooks/wallets/useCapabilities.d.ts.map +1 -1
  423. package/dist/types/react/core/hooks/wallets/useConnect.d.ts +32 -2
  424. package/dist/types/react/core/hooks/wallets/useConnect.d.ts.map +1 -1
  425. package/dist/types/react/core/hooks/wallets/useConnectedWallets.d.ts +12 -2
  426. package/dist/types/react/core/hooks/wallets/useConnectedWallets.d.ts.map +1 -1
  427. package/dist/types/react/core/hooks/wallets/useDisconnect.d.ts +21 -2
  428. package/dist/types/react/core/hooks/wallets/useDisconnect.d.ts.map +1 -1
  429. package/dist/types/react/core/hooks/wallets/useIsAutoConnecting.d.ts +14 -2
  430. package/dist/types/react/core/hooks/wallets/useIsAutoConnecting.d.ts.map +1 -1
  431. package/dist/types/react/core/hooks/wallets/useSendCalls.d.ts +64 -2
  432. package/dist/types/react/core/hooks/wallets/useSendCalls.d.ts.map +1 -1
  433. package/dist/types/react/core/hooks/wallets/useSendToken.d.ts +19 -3
  434. package/dist/types/react/core/hooks/wallets/useSendToken.d.ts.map +1 -1
  435. package/dist/types/react/core/hooks/wallets/useSetActiveWallet.d.ts +15 -2
  436. package/dist/types/react/core/hooks/wallets/useSetActiveWallet.d.ts.map +1 -1
  437. package/dist/types/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.d.ts +15 -2
  438. package/dist/types/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.d.ts.map +1 -1
  439. package/dist/types/react/core/hooks/wallets/useSwitchActiveWalletChain.d.ts +16 -2
  440. package/dist/types/react/core/hooks/wallets/useSwitchActiveWalletChain.d.ts.map +1 -1
  441. package/dist/types/react/core/providers/connection-manager.d.ts +35 -0
  442. package/dist/types/react/core/providers/connection-manager.d.ts.map +1 -0
  443. package/dist/types/react/core/providers/thirdweb-provider.d.ts +6 -16
  444. package/dist/types/react/core/providers/thirdweb-provider.d.ts.map +1 -1
  445. package/dist/types/react/core/utils/defaultTokens.d.ts +222 -0
  446. package/dist/types/react/core/utils/defaultTokens.d.ts.map +1 -1
  447. package/dist/types/react/core/utils/wallet.d.ts +43 -1
  448. package/dist/types/react/core/utils/wallet.d.ts.map +1 -1
  449. package/dist/types/react/native/hooks/wallets/useAutoConnect.d.ts.map +1 -1
  450. package/dist/types/react/native/providers/thirdweb-provider.d.ts +22 -0
  451. package/dist/types/react/native/providers/thirdweb-provider.d.ts.map +1 -0
  452. package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
  453. package/dist/types/react/native/ui/connect/SendScreen.d.ts.map +1 -1
  454. package/dist/types/react/native/ui/connect/TokenListScreen.d.ts.map +1 -1
  455. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts +2 -4
  456. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  457. package/dist/types/react/web/hooks/wallets/useAutoConnect.d.ts.map +1 -1
  458. package/dist/types/react/web/providers/thirdweb-provider.d.ts +22 -0
  459. package/dist/types/react/web/providers/thirdweb-provider.d.ts.map +1 -0
  460. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +3 -1
  461. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  462. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
  463. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
  464. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts +0 -3
  465. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
  466. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts +18 -0
  467. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts.map +1 -0
  468. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/ReceiverWalletSelectionScreen.d.ts.map +1 -1
  469. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts +18 -0
  470. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +1 -0
  471. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.d.ts +5 -0
  472. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.d.ts.map +1 -1
  473. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.d.ts +1 -2
  474. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.d.ts.map +1 -1
  475. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.d.ts +1 -2
  476. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.d.ts.map +1 -1
  477. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.d.ts +1 -2
  478. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.d.ts.map +1 -1
  479. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.d.ts +1 -2
  480. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.d.ts.map +1 -1
  481. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts +14 -8
  482. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts.map +1 -1
  483. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts +19 -9
  484. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts.map +1 -1
  485. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts +6 -5
  486. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts.map +1 -1
  487. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts +0 -2
  488. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +1 -1
  489. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.d.ts +1 -1
  490. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.d.ts.map +1 -1
  491. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.d.ts +1 -1
  492. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.d.ts.map +1 -1
  493. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.d.ts +1 -1
  494. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.d.ts.map +1 -1
  495. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts +4 -0
  496. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
  497. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts.map +1 -1
  498. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts +1 -0
  499. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +1 -1
  500. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts +1 -2
  501. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts.map +1 -1
  502. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts +1 -2
  503. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts.map +1 -1
  504. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts +19 -0
  505. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts.map +1 -0
  506. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletSwitcherDrawerContent.d.ts.map +1 -1
  507. package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts.map +1 -1
  508. package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
  509. package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts.map +1 -1
  510. package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts.map +1 -1
  511. package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts.map +1 -1
  512. package/dist/types/react/web/ui/PayEmbed.d.ts +0 -6
  513. package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
  514. package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts +9 -0
  515. package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts.map +1 -0
  516. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +24 -0
  517. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -0
  518. package/dist/types/version.d.ts +1 -1
  519. package/package.json +1 -1
  520. package/src/exports/react.native.ts +21 -19
  521. package/src/exports/react.ts +35 -21
  522. package/src/exports/wallets.ts +2 -0
  523. package/src/react/core/design-system/index.ts +2 -0
  524. package/src/react/core/hooks/connection/ConnectButtonProps.ts +103 -51
  525. package/src/react/core/hooks/connection/ConnectEmbedProps.ts +29 -0
  526. package/src/react/core/hooks/transaction/useEstimateGas.ts +20 -4
  527. package/src/react/core/hooks/transaction/useEstimateGasCost.ts +21 -4
  528. package/src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts +20 -4
  529. package/src/react/core/hooks/transaction/useSendBatchTransaction.ts +20 -4
  530. package/src/react/core/hooks/transaction/useSendTransaction.ts +17 -127
  531. package/src/react/core/hooks/wallets/useActiveAccount.ts +14 -2
  532. package/src/react/core/hooks/wallets/useActiveWallet.ts +14 -2
  533. package/src/react/core/hooks/wallets/useActiveWalletChain.ts +14 -2
  534. package/src/react/core/hooks/wallets/useActiveWalletConnectionStatus.ts +18 -4
  535. package/src/react/core/hooks/wallets/useAutoConnect.ts +6 -6
  536. package/src/react/core/hooks/wallets/useCallsStatus.ts +21 -9
  537. package/src/react/core/hooks/wallets/useCapabilities.ts +20 -7
  538. package/src/react/core/hooks/wallets/useConnect.ts +34 -8
  539. package/src/react/core/hooks/wallets/useConnectedWallets.ts +14 -2
  540. package/src/react/core/hooks/wallets/useDisconnect.ts +23 -2
  541. package/src/react/core/hooks/wallets/useIsAutoConnecting.ts +16 -2
  542. package/src/react/core/hooks/wallets/useSendCalls.ts +72 -12
  543. package/src/react/core/hooks/wallets/useSendToken.ts +21 -3
  544. package/src/react/core/hooks/wallets/useSetActiveWallet.ts +17 -2
  545. package/src/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.ts +17 -4
  546. package/src/react/core/hooks/wallets/useSwitchActiveWalletChain.ts +18 -2
  547. package/src/react/core/providers/connection-manager.tsx +16 -0
  548. package/src/react/core/providers/thirdweb-provider.tsx +15 -22
  549. package/src/react/core/utils/defaultTokens.ts +38 -26
  550. package/src/react/core/utils/wallet.ts +102 -18
  551. package/src/react/native/hooks/transaction/useSendTransaction.tsx +2 -2
  552. package/src/react/native/hooks/wallets/useAutoConnect.ts +1 -2
  553. package/src/react/native/providers/thirdweb-provider.tsx +43 -0
  554. package/src/react/native/ui/AutoConnect/AutoConnect.tsx +1 -1
  555. package/src/react/native/ui/connect/ConnectButton.tsx +3 -3
  556. package/src/react/native/ui/connect/ConnectModal.tsx +12 -4
  557. package/src/react/native/ui/connect/ConnectedButton.tsx +1 -1
  558. package/src/react/native/ui/connect/ConnectedModal.tsx +4 -4
  559. package/src/react/native/ui/connect/SendScreen.tsx +3 -3
  560. package/src/react/native/ui/connect/TokenListScreen.tsx +2 -2
  561. package/src/react/native/ui/transaction/TransactionButton.tsx +1 -1
  562. package/src/react/web/hooks/transaction/useSendTransaction.tsx +36 -280
  563. package/src/react/web/hooks/wallets/useAutoConnect.ts +1 -2
  564. package/src/react/web/providers/thirdweb-provider.tsx +42 -0
  565. package/src/react/web/ui/AutoConnect/AutoConnect.tsx +1 -1
  566. package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +3 -3
  567. package/src/react/web/ui/ConnectWallet/Details.tsx +11 -9
  568. package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +7 -8
  569. package/src/react/web/ui/ConnectWallet/Modal/ConnectModal.tsx +1 -1
  570. package/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx +5 -3
  571. package/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx +9 -2
  572. package/src/react/web/ui/ConnectWallet/Modal/screen.tsx +1 -1
  573. package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +2 -2
  574. package/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx +4 -4
  575. package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +348 -384
  576. package/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx +266 -0
  577. package/src/react/web/ui/ConnectWallet/screens/Buy/ReceiverWalletSelectionScreen.tsx +2 -1
  578. package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +253 -0
  579. package/src/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.tsx +53 -22
  580. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.tsx +3 -6
  581. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.tsx +5 -6
  582. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.tsx +2 -4
  583. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.tsx +2 -4
  584. package/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts +16 -12
  585. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts +155 -60
  586. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts +8 -3
  587. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +18 -13
  588. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx +5 -5
  589. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx +2 -3
  590. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.tsx +1 -1
  591. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.tsx +1 -1
  592. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.tsx +2 -2
  593. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.ts +1 -1
  594. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx +27 -19
  595. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.tsx +8 -4
  596. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +12 -5
  597. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx +2 -4
  598. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.tsx +3 -4
  599. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.tsx +243 -0
  600. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletSwitcherDrawerContent.tsx +31 -18
  601. package/src/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.tsx +3 -3
  602. package/src/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.tsx +4 -4
  603. package/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx +1 -1
  604. package/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx +1 -1
  605. package/src/react/web/ui/ConnectWallet/screens/SendFunds.tsx +3 -3
  606. package/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx +2 -2
  607. package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +1 -1
  608. package/src/react/web/ui/ConnectWallet/screens/ViewNFTs.tsx +2 -2
  609. package/src/react/web/ui/ConnectWallet/screens/ViewTokens.tsx +2 -2
  610. package/src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsx +1 -1
  611. package/src/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.tsx +1 -1
  612. package/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx +1 -1
  613. package/src/react/web/ui/ConnectWallet/screens/nativeToken.ts +5 -1
  614. package/src/react/web/ui/PayEmbed.tsx +31 -32
  615. package/src/react/web/ui/TransactionButton/ExecutingScreen.tsx +127 -0
  616. package/src/react/web/ui/TransactionButton/TransactionButton.test.tsx +8 -5
  617. package/src/react/web/ui/TransactionButton/TransactionModal.tsx +83 -0
  618. package/src/react/web/ui/TransactionButton/index.tsx +1 -1
  619. package/src/react/web/ui/components/WalletImage.tsx +1 -1
  620. package/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx +1 -1
  621. package/src/version.ts +1 -1
  622. package/dist/cjs/react/core/connectionManager.js +0 -12
  623. package/dist/cjs/react/core/connectionManager.js.map +0 -1
  624. package/dist/cjs/react/native/hooks/transaction/useEstimateGas.js +0 -23
  625. package/dist/cjs/react/native/hooks/transaction/useEstimateGas.js.map +0 -1
  626. package/dist/cjs/react/native/hooks/transaction/useEstimateGasCost.js +0 -27
  627. package/dist/cjs/react/native/hooks/transaction/useEstimateGasCost.js.map +0 -1
  628. package/dist/cjs/react/native/hooks/transaction/useSendAndConfirmTransaction.js +0 -23
  629. package/dist/cjs/react/native/hooks/transaction/useSendAndConfirmTransaction.js.map +0 -1
  630. package/dist/cjs/react/native/hooks/transaction/useSendBatchTransaction.js +0 -23
  631. package/dist/cjs/react/native/hooks/transaction/useSendBatchTransaction.js.map +0 -1
  632. package/dist/cjs/react/native/hooks/wallets/useActiveAccount.js +0 -20
  633. package/dist/cjs/react/native/hooks/wallets/useActiveAccount.js.map +0 -1
  634. package/dist/cjs/react/native/hooks/wallets/useActiveWallet.js +0 -20
  635. package/dist/cjs/react/native/hooks/wallets/useActiveWallet.js.map +0 -1
  636. package/dist/cjs/react/native/hooks/wallets/useActiveWalletChain.js +0 -20
  637. package/dist/cjs/react/native/hooks/wallets/useActiveWalletChain.js.map +0 -1
  638. package/dist/cjs/react/native/hooks/wallets/useActiveWalletConnectionStatus.js +0 -24
  639. package/dist/cjs/react/native/hooks/wallets/useActiveWalletConnectionStatus.js.map +0 -1
  640. package/dist/cjs/react/native/hooks/wallets/useCallsStatus.js +0 -24
  641. package/dist/cjs/react/native/hooks/wallets/useCallsStatus.js.map +0 -1
  642. package/dist/cjs/react/native/hooks/wallets/useCapabilities.js +0 -25
  643. package/dist/cjs/react/native/hooks/wallets/useCapabilities.js.map +0 -1
  644. package/dist/cjs/react/native/hooks/wallets/useConnect.js +0 -39
  645. package/dist/cjs/react/native/hooks/wallets/useConnect.js.map +0 -1
  646. package/dist/cjs/react/native/hooks/wallets/useConnectedWallets.js +0 -20
  647. package/dist/cjs/react/native/hooks/wallets/useConnectedWallets.js.map +0 -1
  648. package/dist/cjs/react/native/hooks/wallets/useDisconnect.js +0 -29
  649. package/dist/cjs/react/native/hooks/wallets/useDisconnect.js.map +0 -1
  650. package/dist/cjs/react/native/hooks/wallets/useIsAutoConnecting.js +0 -22
  651. package/dist/cjs/react/native/hooks/wallets/useIsAutoConnecting.js.map +0 -1
  652. package/dist/cjs/react/native/hooks/wallets/useSendCalls.js +0 -71
  653. package/dist/cjs/react/native/hooks/wallets/useSendCalls.js.map +0 -1
  654. package/dist/cjs/react/native/hooks/wallets/useSendToken.js +0 -31
  655. package/dist/cjs/react/native/hooks/wallets/useSendToken.js.map +0 -1
  656. package/dist/cjs/react/native/hooks/wallets/useSetActiveWallet.js +0 -23
  657. package/dist/cjs/react/native/hooks/wallets/useSetActiveWallet.js.map +0 -1
  658. package/dist/cjs/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.js +0 -23
  659. package/dist/cjs/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +0 -1
  660. package/dist/cjs/react/native/hooks/wallets/useSwitchActiveWalletChain.js +0 -24
  661. package/dist/cjs/react/native/hooks/wallets/useSwitchActiveWalletChain.js.map +0 -1
  662. package/dist/cjs/react/native/index.js +0 -7
  663. package/dist/cjs/react/native/index.js.map +0 -1
  664. package/dist/cjs/react/web/hooks/transaction/useEstimateGas.js +0 -23
  665. package/dist/cjs/react/web/hooks/transaction/useEstimateGas.js.map +0 -1
  666. package/dist/cjs/react/web/hooks/transaction/useEstimateGasCost.js +0 -27
  667. package/dist/cjs/react/web/hooks/transaction/useEstimateGasCost.js.map +0 -1
  668. package/dist/cjs/react/web/hooks/transaction/useSendAndConfirmTransaction.js +0 -23
  669. package/dist/cjs/react/web/hooks/transaction/useSendAndConfirmTransaction.js.map +0 -1
  670. package/dist/cjs/react/web/hooks/transaction/useSendBatchTransaction.js +0 -23
  671. package/dist/cjs/react/web/hooks/transaction/useSendBatchTransaction.js.map +0 -1
  672. package/dist/cjs/react/web/hooks/wallets/useActiveAccount.js +0 -20
  673. package/dist/cjs/react/web/hooks/wallets/useActiveAccount.js.map +0 -1
  674. package/dist/cjs/react/web/hooks/wallets/useActiveWallet.js +0 -20
  675. package/dist/cjs/react/web/hooks/wallets/useActiveWallet.js.map +0 -1
  676. package/dist/cjs/react/web/hooks/wallets/useActiveWalletChain.js +0 -20
  677. package/dist/cjs/react/web/hooks/wallets/useActiveWalletChain.js.map +0 -1
  678. package/dist/cjs/react/web/hooks/wallets/useActiveWalletConnectionStatus.js +0 -24
  679. package/dist/cjs/react/web/hooks/wallets/useActiveWalletConnectionStatus.js.map +0 -1
  680. package/dist/cjs/react/web/hooks/wallets/useCallsStatus.js +0 -24
  681. package/dist/cjs/react/web/hooks/wallets/useCallsStatus.js.map +0 -1
  682. package/dist/cjs/react/web/hooks/wallets/useCapabilities.js +0 -25
  683. package/dist/cjs/react/web/hooks/wallets/useCapabilities.js.map +0 -1
  684. package/dist/cjs/react/web/hooks/wallets/useConnect.js +0 -39
  685. package/dist/cjs/react/web/hooks/wallets/useConnect.js.map +0 -1
  686. package/dist/cjs/react/web/hooks/wallets/useConnectedWallets.js +0 -20
  687. package/dist/cjs/react/web/hooks/wallets/useConnectedWallets.js.map +0 -1
  688. package/dist/cjs/react/web/hooks/wallets/useDisconnect.js +0 -29
  689. package/dist/cjs/react/web/hooks/wallets/useDisconnect.js.map +0 -1
  690. package/dist/cjs/react/web/hooks/wallets/useIsAutoConnecting.js +0 -22
  691. package/dist/cjs/react/web/hooks/wallets/useIsAutoConnecting.js.map +0 -1
  692. package/dist/cjs/react/web/hooks/wallets/useSendCalls.js +0 -71
  693. package/dist/cjs/react/web/hooks/wallets/useSendCalls.js.map +0 -1
  694. package/dist/cjs/react/web/hooks/wallets/useSendToken.js +0 -31
  695. package/dist/cjs/react/web/hooks/wallets/useSendToken.js.map +0 -1
  696. package/dist/cjs/react/web/hooks/wallets/useSetActiveWallet.js +0 -23
  697. package/dist/cjs/react/web/hooks/wallets/useSetActiveWallet.js.map +0 -1
  698. package/dist/cjs/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.js +0 -23
  699. package/dist/cjs/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +0 -1
  700. package/dist/cjs/react/web/hooks/wallets/useSwitchActiveWalletChain.js +0 -24
  701. package/dist/cjs/react/web/hooks/wallets/useSwitchActiveWalletChain.js.map +0 -1
  702. package/dist/cjs/react/web/index.js +0 -7
  703. package/dist/cjs/react/web/index.js.map +0 -1
  704. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js +0 -66
  705. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js.map +0 -1
  706. package/dist/esm/react/core/connectionManager.js +0 -9
  707. package/dist/esm/react/core/connectionManager.js.map +0 -1
  708. package/dist/esm/react/native/hooks/transaction/useEstimateGas.js +0 -20
  709. package/dist/esm/react/native/hooks/transaction/useEstimateGas.js.map +0 -1
  710. package/dist/esm/react/native/hooks/transaction/useEstimateGasCost.js +0 -24
  711. package/dist/esm/react/native/hooks/transaction/useEstimateGasCost.js.map +0 -1
  712. package/dist/esm/react/native/hooks/transaction/useSendAndConfirmTransaction.js +0 -20
  713. package/dist/esm/react/native/hooks/transaction/useSendAndConfirmTransaction.js.map +0 -1
  714. package/dist/esm/react/native/hooks/transaction/useSendBatchTransaction.js +0 -20
  715. package/dist/esm/react/native/hooks/transaction/useSendBatchTransaction.js.map +0 -1
  716. package/dist/esm/react/native/hooks/wallets/useActiveAccount.js +0 -17
  717. package/dist/esm/react/native/hooks/wallets/useActiveAccount.js.map +0 -1
  718. package/dist/esm/react/native/hooks/wallets/useActiveWallet.js +0 -17
  719. package/dist/esm/react/native/hooks/wallets/useActiveWallet.js.map +0 -1
  720. package/dist/esm/react/native/hooks/wallets/useActiveWalletChain.js +0 -17
  721. package/dist/esm/react/native/hooks/wallets/useActiveWalletChain.js.map +0 -1
  722. package/dist/esm/react/native/hooks/wallets/useActiveWalletConnectionStatus.js +0 -21
  723. package/dist/esm/react/native/hooks/wallets/useActiveWalletConnectionStatus.js.map +0 -1
  724. package/dist/esm/react/native/hooks/wallets/useCallsStatus.js +0 -21
  725. package/dist/esm/react/native/hooks/wallets/useCallsStatus.js.map +0 -1
  726. package/dist/esm/react/native/hooks/wallets/useCapabilities.js +0 -22
  727. package/dist/esm/react/native/hooks/wallets/useCapabilities.js.map +0 -1
  728. package/dist/esm/react/native/hooks/wallets/useConnect.js +0 -36
  729. package/dist/esm/react/native/hooks/wallets/useConnect.js.map +0 -1
  730. package/dist/esm/react/native/hooks/wallets/useConnectedWallets.js +0 -17
  731. package/dist/esm/react/native/hooks/wallets/useConnectedWallets.js.map +0 -1
  732. package/dist/esm/react/native/hooks/wallets/useDisconnect.js +0 -26
  733. package/dist/esm/react/native/hooks/wallets/useDisconnect.js.map +0 -1
  734. package/dist/esm/react/native/hooks/wallets/useIsAutoConnecting.js +0 -19
  735. package/dist/esm/react/native/hooks/wallets/useIsAutoConnecting.js.map +0 -1
  736. package/dist/esm/react/native/hooks/wallets/useSendCalls.js +0 -69
  737. package/dist/esm/react/native/hooks/wallets/useSendCalls.js.map +0 -1
  738. package/dist/esm/react/native/hooks/wallets/useSendToken.js +0 -28
  739. package/dist/esm/react/native/hooks/wallets/useSendToken.js.map +0 -1
  740. package/dist/esm/react/native/hooks/wallets/useSetActiveWallet.js +0 -20
  741. package/dist/esm/react/native/hooks/wallets/useSetActiveWallet.js.map +0 -1
  742. package/dist/esm/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.js +0 -20
  743. package/dist/esm/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +0 -1
  744. package/dist/esm/react/native/hooks/wallets/useSwitchActiveWalletChain.js +0 -21
  745. package/dist/esm/react/native/hooks/wallets/useSwitchActiveWalletChain.js.map +0 -1
  746. package/dist/esm/react/native/index.js +0 -4
  747. package/dist/esm/react/native/index.js.map +0 -1
  748. package/dist/esm/react/web/hooks/transaction/useEstimateGas.js +0 -20
  749. package/dist/esm/react/web/hooks/transaction/useEstimateGas.js.map +0 -1
  750. package/dist/esm/react/web/hooks/transaction/useEstimateGasCost.js +0 -24
  751. package/dist/esm/react/web/hooks/transaction/useEstimateGasCost.js.map +0 -1
  752. package/dist/esm/react/web/hooks/transaction/useSendAndConfirmTransaction.js +0 -20
  753. package/dist/esm/react/web/hooks/transaction/useSendAndConfirmTransaction.js.map +0 -1
  754. package/dist/esm/react/web/hooks/transaction/useSendBatchTransaction.js +0 -20
  755. package/dist/esm/react/web/hooks/transaction/useSendBatchTransaction.js.map +0 -1
  756. package/dist/esm/react/web/hooks/wallets/useActiveAccount.js +0 -17
  757. package/dist/esm/react/web/hooks/wallets/useActiveAccount.js.map +0 -1
  758. package/dist/esm/react/web/hooks/wallets/useActiveWallet.js +0 -17
  759. package/dist/esm/react/web/hooks/wallets/useActiveWallet.js.map +0 -1
  760. package/dist/esm/react/web/hooks/wallets/useActiveWalletChain.js +0 -17
  761. package/dist/esm/react/web/hooks/wallets/useActiveWalletChain.js.map +0 -1
  762. package/dist/esm/react/web/hooks/wallets/useActiveWalletConnectionStatus.js +0 -21
  763. package/dist/esm/react/web/hooks/wallets/useActiveWalletConnectionStatus.js.map +0 -1
  764. package/dist/esm/react/web/hooks/wallets/useCallsStatus.js +0 -21
  765. package/dist/esm/react/web/hooks/wallets/useCallsStatus.js.map +0 -1
  766. package/dist/esm/react/web/hooks/wallets/useCapabilities.js +0 -22
  767. package/dist/esm/react/web/hooks/wallets/useCapabilities.js.map +0 -1
  768. package/dist/esm/react/web/hooks/wallets/useConnect.js +0 -36
  769. package/dist/esm/react/web/hooks/wallets/useConnect.js.map +0 -1
  770. package/dist/esm/react/web/hooks/wallets/useConnectedWallets.js +0 -17
  771. package/dist/esm/react/web/hooks/wallets/useConnectedWallets.js.map +0 -1
  772. package/dist/esm/react/web/hooks/wallets/useDisconnect.js +0 -26
  773. package/dist/esm/react/web/hooks/wallets/useDisconnect.js.map +0 -1
  774. package/dist/esm/react/web/hooks/wallets/useIsAutoConnecting.js +0 -19
  775. package/dist/esm/react/web/hooks/wallets/useIsAutoConnecting.js.map +0 -1
  776. package/dist/esm/react/web/hooks/wallets/useSendCalls.js +0 -69
  777. package/dist/esm/react/web/hooks/wallets/useSendCalls.js.map +0 -1
  778. package/dist/esm/react/web/hooks/wallets/useSendToken.js +0 -28
  779. package/dist/esm/react/web/hooks/wallets/useSendToken.js.map +0 -1
  780. package/dist/esm/react/web/hooks/wallets/useSetActiveWallet.js +0 -20
  781. package/dist/esm/react/web/hooks/wallets/useSetActiveWallet.js.map +0 -1
  782. package/dist/esm/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.js +0 -20
  783. package/dist/esm/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +0 -1
  784. package/dist/esm/react/web/hooks/wallets/useSwitchActiveWalletChain.js +0 -21
  785. package/dist/esm/react/web/hooks/wallets/useSwitchActiveWalletChain.js.map +0 -1
  786. package/dist/esm/react/web/index.js +0 -4
  787. package/dist/esm/react/web/index.js.map +0 -1
  788. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js +0 -62
  789. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalInline.js.map +0 -1
  790. package/dist/types/react/core/connectionManager.d.ts +0 -19
  791. package/dist/types/react/core/connectionManager.d.ts.map +0 -1
  792. package/dist/types/react/native/hooks/transaction/useEstimateGas.d.ts +0 -18
  793. package/dist/types/react/native/hooks/transaction/useEstimateGas.d.ts.map +0 -1
  794. package/dist/types/react/native/hooks/transaction/useEstimateGasCost.d.ts +0 -19
  795. package/dist/types/react/native/hooks/transaction/useEstimateGasCost.d.ts.map +0 -1
  796. package/dist/types/react/native/hooks/transaction/useSendAndConfirmTransaction.d.ts +0 -18
  797. package/dist/types/react/native/hooks/transaction/useSendAndConfirmTransaction.d.ts.map +0 -1
  798. package/dist/types/react/native/hooks/transaction/useSendBatchTransaction.d.ts +0 -18
  799. package/dist/types/react/native/hooks/transaction/useSendBatchTransaction.d.ts.map +0 -1
  800. package/dist/types/react/native/hooks/wallets/useActiveAccount.d.ts +0 -13
  801. package/dist/types/react/native/hooks/wallets/useActiveAccount.d.ts.map +0 -1
  802. package/dist/types/react/native/hooks/wallets/useActiveWallet.d.ts +0 -13
  803. package/dist/types/react/native/hooks/wallets/useActiveWallet.d.ts.map +0 -1
  804. package/dist/types/react/native/hooks/wallets/useActiveWalletChain.d.ts +0 -15
  805. package/dist/types/react/native/hooks/wallets/useActiveWalletChain.d.ts.map +0 -1
  806. package/dist/types/react/native/hooks/wallets/useActiveWalletConnectionStatus.d.ts +0 -17
  807. package/dist/types/react/native/hooks/wallets/useActiveWalletConnectionStatus.d.ts.map +0 -1
  808. package/dist/types/react/native/hooks/wallets/useCallsStatus.d.ts +0 -23
  809. package/dist/types/react/native/hooks/wallets/useCallsStatus.d.ts.map +0 -1
  810. package/dist/types/react/native/hooks/wallets/useCapabilities.d.ts +0 -21
  811. package/dist/types/react/native/hooks/wallets/useCapabilities.d.ts.map +0 -1
  812. package/dist/types/react/native/hooks/wallets/useConnect.d.ts +0 -37
  813. package/dist/types/react/native/hooks/wallets/useConnect.d.ts.map +0 -1
  814. package/dist/types/react/native/hooks/wallets/useConnectedWallets.d.ts +0 -13
  815. package/dist/types/react/native/hooks/wallets/useConnectedWallets.d.ts.map +0 -1
  816. package/dist/types/react/native/hooks/wallets/useDisconnect.d.ts +0 -24
  817. package/dist/types/react/native/hooks/wallets/useDisconnect.d.ts.map +0 -1
  818. package/dist/types/react/native/hooks/wallets/useIsAutoConnecting.d.ts +0 -15
  819. package/dist/types/react/native/hooks/wallets/useIsAutoConnecting.d.ts.map +0 -1
  820. package/dist/types/react/native/hooks/wallets/useSendCalls.d.ts +0 -73
  821. package/dist/types/react/native/hooks/wallets/useSendCalls.d.ts.map +0 -1
  822. package/dist/types/react/native/hooks/wallets/useSendToken.d.ts +0 -28
  823. package/dist/types/react/native/hooks/wallets/useSendToken.d.ts.map +0 -1
  824. package/dist/types/react/native/hooks/wallets/useSetActiveWallet.d.ts +0 -16
  825. package/dist/types/react/native/hooks/wallets/useSetActiveWallet.d.ts.map +0 -1
  826. package/dist/types/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.d.ts +0 -16
  827. package/dist/types/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.d.ts.map +0 -1
  828. package/dist/types/react/native/hooks/wallets/useSwitchActiveWalletChain.d.ts +0 -17
  829. package/dist/types/react/native/hooks/wallets/useSwitchActiveWalletChain.d.ts.map +0 -1
  830. package/dist/types/react/native/index.d.ts +0 -18
  831. package/dist/types/react/native/index.d.ts.map +0 -1
  832. package/dist/types/react/web/hooks/transaction/useEstimateGas.d.ts +0 -18
  833. package/dist/types/react/web/hooks/transaction/useEstimateGas.d.ts.map +0 -1
  834. package/dist/types/react/web/hooks/transaction/useEstimateGasCost.d.ts +0 -19
  835. package/dist/types/react/web/hooks/transaction/useEstimateGasCost.d.ts.map +0 -1
  836. package/dist/types/react/web/hooks/transaction/useSendAndConfirmTransaction.d.ts +0 -18
  837. package/dist/types/react/web/hooks/transaction/useSendAndConfirmTransaction.d.ts.map +0 -1
  838. package/dist/types/react/web/hooks/transaction/useSendBatchTransaction.d.ts +0 -18
  839. package/dist/types/react/web/hooks/transaction/useSendBatchTransaction.d.ts.map +0 -1
  840. package/dist/types/react/web/hooks/wallets/useActiveAccount.d.ts +0 -13
  841. package/dist/types/react/web/hooks/wallets/useActiveAccount.d.ts.map +0 -1
  842. package/dist/types/react/web/hooks/wallets/useActiveWallet.d.ts +0 -13
  843. package/dist/types/react/web/hooks/wallets/useActiveWallet.d.ts.map +0 -1
  844. package/dist/types/react/web/hooks/wallets/useActiveWalletChain.d.ts +0 -15
  845. package/dist/types/react/web/hooks/wallets/useActiveWalletChain.d.ts.map +0 -1
  846. package/dist/types/react/web/hooks/wallets/useActiveWalletConnectionStatus.d.ts +0 -17
  847. package/dist/types/react/web/hooks/wallets/useActiveWalletConnectionStatus.d.ts.map +0 -1
  848. package/dist/types/react/web/hooks/wallets/useCallsStatus.d.ts +0 -23
  849. package/dist/types/react/web/hooks/wallets/useCallsStatus.d.ts.map +0 -1
  850. package/dist/types/react/web/hooks/wallets/useCapabilities.d.ts +0 -21
  851. package/dist/types/react/web/hooks/wallets/useCapabilities.d.ts.map +0 -1
  852. package/dist/types/react/web/hooks/wallets/useConnect.d.ts +0 -37
  853. package/dist/types/react/web/hooks/wallets/useConnect.d.ts.map +0 -1
  854. package/dist/types/react/web/hooks/wallets/useConnectedWallets.d.ts +0 -13
  855. package/dist/types/react/web/hooks/wallets/useConnectedWallets.d.ts.map +0 -1
  856. package/dist/types/react/web/hooks/wallets/useDisconnect.d.ts +0 -24
  857. package/dist/types/react/web/hooks/wallets/useDisconnect.d.ts.map +0 -1
  858. package/dist/types/react/web/hooks/wallets/useIsAutoConnecting.d.ts +0 -15
  859. package/dist/types/react/web/hooks/wallets/useIsAutoConnecting.d.ts.map +0 -1
  860. package/dist/types/react/web/hooks/wallets/useSendCalls.d.ts +0 -73
  861. package/dist/types/react/web/hooks/wallets/useSendCalls.d.ts.map +0 -1
  862. package/dist/types/react/web/hooks/wallets/useSendToken.d.ts +0 -28
  863. package/dist/types/react/web/hooks/wallets/useSendToken.d.ts.map +0 -1
  864. package/dist/types/react/web/hooks/wallets/useSetActiveWallet.d.ts +0 -16
  865. package/dist/types/react/web/hooks/wallets/useSetActiveWallet.d.ts.map +0 -1
  866. package/dist/types/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.d.ts +0 -16
  867. package/dist/types/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.d.ts.map +0 -1
  868. package/dist/types/react/web/hooks/wallets/useSwitchActiveWalletChain.d.ts +0 -17
  869. package/dist/types/react/web/hooks/wallets/useSwitchActiveWalletChain.d.ts.map +0 -1
  870. package/dist/types/react/web/index.d.ts +0 -18
  871. package/dist/types/react/web/index.d.ts.map +0 -1
  872. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalInline.d.ts +0 -53
  873. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalInline.d.ts.map +0 -1
  874. package/src/react/core/connectionManager.ts +0 -14
  875. package/src/react/native/hooks/transaction/useEstimateGas.ts +0 -27
  876. package/src/react/native/hooks/transaction/useEstimateGasCost.ts +0 -33
  877. package/src/react/native/hooks/transaction/useSendAndConfirmTransaction.ts +0 -27
  878. package/src/react/native/hooks/transaction/useSendBatchTransaction.ts +0 -27
  879. package/src/react/native/hooks/wallets/useActiveAccount.ts +0 -17
  880. package/src/react/native/hooks/wallets/useActiveWallet.ts +0 -17
  881. package/src/react/native/hooks/wallets/useActiveWalletChain.ts +0 -17
  882. package/src/react/native/hooks/wallets/useActiveWalletConnectionStatus.ts +0 -21
  883. package/src/react/native/hooks/wallets/useCallsStatus.ts +0 -29
  884. package/src/react/native/hooks/wallets/useCapabilities.ts +0 -26
  885. package/src/react/native/hooks/wallets/useConnect.ts +0 -37
  886. package/src/react/native/hooks/wallets/useConnectedWallets.ts +0 -17
  887. package/src/react/native/hooks/wallets/useDisconnect.ts +0 -26
  888. package/src/react/native/hooks/wallets/useIsAutoConnecting.ts +0 -19
  889. package/src/react/native/hooks/wallets/useSendCalls.ts +0 -86
  890. package/src/react/native/hooks/wallets/useSendToken.ts +0 -29
  891. package/src/react/native/hooks/wallets/useSetActiveWallet.ts +0 -20
  892. package/src/react/native/hooks/wallets/useSetActiveWalletConnectionStatus.ts +0 -20
  893. package/src/react/native/hooks/wallets/useSwitchActiveWalletChain.ts +0 -21
  894. package/src/react/native/index.ts +0 -4
  895. package/src/react/web/hooks/transaction/useEstimateGas.ts +0 -27
  896. package/src/react/web/hooks/transaction/useEstimateGasCost.ts +0 -33
  897. package/src/react/web/hooks/transaction/useSendAndConfirmTransaction.ts +0 -27
  898. package/src/react/web/hooks/transaction/useSendBatchTransaction.ts +0 -27
  899. package/src/react/web/hooks/wallets/useActiveAccount.ts +0 -17
  900. package/src/react/web/hooks/wallets/useActiveWallet.ts +0 -17
  901. package/src/react/web/hooks/wallets/useActiveWalletChain.ts +0 -17
  902. package/src/react/web/hooks/wallets/useActiveWalletConnectionStatus.ts +0 -21
  903. package/src/react/web/hooks/wallets/useCallsStatus.ts +0 -29
  904. package/src/react/web/hooks/wallets/useCapabilities.ts +0 -26
  905. package/src/react/web/hooks/wallets/useConnect.ts +0 -37
  906. package/src/react/web/hooks/wallets/useConnectedWallets.ts +0 -17
  907. package/src/react/web/hooks/wallets/useDisconnect.ts +0 -26
  908. package/src/react/web/hooks/wallets/useIsAutoConnecting.ts +0 -19
  909. package/src/react/web/hooks/wallets/useSendCalls.ts +0 -86
  910. package/src/react/web/hooks/wallets/useSendToken.ts +0 -29
  911. package/src/react/web/hooks/wallets/useSetActiveWallet.ts +0 -20
  912. package/src/react/web/hooks/wallets/useSetActiveWalletConnectionStatus.ts +0 -20
  913. package/src/react/web/hooks/wallets/useSwitchActiveWalletChain.ts +0 -21
  914. package/src/react/web/index.ts +0 -4
  915. package/src/react/web/ui/ConnectWallet/Modal/ConnectModalInline.tsx +0 -227
@@ -1,24 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { IdCardIcon } from "@radix-ui/react-icons";
3
- import { useMemo, useState } from "react";
3
+ import { useCallback, useMemo, useState } from "react";
4
4
  import { NATIVE_TOKEN_ADDRESS } from "../../../../../../constants/addresses.js";
5
5
  import { isSwapRequiredPostOnramp } from "../../../../../../pay/buyWithFiat/isSwapRequiredPostOnramp.js";
6
6
  import { formatNumber } from "../../../../../../utils/formatNumber.js";
7
- import { toEther, toTokens } from "../../../../../../utils/units.js";
8
- import { fontSize, iconSize, spacing, } from "../../../../../core/design-system/index.js";
9
- import { useChainName } from "../../../../../core/hooks/others/useChainQuery.js";
7
+ import { iconSize, spacing, } from "../../../../../core/design-system/index.js";
10
8
  import { useWalletBalance } from "../../../../../core/hooks/others/useWalletBalance.js";
11
9
  import { useBuyWithCryptoQuote } from "../../../../../core/hooks/pay/useBuyWithCryptoQuote.js";
12
10
  import { useBuyWithFiatQuote } from "../../../../../core/hooks/pay/useBuyWithFiatQuote.js";
13
- import { useActiveAccount } from "../../../../hooks/wallets/useActiveAccount.js";
11
+ import { useActiveAccount } from "../../../../../core/hooks/wallets/useActiveAccount.js";
14
12
  import { LoadingScreen } from "../../../../wallets/shared/LoadingScreen.js";
15
13
  import { ChainName } from "../../../components/ChainName.js";
16
14
  import { Drawer, DrawerOverlay, useDrawer, } from "../../../components/Drawer.js";
17
- import { Skeleton } from "../../../components/Skeleton.js";
18
15
  import { Spacer } from "../../../components/Spacer.js";
19
16
  import { Spinner } from "../../../components/Spinner.js";
20
17
  import { SwitchNetworkButton } from "../../../components/SwitchNetwork.js";
21
- import { TokenIcon } from "../../../components/TokenIcon.js";
22
18
  import { Container, Line, ModalHeader } from "../../../components/basic.js";
23
19
  import { Button } from "../../../components/buttons.js";
24
20
  import { Text } from "../../../components/text.js";
@@ -28,22 +24,23 @@ import { ChainButton, NetworkSelectorContent } from "../../NetworkSelector.js";
28
24
  import { CoinsIcon } from "../../icons/CoinsIcon.js";
29
25
  import { TokenSelector } from "../TokenSelector.js";
30
26
  import { WalletSwitcherConnectionScreen } from "../WalletSwitcherConnectionScreen.js";
31
- import { NATIVE_TOKEN, isNativeToken, } from "../nativeToken.js";
27
+ import { isNativeToken } from "../nativeToken.js";
28
+ import { DirectPaymentModeScreen } from "./DirectPaymentModeScreen.js";
32
29
  import { EstimatedTimeAndFees } from "./EstimatedTimeAndFees.js";
33
30
  import { PayTokenIcon } from "./PayTokenIcon.js";
34
31
  import { PayWithCreditCard } from "./PayWIthCreditCard.js";
35
- import { ReceiverWalletDrawerScreen } from "./ReceiverWalletSelectionScreen.js";
32
+ import { TransactionModeScreen } from "./TransactionModeScreen.js";
36
33
  import { WalletSelectorButton } from "./WalletSelectorButton.js";
37
34
  import { CurrencySelection } from "./fiat/CurrencySelection.js";
38
35
  import { FiatFlow } from "./fiat/FiatFlow.js";
39
- import { useBuyTxStates } from "./main/useBuyTxStates.js";
40
- import { useEnabledPaymentMethods } from "./main/useEnabledPaymentMethods.js";
36
+ import { useEnabledPaymentMethods, } from "./main/useEnabledPaymentMethods.js";
41
37
  import { useUISelectionStates } from "./main/useUISelectionStates.js";
42
38
  import { openOnrampPopup } from "./openOnRamppopup.js";
43
39
  import { BuyTokenInput } from "./swap/BuyTokenInput.js";
44
40
  import { FiatFees, SwapFees } from "./swap/Fees.js";
45
41
  import { PayWithCrypto } from "./swap/PayWithCrypto.js";
46
42
  import { SwapFlow } from "./swap/SwapFlow.js";
43
+ import { TransferFlow } from "./swap/TransferFlow.js";
47
44
  import { WalletSwitcherDrawerContent } from "./swap/WalletSwitcherDrawerContent.js";
48
45
  import { addPendingTx } from "./swap/pendingSwapTx.js";
49
46
  import { useBuySupportedDestinations, useBuySupportedSources, } from "./swap/useSwapSupportedChains.js";
@@ -56,23 +53,26 @@ export default function BuyScreen(props) {
56
53
  if (!supportedDestinationsQuery.data) {
57
54
  return _jsx(LoadingScreen, {});
58
55
  }
59
- return (_jsx(BuyScreenContent, { ...props, onViewPendingTx: props.onViewPendingTx, supportedDestinations: supportedDestinationsQuery.data, buyForTx: props.buyForTx }));
56
+ return (_jsx(BuyScreenContent, { ...props, supportedDestinations: supportedDestinationsQuery.data }));
60
57
  }
61
58
  /**
62
59
  * @internal
63
60
  */
64
61
  function BuyScreenContent(props) {
65
- const { client, supportedDestinations, connectLocale, payOptions, buyForTx } = props;
62
+ const { client, supportedDestinations, connectLocale, payOptions } = props;
66
63
  const activeAccount = useActiveAccount();
67
64
  const { payer, setPayer } = usePayerSetup();
68
65
  const [screen, setScreen] = useState({
69
66
  id: "main",
70
67
  });
71
68
  const [hasEditedAmount, setHasEditedAmount] = useState(false);
69
+ const onDone = useCallback(() => {
70
+ setScreen({ id: "main" });
71
+ props.onDone();
72
+ }, [props.onDone]);
72
73
  // UI selection
73
74
  const { tokenAmount, setTokenAmount, toChain, setToChain, deferredTokenAmount, fromChain, setFromChain, toToken, setToToken, fromToken, setFromToken, selectedCurrency, setSelectedCurrency, } = useUISelectionStates({
74
75
  payOptions,
75
- buyForTx,
76
76
  supportedDestinations,
77
77
  });
78
78
  // check if the screen is expanded or not
@@ -93,6 +93,15 @@ function BuyScreenContent(props) {
93
93
  }
94
94
  return createSupportedTokens(supportedSourcesQuery.data, payOptions, props.supportedTokens);
95
95
  }, [props.supportedTokens, supportedSourcesQuery.data, payOptions]);
96
+ const enabledPaymentMethods = useEnabledPaymentMethods({
97
+ payOptions: props.payOptions,
98
+ supportedDestinations: props.supportedDestinations,
99
+ toChain: toChain,
100
+ toToken: toToken,
101
+ });
102
+ const payDisabled = enabledPaymentMethods.showPaymentSelection === false &&
103
+ enabledPaymentMethods.buyWithCryptoEnabled === false &&
104
+ enabledPaymentMethods.buyWithFiatEnabled === false;
96
105
  // screens ----------------------------
97
106
  if (screen.id === "connect-payer-wallet") {
98
107
  return (_jsx(WalletSwitcherConnectionScreen, { accountAbstraction: props.connectOptions?.accountAbstraction, appMetadata: props.connectOptions?.appMetadata, chain: props.connectOptions?.chain, chains: props.connectOptions?.chains, client: props.client, connectLocale: props.connectLocale, isEmbed: props.isEmbed, onBack: () => setScreen(screen.backScreen), onSelect: (w) => {
@@ -108,23 +117,30 @@ function BuyScreenContent(props) {
108
117
  }, recommendedWallets: props.connectOptions?.recommendedWallets, showAllWallets: !!props.connectOptions?.showAllWallets, walletConnect: props.connectOptions?.walletConnect, wallets: props.connectOptions?.wallets }));
109
118
  }
110
119
  if (screen.id === "swap-flow" && payer) {
111
- return (_jsx(SwapFlow, { title: props.title, isBuyForTx: !!props.buyForTx, isEmbed: props.isEmbed, client: client, onBack: () => {
120
+ return (_jsx(SwapFlow, { title: props.title, transactionMode: payOptions.mode === "transaction", isEmbed: props.isEmbed, client: client, onBack: () => {
112
121
  setScreen({
113
122
  id: "buy-with-crypto",
114
123
  });
115
- }, buyWithCryptoQuote: screen.quote, payer: payer, onViewPendingTx: props.onViewPendingTx, isFiatFlow: false, onDone: props.onDone, onTryAgain: () => {
124
+ }, buyWithCryptoQuote: screen.quote, payer: payer, isFiatFlow: false, onDone: onDone, onTryAgain: () => {
116
125
  setScreen({
117
126
  id: "buy-with-crypto",
118
127
  });
119
128
  } }));
120
129
  }
121
130
  if (screen.id === "fiat-flow" && payer) {
122
- return (_jsx(FiatFlow, { title: props.title, isBuyForTx: !!props.buyForTx, quote: screen.quote, onBack: () => {
131
+ return (_jsx(FiatFlow, { title: props.title, transactionMode: payOptions.mode === "transaction", quote: screen.quote, onBack: () => {
123
132
  setScreen({
124
133
  id: "buy-with-fiat",
125
134
  });
126
135
  }, client: client, testMode: props.payOptions.buyWithFiat !== false &&
127
- props.payOptions.buyWithFiat?.testMode === true, theme: typeof props.theme === "string" ? props.theme : props.theme.type, onViewPendingTx: props.onViewPendingTx, openedWindow: screen.openedWindow, onDone: props.onDone, isEmbed: props.isEmbed, payer: payer }));
136
+ props.payOptions.buyWithFiat?.testMode === true, theme: typeof props.theme === "string" ? props.theme : props.theme.type, openedWindow: screen.openedWindow, onDone: onDone, isEmbed: props.isEmbed, payer: payer }));
137
+ }
138
+ if (screen.id === "transfer-flow" && payer && activeAccount) {
139
+ const goBack = () => setScreen({ id: "buy-with-crypto" });
140
+ // TODO (pay) pass it via screen props
141
+ const defaultRecipientAddress = props.payOptions?.paymentInfo?.sellerAddress;
142
+ const receiverAddress = defaultRecipientAddress || activeAccount.address;
143
+ return (_jsx(TransferFlow, { title: props.title, onBack: goBack, payer: payer, client: props.client, onDone: onDone, chain: toChain, token: toToken, tokenAmount: tokenAmount, receiverAddress: receiverAddress, transactionMode: props.payOptions.mode === "transaction" }));
128
144
  }
129
145
  if (screen.id === "select-currency") {
130
146
  const goBack = () => setScreen(screen.backScreen);
@@ -136,8 +152,10 @@ function BuyScreenContent(props) {
136
152
  if (screen.id === "select-to-token") {
137
153
  const chains = supportedDestinations.map((x) => x.chain);
138
154
  const goBack = () => setScreen(screen.backScreen);
155
+ const allowEdits = payOptions?.prefillBuy
156
+ ?.allowEdits;
139
157
  // if token selection is disabled - only show network selector screen
140
- if (payOptions.prefillBuy?.allowEdits?.token === false) {
158
+ if (allowEdits?.token === false) {
141
159
  return (_jsx(ChainSelectionScreen, { chains: chains, client: props.client, connectLocale: props.connectLocale, setChain: setToChain, goBack: goBack }));
142
160
  }
143
161
  return (_jsx(TokenSelector, { onBack: goBack, tokenList: ((toChain?.id ? destinationSupportedTokens[toChain.id] : undefined) ||
@@ -146,7 +164,7 @@ function BuyScreenContent(props) {
146
164
  goBack();
147
165
  }, chain: toChain, chainSelection:
148
166
  // hide chain selection if it's disabled
149
- payOptions.prefillBuy?.allowEdits?.chain !== false
167
+ allowEdits?.chain !== false
150
168
  ? {
151
169
  chains: chains,
152
170
  select: (c) => {
@@ -179,25 +197,55 @@ function BuyScreenContent(props) {
179
197
  }
180
198
  : undefined, connectLocale: connectLocale, client: client, modalTitle: "Pay with" }));
181
199
  }
182
- return (_jsx(Container, { animate: "fadein", children: _jsxs("div", { children: [screen.id === "main" && (_jsx(MainScreen, { title: props.title, payerAccount: payer?.account, buyForTx: buyForTx, client: client, onSelectBuyToken: () => setScreen({ id: "select-to-token", backScreen: screen }), payOptions: payOptions, setTokenAmount: setTokenAmount, toChain: toChain, toToken: toToken, tokenAmount: tokenAmount, connectOptions: props.connectOptions, onViewPendingTx: props.onViewPendingTx, setScreen: setScreen, supportedDestinations: supportedDestinations, onBack: props.onBack, theme: props.theme, hasEditedAmount: hasEditedAmount, setHasEditedAmount: setHasEditedAmount })), (screen.id === "select-payment-method" ||
200
+ return (_jsx(Container, { animate: "fadein", children: _jsxs("div", { children: [screen.id === "main" && (_jsx(MainScreen, { title: props.title, payerAccount: payer?.account, client: client, onSelectBuyToken: () => setScreen({ id: "select-to-token", backScreen: screen }), payOptions: payOptions, setTokenAmount: setTokenAmount, setToChain: setToChain, setToToken: setToToken, setFromChain: setFromChain, setFromToken: setFromToken, toChain: toChain, toToken: toToken, tokenAmount: tokenAmount, connectOptions: props.connectOptions, setScreen: setScreen, supportedDestinations: supportedDestinations, onBack: props.onBack, theme: props.theme, hasEditedAmount: hasEditedAmount, setHasEditedAmount: setHasEditedAmount, enabledPaymentMethods: enabledPaymentMethods })), (screen.id === "select-payment-method" ||
201
+ screen.id === "select-wallet" ||
183
202
  screen.id === "buy-with-crypto" ||
184
203
  screen.id === "buy-with-fiat") &&
185
204
  payer && (_jsxs(TokenSelectedLayout, { title: props.title, selectedChain: toChain, selectedToken: toToken, tokenAmount: tokenAmount, client: client, onBack: () => {
186
- if (screen.id === "buy-with-crypto" ||
187
- screen.id === "buy-with-fiat") {
205
+ if (enabledPaymentMethods.showPaymentSelection &&
206
+ (screen.id === "select-wallet" ||
207
+ screen.id === "buy-with-fiat")) {
188
208
  setScreen({ id: "select-payment-method" });
189
209
  }
190
- else if (screen.id === "select-payment-method") {
210
+ else if (screen.id === "buy-with-crypto") {
211
+ setScreen({ id: "select-wallet" });
212
+ }
213
+ else {
191
214
  setScreen({ id: "main" });
192
215
  }
193
- }, children: [screen.id === "select-payment-method" && (_jsx(PaymentMethodSelection, { setScreen: (id) => setScreen({ id }) })), screen.id === "buy-with-crypto" && activeAccount && (_jsx(SwapScreenContent, { setScreen: setScreen, tokenAmount: deferredTokenAmount, toChain: toChain, toToken: toToken, fromChain: fromChain, fromToken: fromToken, showFromTokenSelector: () => {
216
+ }, children: [screen.id === "select-payment-method" && (_jsx(PaymentMethodSelection, { setScreen: (id) => setScreen({ id }) })), screen.id === "select-wallet" && (_jsx(WalletSwitcherDrawerContent, { client: client, onSelect: (w) => {
217
+ const chain = w.getChain();
218
+ const account = w.getAccount();
219
+ if (chain && account) {
220
+ setPayer({
221
+ account,
222
+ chain,
223
+ wallet: w,
224
+ });
225
+ setScreen({ id: "buy-with-crypto" });
226
+ }
227
+ }, showAllWallets: !!props.connectOptions?.showAllWallets, wallets: props.connectOptions?.wallets, onBack: () => {
228
+ // no-op
229
+ }, onConnect: () => {
230
+ setScreen({
231
+ id: "connect-payer-wallet",
232
+ backScreen: {
233
+ id: "select-wallet",
234
+ },
235
+ });
236
+ }, selectedAddress: payer.account.address })), screen.id === "buy-with-crypto" && activeAccount && (_jsx(SwapScreenContent, { setScreen: setScreen, tokenAmount: deferredTokenAmount, toChain: toChain, toToken: toToken, fromChain: fromChain, fromToken: fromToken, showFromTokenSelector: () => {
194
237
  setScreen({
195
238
  id: "select-from-token",
196
239
  backScreen: screen,
197
240
  });
198
- }, payer: payer, buyForTx: buyForTx || null, client: client, isEmbed: props.isEmbed, onDone: props.onDone, onViewPendingTx: props.onViewPendingTx, payOptions: payOptions, connectLocale: connectLocale, connectOptions: props.connectOptions, setPayer: setPayer,
241
+ }, payer: payer, client: client, isEmbed: props.isEmbed, onDone: onDone, payOptions: payOptions, connectLocale: connectLocale, connectOptions: props.connectOptions, setPayer: setPayer,
199
242
  // pass it even though we are passing payer, because payer might be different
200
- activeAccount: activeAccount, setTokenAmount: setTokenAmount, setHasEditedAmount: setHasEditedAmount })), screen.id === "buy-with-fiat" && (_jsx(FiatScreenContent, { setScreen: setScreen, tokenAmount: deferredTokenAmount, toChain: toChain, toToken: toToken, selectedCurrency: selectedCurrency, buyForTx: buyForTx || null, client: client, isEmbed: props.isEmbed, onDone: props.onDone, onViewPendingTx: props.onViewPendingTx, payOptions: payOptions, theme: props.theme, showCurrencySelector: () => {
243
+ activeAccount: activeAccount, setTokenAmount: setTokenAmount, setHasEditedAmount: setHasEditedAmount, disableTokenSelection: payDisabled === true ||
244
+ (payOptions.buyWithCrypto !== false &&
245
+ payOptions.buyWithCrypto?.prefillSource?.allowEdits
246
+ ?.chain === false &&
247
+ payOptions.buyWithCrypto?.prefillSource?.allowEdits
248
+ ?.token === false) })), screen.id === "buy-with-fiat" && (_jsx(FiatScreenContent, { setScreen: setScreen, tokenAmount: deferredTokenAmount, toChain: toChain, toToken: toToken, selectedCurrency: selectedCurrency, client: client, isEmbed: props.isEmbed, onDone: onDone, payOptions: payOptions, theme: props.theme, showCurrencySelector: () => {
201
249
  setScreen({
202
250
  id: "select-currency",
203
251
  backScreen: screen,
@@ -210,48 +258,79 @@ function SelectedTokenInfo(props) {
210
258
  }, children: [_jsxs(Container, { flex: "row", gap: "xs", center: "y", children: [_jsx(Text, { color: "primaryText", "data-testid": "tokenAmount", size: "xl", children: formatNumber(Number(props.tokenAmount), 6) }), _jsxs(Container, { flex: "row", gap: "xxs", center: "y", children: [_jsx(TokenSymbol, { token: props.selectedToken, chain: props.selectedChain, size: "md", color: "secondaryText" }), _jsx(PayTokenIcon, { chain: props.selectedChain, client: props.client, size: "sm", token: props.selectedToken })] })] }), _jsx(ChainName, { chain: props.selectedChain, client: props.client, size: "sm", short: true })] }) }));
211
259
  }
212
260
  function MainScreen(props) {
213
- const { showPaymentSelection, buyWithCryptoEnabled, buyWithFiatEnabled } = useEnabledPaymentMethods({
214
- payOptions: props.payOptions,
215
- supportedDestinations: props.supportedDestinations,
216
- toChain: props.toChain,
217
- toToken: props.toToken,
218
- });
219
- const { buyForTx, setTokenAmount, payerAccount, client, tokenAmount, payOptions, toToken, toChain, } = props;
220
- // Buy Transaction flow states
221
- const { amountNeeded } = useBuyTxStates({
222
- setTokenAmount,
223
- buyForTx: buyForTx || null,
224
- hasEditedAmount: props.hasEditedAmount,
225
- account: payerAccount || null,
226
- });
261
+ const { setTokenAmount, setToChain, setToToken, setFromChain, setFromToken, payerAccount, client, tokenAmount, payOptions, toToken, toChain, supportedDestinations, enabledPaymentMethods, } = props;
262
+ const { showPaymentSelection, buyWithCryptoEnabled, buyWithFiatEnabled } = enabledPaymentMethods;
227
263
  const disableContinue = !tokenAmount;
228
- return (_jsxs(Container, { p: "lg", children: [_jsx(ModalHeader, { title: props.buyForTx
229
- ? `Not enough ${props.buyForTx.tokenSymbol}`
230
- : props.title, onBack: props.onBack }), amountNeeded && props.buyForTx ? (_jsxs(_Fragment, { children: [_jsx(Spacer, { y: "lg" }), _jsx(BuyForTxUI, { amountNeeded: String(formatNumber(Number(toTokens(amountNeeded, props.buyForTx.tokenDecimals)), 6)), buyForTx: props.buyForTx, client: client })] })) : (_jsx(Spacer, { y: "xl" })), _jsx(BuyTokenInput, { value: tokenAmount, onChange: async (value) => {
231
- props.setHasEditedAmount(true);
232
- setTokenAmount(value);
233
- }, freezeAmount: payOptions.prefillBuy?.allowEdits?.amount === false, freezeChainAndToken: payOptions.prefillBuy?.allowEdits?.chain === false &&
234
- payOptions.prefillBuy?.allowEdits?.token === false, token: toToken, chain: toChain, onSelectToken: props.onSelectBuyToken, client: props.client, hideTokenSelector: !!props.buyForTx }), _jsx(Spacer, { y: "xl" }), _jsxs(Container, { flex: "column", gap: "sm", children: [!payerAccount ? (_jsx("div", { children: _jsx(ConnectButton, { ...props.connectOptions, client: props.client, theme: props.theme, connectButton: {
235
- style: {
236
- width: "100%",
237
- },
238
- } }) })) : (_jsx(Button, { variant: "accent", fullWidth: true, disabled: disableContinue, "data-disabled": disableContinue, onClick: () => {
239
- if (showPaymentSelection) {
240
- props.setScreen({ id: "select-payment-method" });
241
- }
242
- else if (buyWithCryptoEnabled) {
243
- props.setScreen({ id: "buy-with-crypto" });
244
- }
245
- else if (buyWithFiatEnabled) {
246
- props.setScreen({ id: "buy-with-fiat" });
247
- }
248
- else {
249
- console.error("No payment method enabled");
250
- }
251
- }, children: "Continue" })), payerAccount && (_jsx(Button, { variant: "outline", fullWidth: true, style: {
252
- padding: spacing.xs,
253
- fontSize: fontSize.sm,
254
- }, onClick: props.onViewPendingTx, children: "View all transactions" }))] })] }));
264
+ switch (payOptions.mode) {
265
+ case "transaction": {
266
+ return (_jsx(TransactionModeScreen, { supportedDestinations: supportedDestinations, payUiOptions: payOptions, payerAccount: payerAccount, connectOptions: props.connectOptions, client: client, onContinue: (tokenAmount, toChain, toToken) => {
267
+ setTokenAmount(tokenAmount);
268
+ setToChain(toChain);
269
+ setFromChain(toChain);
270
+ setFromToken(toToken);
271
+ setToToken(toToken);
272
+ if (showPaymentSelection) {
273
+ props.setScreen({ id: "select-payment-method" });
274
+ }
275
+ else if (buyWithCryptoEnabled) {
276
+ props.setScreen({ id: "select-wallet" });
277
+ }
278
+ else if (buyWithFiatEnabled) {
279
+ props.setScreen({ id: "buy-with-fiat" });
280
+ }
281
+ else {
282
+ // default to buy with crypto with connected wallet if chain not supported by pay
283
+ props.setScreen({ id: "select-wallet" });
284
+ }
285
+ } }));
286
+ }
287
+ case "direct_payment": {
288
+ return (_jsx(DirectPaymentModeScreen, { client: client, payUiOptions: payOptions, payerAccount: payerAccount, connectOptions: props.connectOptions, supportedDestinations: supportedDestinations, onContinue: (tokenAmount, toChain, toToken) => {
289
+ setTokenAmount(tokenAmount);
290
+ setToChain(toChain);
291
+ setFromChain(toChain);
292
+ setFromToken(toToken);
293
+ setToToken(toToken);
294
+ if (showPaymentSelection) {
295
+ props.setScreen({ id: "select-payment-method" });
296
+ }
297
+ else if (buyWithCryptoEnabled) {
298
+ props.setScreen({ id: "buy-with-crypto" });
299
+ }
300
+ else if (buyWithFiatEnabled) {
301
+ props.setScreen({ id: "buy-with-fiat" });
302
+ }
303
+ else {
304
+ // default to buy with crypto with connected wallet if chain not supported by pay
305
+ props.setScreen({ id: "select-wallet" });
306
+ }
307
+ } }));
308
+ }
309
+ default: {
310
+ return (_jsxs(Container, { p: "lg", children: [_jsx(ModalHeader, { title: props.title, onBack: props.onBack }), _jsx(Spacer, { y: "xl" }), _jsx(BuyTokenInput, { value: tokenAmount, onChange: async (value) => {
311
+ props.setHasEditedAmount(true);
312
+ setTokenAmount(value);
313
+ }, freezeAmount: payOptions.prefillBuy?.allowEdits?.amount === false, freezeChainAndToken: payOptions.prefillBuy?.allowEdits?.chain === false &&
314
+ payOptions.prefillBuy?.allowEdits?.token === false, token: toToken, chain: toChain, onSelectToken: props.onSelectBuyToken, client: props.client }), _jsx(Spacer, { y: "xl" }), _jsx(Container, { flex: "column", gap: "sm", children: !payerAccount ? (_jsx("div", { children: _jsx(ConnectButton, { ...props.connectOptions, client: props.client, theme: props.theme, connectButton: {
315
+ style: {
316
+ width: "100%",
317
+ },
318
+ } }) })) : (_jsx(Button, { variant: "accent", fullWidth: true, disabled: disableContinue, "data-disabled": disableContinue, onClick: () => {
319
+ if (showPaymentSelection) {
320
+ props.setScreen({ id: "select-payment-method" });
321
+ }
322
+ else if (buyWithCryptoEnabled) {
323
+ props.setScreen({ id: "buy-with-crypto" });
324
+ }
325
+ else if (buyWithFiatEnabled) {
326
+ props.setScreen({ id: "buy-with-fiat" });
327
+ }
328
+ else {
329
+ console.error("No payment method enabled");
330
+ }
331
+ }, children: "Continue" })) })] }));
332
+ }
333
+ }
255
334
  }
256
335
  function TokenSelectedLayout(props) {
257
336
  return (_jsxs(Container, { children: [_jsx(Container, { p: "lg", children: _jsx(ModalHeader, { title: props.title, onBack: props.onBack }) }), _jsxs(Container, { px: "lg", style: {
@@ -265,13 +344,14 @@ function PaymentMethodSelection(props) {
265
344
  }, children: [_jsx(Container, { color: "secondaryText", flex: "row", center: "both", children: _jsx(IdCardIcon, { style: {
266
345
  width: iconSize.md,
267
346
  height: iconSize.md,
268
- } }) }), _jsxs(Container, { flex: "column", gap: "xxs", children: [_jsx(Text, { size: "md", color: "primaryText", children: "Credit Card" }), _jsx(Text, { size: "xs", children: "Easily and securely make payments" })] })] }), _jsxs(Button, { variant: "outline", bg: "tertiaryBg", onClick: () => props.setScreen("buy-with-crypto"), style: {
347
+ } }) }), _jsxs(Container, { flex: "column", gap: "xxs", children: [_jsx(Text, { size: "md", color: "primaryText", children: "Credit Card" }), _jsx(Text, { size: "xs", children: "Securely pay with credit card" })] })] }), _jsxs(Button, { variant: "outline", bg: "tertiaryBg", onClick: () => props.setScreen("select-wallet"), style: {
269
348
  justifyContent: "flex-start",
270
- }, gap: "sm", children: [_jsx(Container, { color: "secondaryText", flex: "row", center: "both", children: _jsx(CoinsIcon, { size: iconSize.md }) }), _jsxs(Container, { flex: "column", gap: "xxs", children: [_jsx(Text, { size: "md", color: "primaryText", children: "Crypto" }), _jsx(Text, { size: "xs", children: "Pay with confidence using crypto" })] })] })] }) }));
349
+ }, gap: "sm", children: [_jsx(Container, { color: "secondaryText", flex: "row", center: "both", children: _jsx(CoinsIcon, { size: iconSize.md }) }), _jsxs(Container, { flex: "column", gap: "xxs", children: [_jsx(Text, { size: "md", color: "primaryText", children: "Crypto" }), _jsx(Text, { size: "xs", children: "Pay with your connected wallet" })] })] })] }) }));
271
350
  }
272
351
  function SwapScreenContent(props) {
273
- const { setScreen, payer, client, toChain, tokenAmount, toToken, fromChain, fromToken, showFromTokenSelector, payOptions, } = props;
274
- const [receiverAddress, setReceiverAddress] = useState(props.payOptions.recipientAddress || props.activeAccount.address);
352
+ const { setScreen, payer, client, toChain, tokenAmount, toToken, fromChain, fromToken, showFromTokenSelector, payOptions, disableTokenSelection, } = props;
353
+ const defaultRecipientAddress = props.payOptions?.paymentInfo?.sellerAddress;
354
+ const receiverAddress = defaultRecipientAddress || props.activeAccount.address;
275
355
  const { drawerRef, drawerOverlayRef, isOpen, setIsOpen } = useDrawer();
276
356
  const [drawerScreen, setDrawerScreen] = useState("fees");
277
357
  const fromTokenBalanceQuery = useWalletBalance({
@@ -280,7 +360,15 @@ function SwapScreenContent(props) {
280
360
  tokenAddress: isNativeToken(fromToken) ? undefined : fromToken.address,
281
361
  client,
282
362
  });
283
- const quoteParams = tokenAmount && !(fromChain.id === toChain.id && fromToken === toToken)
363
+ const fromTokenId = isNativeToken(fromToken)
364
+ ? NATIVE_TOKEN_ADDRESS
365
+ : fromToken.address.toLowerCase();
366
+ const toTokenId = isNativeToken(toToken)
367
+ ? NATIVE_TOKEN_ADDRESS
368
+ : toToken.address.toLowerCase();
369
+ const swapRequired = !!tokenAmount &&
370
+ !(fromChain.id === toChain.id && fromTokenId === toTokenId);
371
+ const quoteParams = swapRequired
284
372
  ? {
285
373
  // wallets
286
374
  fromAddress: payer.account.address,
@@ -306,11 +394,13 @@ function SwapScreenContent(props) {
306
394
  refetchInterval: 30 * 1000,
307
395
  gcTime: 30 * 1000,
308
396
  });
309
- const sourceTokenAmount = quoteQuery.data?.swapDetails.fromAmount;
397
+ const sourceTokenAmount = swapRequired
398
+ ? quoteQuery.data?.swapDetails.fromAmount
399
+ : tokenAmount;
310
400
  const isNotEnoughBalance = !!sourceTokenAmount &&
311
401
  !!fromTokenBalanceQuery.data &&
312
402
  Number(fromTokenBalanceQuery.data.displayValue) < Number(sourceTokenAmount);
313
- const disableContinue = !quoteQuery.data || isNotEnoughBalance;
403
+ const disableContinue = (swapRequired && !quoteQuery.data) || isNotEnoughBalance;
314
404
  const switchChainRequired = props.payer.chain.id !== fromChain.id;
315
405
  // biome-ignore lint/suspicious/noExplicitAny: <explanation>
316
406
  function getErrorMessage(err) {
@@ -333,6 +423,22 @@ function SwapScreenContent(props) {
333
423
  ? getErrorMessage(quoteQuery.error)
334
424
  : undefined;
335
425
  function showSwapFlow() {
426
+ if ((props.payOptions.mode === "transaction" ||
427
+ props.payOptions.mode === "direct_payment") &&
428
+ !isNotEnoughBalance &&
429
+ !swapRequired) {
430
+ if (payer.account.address !== receiverAddress) {
431
+ // same currency, just transfer, but from another wallet
432
+ setScreen({
433
+ id: "transfer-flow",
434
+ });
435
+ }
436
+ else {
437
+ // has enough balance to just do the transaction directly
438
+ props.onDone();
439
+ }
440
+ return;
441
+ }
336
442
  if (!quoteQuery.data) {
337
443
  return;
338
444
  }
@@ -348,40 +454,12 @@ function SwapScreenContent(props) {
348
454
  setIsOpen(true);
349
455
  setDrawerScreen("fees");
350
456
  }
351
- const prefillSource = payOptions.buyWithCrypto !== false
352
- ? payOptions.buyWithCrypto?.prefillSource
353
- : undefined;
354
- const disableReceiverSelection = !!props.payOptions.recipientAddress;
355
- return (_jsxs(Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && (_jsxs(_Fragment, { children: [_jsx(DrawerOverlay, { ref: drawerOverlayRef }), _jsxs(Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: [drawerScreen === "fees" && quoteQuery.data && (_jsxs("div", { children: [_jsx(Text, { size: "lg", color: "primaryText", children: "Fees" }), _jsx(Spacer, { y: "lg" }), _jsx(SwapFees, { quote: quoteQuery.data, align: "left" })] })), drawerScreen === "receiver" && (_jsx(ReceiverWalletDrawerScreen, { client: props.client, onSelect: (x) => setReceiverAddress(x), receiverAddress: receiverAddress, onBack: () => setIsOpen(false) })), drawerScreen === "payer" && (_jsx(WalletSwitcherDrawerContent, { client: client, onSelect: (w) => {
356
- const chain = w.getChain();
357
- const account = w.getAccount();
358
- if (chain && account) {
359
- props.setPayer({
360
- account,
361
- chain,
362
- wallet: w,
363
- });
364
- }
365
- }, showAllWallets: !!props.connectOptions?.showAllWallets, wallets: props.connectOptions?.wallets, onBack: () => {
366
- setIsOpen(false);
367
- }, onConnect: () => {
368
- setScreen({
369
- id: "connect-payer-wallet",
370
- backScreen: {
371
- id: "buy-with-crypto",
372
- },
373
- });
374
- }, selectedAddress: payer.account.address }))] })] })), _jsxs("div", { children: [_jsx(WalletSelectorButton, { client: props.client, onClick: () => {
375
- setIsOpen(true);
376
- setDrawerScreen("payer");
457
+ return (_jsxs(Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && (_jsxs(_Fragment, { children: [_jsx(DrawerOverlay, { ref: drawerOverlayRef }), _jsx(Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: drawerScreen === "fees" && quoteQuery.data && (_jsxs("div", { children: [_jsx(Text, { size: "lg", color: "primaryText", children: "Fees" }), _jsx(Spacer, { y: "lg" }), _jsx(SwapFees, { quote: quoteQuery.data, align: "left" })] })) })] })), _jsxs("div", { children: [_jsx(WalletSelectorButton, { client: props.client, onClick: () => {
458
+ setScreen({ id: "select-wallet" });
377
459
  }, address: props.payer.account.address, walletId: props.payer.wallet.id, containerStyle: {
378
460
  borderBottomRightRadius: 0,
379
461
  borderBottomLeftRadius: 0,
380
- } }), _jsx(PayWithCrypto, { value: sourceTokenAmount || "", onSelectToken: showFromTokenSelector, chain: fromChain, token: fromToken, isLoading: quoteQuery.isLoading && !sourceTokenAmount, client: client, freezeChainAndTokenSelection: prefillSource?.allowEdits?.chain === false &&
381
- prefillSource?.allowEdits?.token === false, payerAccount: props.payer.account }), _jsx(EstimatedTimeAndFees, { quoteIsLoading: quoteQuery.isLoading, estimatedSeconds: quoteQuery.data?.swapDetails.estimated.durationSeconds, onViewFees: showFees }), _jsx(Spacer, { y: "md" }), _jsx(Text, { size: "sm", children: "Send to" }), _jsx(Spacer, { y: "xs" }), _jsx(WalletSelectorButton, { client: props.client, disabled: disableReceiverSelection, disableChevron: disableReceiverSelection, onClick: () => {
382
- setIsOpen(true);
383
- setDrawerScreen("receiver");
384
- }, address: receiverAddress, walletId: undefined })] }), errorMsg && (_jsxs("div", { children: [errorMsg.minAmount && (_jsxs(Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", _jsx(TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => (_jsx(Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), errorMsg?.minAmount ? (_jsx(Button, { variant: "accent", fullWidth: true, onClick: () => {
462
+ } }), _jsx(PayWithCrypto, { value: sourceTokenAmount || "", onSelectToken: showFromTokenSelector, chain: fromChain, token: fromToken, isLoading: quoteQuery.isLoading && !sourceTokenAmount, client: client, freezeChainAndTokenSelection: disableTokenSelection, payerAccount: props.payer.account, swapRequired: swapRequired }), swapRequired && (_jsx(EstimatedTimeAndFees, { quoteIsLoading: quoteQuery.isLoading, estimatedSeconds: quoteQuery.data?.swapDetails.estimated.durationSeconds, onViewFees: showFees })), _jsx(Spacer, { y: "md" })] }), errorMsg && (_jsxs("div", { children: [errorMsg.minAmount && (_jsxs(Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", _jsx(TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => (_jsx(Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), !errorMsg && isNotEnoughBalance && (_jsxs("div", { children: [_jsx(Text, { color: "danger", size: "sm", center: true, multiline: true, children: "Not enough funds." }), _jsx(Text, { color: "danger", size: "sm", center: true, multiline: true, children: "Try a different wallet or token." })] })), errorMsg?.minAmount ? (_jsx(Button, { variant: "accent", fullWidth: true, onClick: () => {
385
463
  props.setTokenAmount(String(errorMsg.minAmount));
386
464
  props.setHasEditedAmount(true);
387
465
  }, children: "Set Minimum" })) : switchChainRequired &&
@@ -393,11 +471,12 @@ function SwapScreenContent(props) {
393
471
  if (!disableContinue) {
394
472
  showSwapFlow();
395
473
  }
396
- }, gap: "xs", children: isNotEnoughBalance ? (_jsx(Text, { color: "danger", children: "Not Enough Funds" })) : quoteQuery.isLoading ? (_jsxs(_Fragment, { children: ["Getting price quote", _jsx(Spinner, { size: "sm", color: "accentText" })] })) : ("Continue") }))] }));
474
+ }, gap: "xs", children: quoteQuery.isLoading ? (_jsxs(_Fragment, { children: ["Getting price quote", _jsx(Spinner, { size: "sm", color: "accentText" })] })) : ("Continue") }))] }));
397
475
  }
398
476
  function FiatScreenContent(props) {
399
477
  const { toToken, tokenAmount, payer, client, setScreen, toChain, showCurrencySelector, selectedCurrency, } = props;
400
- const [receiverAddress, setReceiverAddress] = useState(props.payOptions.recipientAddress || props.payer.account.address);
478
+ const defaultRecipientAddress = props.payOptions?.paymentInfo?.sellerAddress;
479
+ const receiverAddress = defaultRecipientAddress || props.payer.account.address;
401
480
  const { drawerRef, drawerOverlayRef, isOpen, setIsOpen } = useDrawer();
402
481
  const [drawerScreen, setDrawerScreen] = useState("fees");
403
482
  const buyWithFiatOptions = props.payOptions.buyWithFiat;
@@ -460,32 +539,19 @@ function FiatScreenContent(props) {
460
539
  };
461
540
  }
462
541
  const disableSubmit = !fiatQuoteQuery.data;
463
- const disableReceiverSelection = !!props.payOptions.recipientAddress;
464
542
  const errorMsg = !fiatQuoteQuery.isLoading && fiatQuoteQuery.error
465
543
  ? getErrorMessage(fiatQuoteQuery.error)
466
544
  : undefined;
467
- return (_jsxs(Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && (_jsxs(_Fragment, { children: [_jsx(DrawerOverlay, { ref: drawerOverlayRef }), _jsxs(Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: [drawerScreen === "fees" && fiatQuoteQuery.data && (_jsxs("div", { children: [_jsx(Text, { size: "lg", color: "primaryText", children: "Fees" }), _jsx(Spacer, { y: "lg" }), _jsx(FiatFees, { quote: fiatQuoteQuery.data })] })), drawerScreen === "receiver" && (_jsx(ReceiverWalletDrawerScreen, { client: props.client, onSelect: (x) => setReceiverAddress(x), receiverAddress: receiverAddress, onBack: () => setIsOpen(false) }))] })] })), _jsxs("div", { children: [_jsx(PayWithCreditCard, { isLoading: fiatQuoteQuery.isLoading, value: fiatQuoteQuery.data?.fromCurrencyWithFees.amount, client: client, currency: selectedCurrency, onSelectCurrency: showCurrencySelector }), _jsx(EstimatedTimeAndFees, { quoteIsLoading: fiatQuoteQuery.isLoading, estimatedSeconds: fiatQuoteQuery.data?.estimatedDurationSeconds, onViewFees: showFees }), _jsx(Spacer, { y: "md" }), _jsx(Text, { size: "sm", children: "Send to" }), _jsx(Spacer, { y: "xs" }), _jsx(WalletSelectorButton, { client: props.client, onClick: () => {
468
- setDrawerScreen("receiver");
469
- setIsOpen(true);
470
- }, address: receiverAddress, disabled: disableReceiverSelection, disableChevron: disableReceiverSelection, walletId: undefined })] }), errorMsg && (_jsxs("div", { children: [errorMsg.minAmount && (_jsxs(Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", _jsx(TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => (_jsx(Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), errorMsg?.minAmount ? (_jsx(Button, { variant: "accent", fullWidth: true, onClick: () => {
545
+ return (_jsxs(Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && (_jsxs(_Fragment, { children: [_jsx(DrawerOverlay, { ref: drawerOverlayRef }), _jsx(Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: drawerScreen === "fees" && fiatQuoteQuery.data && (_jsxs("div", { children: [_jsx(Text, { size: "lg", color: "primaryText", children: "Fees" }), _jsx(Spacer, { y: "lg" }), _jsx(FiatFees, { quote: fiatQuoteQuery.data })] })) })] })), _jsxs("div", { children: [_jsx(PayWithCreditCard, { isLoading: fiatQuoteQuery.isLoading, value: fiatQuoteQuery.data?.fromCurrencyWithFees.amount, client: client, currency: selectedCurrency, onSelectCurrency: showCurrencySelector }), _jsx(EstimatedTimeAndFees, { quoteIsLoading: fiatQuoteQuery.isLoading, estimatedSeconds: fiatQuoteQuery.data?.estimatedDurationSeconds, onViewFees: showFees }), _jsx(Spacer, { y: "md" })] }), errorMsg && (_jsxs("div", { children: [errorMsg.minAmount && (_jsxs(Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", _jsx(TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => (_jsx(Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), errorMsg?.minAmount ? (_jsx(Button, { variant: "accent", fullWidth: true, onClick: () => {
471
546
  props.setTokenAmount(String(errorMsg.minAmount));
472
547
  props.setHasEditedAmount(true);
473
548
  }, children: "Set Minimum" })) : (_jsx(Button, { variant: disableSubmit ? "outline" : "accent", "data-disabled": disableSubmit, disabled: disableSubmit, fullWidth: true, onClick: handleSubmit, gap: "xs", children: fiatQuoteQuery.isLoading ? (_jsxs(_Fragment, { children: ["Getting price quote", _jsx(Spinner, { size: "sm", color: "accentText" })] })) : ("Continue") }))] }));
474
549
  }
475
- function BuyForTxUI(props) {
476
- const chainNameQuery = useChainName(props.buyForTx.tx.chain);
477
- return (_jsxs(Container, { children: [_jsx(Spacer, { y: "xs" }), _jsxs(Container, { flex: "row", style: {
478
- justifyContent: "space-between",
479
- }, children: [_jsx(Text, { size: "sm", children: "Amount Needed" }), _jsxs(Container, { flex: "column", style: {
480
- alignItems: "flex-end",
481
- }, children: [_jsxs(Container, { flex: "row", gap: "xs", center: "y", children: [_jsxs(Text, { color: "primaryText", size: "sm", children: [props.amountNeeded, " ", props.buyForTx.tokenSymbol] }), _jsx(TokenIcon, { chain: props.buyForTx.tx.chain, client: props.client, size: "sm", token: NATIVE_TOKEN })] }), _jsx(Spacer, { y: "xxs" }), chainNameQuery.name ? (_jsx(Text, { size: "sm", children: chainNameQuery.name })) : (_jsx(Skeleton, { height: fontSize.sm, width: "50px" }))] })] }), _jsx(Spacer, { y: "md" }), _jsx(Line, {}), _jsx(Spacer, { y: "md" }), _jsxs(Container, { flex: "row", style: {
482
- justifyContent: "space-between",
483
- }, children: [_jsx(Text, { size: "sm", children: "Your Balance" }), _jsxs(Container, { flex: "row", gap: "xs", children: [_jsxs(Text, { color: "primaryText", size: "sm", children: [formatNumber(Number(toEther(props.buyForTx.balance)), 6), " ", props.buyForTx.tokenSymbol] }), _jsx(TokenIcon, { chain: props.buyForTx.tx.chain, client: props.client, size: "sm", token: NATIVE_TOKEN })] })] }), _jsx(Spacer, { y: "md" }), _jsx(Line, {}), _jsx(Spacer, { y: "xl" }), _jsx(Text, { center: true, size: "sm", children: "Purchase" }), _jsx(Spacer, { y: "xxs" })] }));
484
- }
485
550
  function createSupportedTokens(data, payOptions, supportedTokensOverrides) {
486
551
  const tokens = {};
487
552
  const isBuyWithFiatDisabled = payOptions.buyWithFiat === false;
488
553
  const isBuyWithCryptoDisabled = payOptions.buyWithCrypto === false;
554
+ // FIXME (pay) when buywithFiat is disabled, missing a bunch of tokens on base??
489
555
  for (const x of data) {
490
556
  tokens[x.chain.id] = x.tokens.filter((t) => {
491
557
  // it token supports both - include it