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
@@ -7,21 +7,17 @@ const react_1 = require("react");
7
7
  const addresses_js_1 = require("../../../../../../constants/addresses.js");
8
8
  const isSwapRequiredPostOnramp_js_1 = require("../../../../../../pay/buyWithFiat/isSwapRequiredPostOnramp.js");
9
9
  const formatNumber_js_1 = require("../../../../../../utils/formatNumber.js");
10
- const units_js_1 = require("../../../../../../utils/units.js");
11
10
  const index_js_1 = require("../../../../../core/design-system/index.js");
12
- const useChainQuery_js_1 = require("../../../../../core/hooks/others/useChainQuery.js");
13
11
  const useWalletBalance_js_1 = require("../../../../../core/hooks/others/useWalletBalance.js");
14
12
  const useBuyWithCryptoQuote_js_1 = require("../../../../../core/hooks/pay/useBuyWithCryptoQuote.js");
15
13
  const useBuyWithFiatQuote_js_1 = require("../../../../../core/hooks/pay/useBuyWithFiatQuote.js");
16
- const useActiveAccount_js_1 = require("../../../../hooks/wallets/useActiveAccount.js");
14
+ const useActiveAccount_js_1 = require("../../../../../core/hooks/wallets/useActiveAccount.js");
17
15
  const LoadingScreen_js_1 = require("../../../../wallets/shared/LoadingScreen.js");
18
16
  const ChainName_js_1 = require("../../../components/ChainName.js");
19
17
  const Drawer_js_1 = require("../../../components/Drawer.js");
20
- const Skeleton_js_1 = require("../../../components/Skeleton.js");
21
18
  const Spacer_js_1 = require("../../../components/Spacer.js");
22
19
  const Spinner_js_1 = require("../../../components/Spinner.js");
23
20
  const SwitchNetwork_js_1 = require("../../../components/SwitchNetwork.js");
24
- const TokenIcon_js_1 = require("../../../components/TokenIcon.js");
25
21
  const basic_js_1 = require("../../../components/basic.js");
26
22
  const buttons_js_1 = require("../../../components/buttons.js");
27
23
  const text_js_1 = require("../../../components/text.js");
@@ -32,14 +28,14 @@ const CoinsIcon_js_1 = require("../../icons/CoinsIcon.js");
32
28
  const TokenSelector_js_1 = require("../TokenSelector.js");
33
29
  const WalletSwitcherConnectionScreen_js_1 = require("../WalletSwitcherConnectionScreen.js");
34
30
  const nativeToken_js_1 = require("../nativeToken.js");
31
+ const DirectPaymentModeScreen_js_1 = require("./DirectPaymentModeScreen.js");
35
32
  const EstimatedTimeAndFees_js_1 = require("./EstimatedTimeAndFees.js");
36
33
  const PayTokenIcon_js_1 = require("./PayTokenIcon.js");
37
34
  const PayWIthCreditCard_js_1 = require("./PayWIthCreditCard.js");
38
- const ReceiverWalletSelectionScreen_js_1 = require("./ReceiverWalletSelectionScreen.js");
35
+ const TransactionModeScreen_js_1 = require("./TransactionModeScreen.js");
39
36
  const WalletSelectorButton_js_1 = require("./WalletSelectorButton.js");
40
37
  const CurrencySelection_js_1 = require("./fiat/CurrencySelection.js");
41
38
  const FiatFlow_js_1 = require("./fiat/FiatFlow.js");
42
- const useBuyTxStates_js_1 = require("./main/useBuyTxStates.js");
43
39
  const useEnabledPaymentMethods_js_1 = require("./main/useEnabledPaymentMethods.js");
44
40
  const useUISelectionStates_js_1 = require("./main/useUISelectionStates.js");
45
41
  const openOnRamppopup_js_1 = require("./openOnRamppopup.js");
@@ -47,6 +43,7 @@ const BuyTokenInput_js_1 = require("./swap/BuyTokenInput.js");
47
43
  const Fees_js_1 = require("./swap/Fees.js");
48
44
  const PayWithCrypto_js_1 = require("./swap/PayWithCrypto.js");
49
45
  const SwapFlow_js_1 = require("./swap/SwapFlow.js");
46
+ const TransferFlow_js_1 = require("./swap/TransferFlow.js");
50
47
  const WalletSwitcherDrawerContent_js_1 = require("./swap/WalletSwitcherDrawerContent.js");
51
48
  const pendingSwapTx_js_1 = require("./swap/pendingSwapTx.js");
52
49
  const useSwapSupportedChains_js_1 = require("./swap/useSwapSupportedChains.js");
@@ -59,23 +56,26 @@ function BuyScreen(props) {
59
56
  if (!supportedDestinationsQuery.data) {
60
57
  return (0, jsx_runtime_1.jsx)(LoadingScreen_js_1.LoadingScreen, {});
61
58
  }
62
- return ((0, jsx_runtime_1.jsx)(BuyScreenContent, { ...props, onViewPendingTx: props.onViewPendingTx, supportedDestinations: supportedDestinationsQuery.data, buyForTx: props.buyForTx }));
59
+ return ((0, jsx_runtime_1.jsx)(BuyScreenContent, { ...props, supportedDestinations: supportedDestinationsQuery.data }));
63
60
  }
64
61
  /**
65
62
  * @internal
66
63
  */
67
64
  function BuyScreenContent(props) {
68
- const { client, supportedDestinations, connectLocale, payOptions, buyForTx } = props;
65
+ const { client, supportedDestinations, connectLocale, payOptions } = props;
69
66
  const activeAccount = (0, useActiveAccount_js_1.useActiveAccount)();
70
67
  const { payer, setPayer } = (0, usePayerSetup_js_1.usePayerSetup)();
71
68
  const [screen, setScreen] = (0, react_1.useState)({
72
69
  id: "main",
73
70
  });
74
71
  const [hasEditedAmount, setHasEditedAmount] = (0, react_1.useState)(false);
72
+ const onDone = (0, react_1.useCallback)(() => {
73
+ setScreen({ id: "main" });
74
+ props.onDone();
75
+ }, [props.onDone]);
75
76
  // UI selection
76
77
  const { tokenAmount, setTokenAmount, toChain, setToChain, deferredTokenAmount, fromChain, setFromChain, toToken, setToToken, fromToken, setFromToken, selectedCurrency, setSelectedCurrency, } = (0, useUISelectionStates_js_1.useUISelectionStates)({
77
78
  payOptions,
78
- buyForTx,
79
79
  supportedDestinations,
80
80
  });
81
81
  // check if the screen is expanded or not
@@ -96,6 +96,15 @@ function BuyScreenContent(props) {
96
96
  }
97
97
  return createSupportedTokens(supportedSourcesQuery.data, payOptions, props.supportedTokens);
98
98
  }, [props.supportedTokens, supportedSourcesQuery.data, payOptions]);
99
+ const enabledPaymentMethods = (0, useEnabledPaymentMethods_js_1.useEnabledPaymentMethods)({
100
+ payOptions: props.payOptions,
101
+ supportedDestinations: props.supportedDestinations,
102
+ toChain: toChain,
103
+ toToken: toToken,
104
+ });
105
+ const payDisabled = enabledPaymentMethods.showPaymentSelection === false &&
106
+ enabledPaymentMethods.buyWithCryptoEnabled === false &&
107
+ enabledPaymentMethods.buyWithFiatEnabled === false;
99
108
  // screens ----------------------------
100
109
  if (screen.id === "connect-payer-wallet") {
101
110
  return ((0, jsx_runtime_1.jsx)(WalletSwitcherConnectionScreen_js_1.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) => {
@@ -111,23 +120,30 @@ function BuyScreenContent(props) {
111
120
  }, recommendedWallets: props.connectOptions?.recommendedWallets, showAllWallets: !!props.connectOptions?.showAllWallets, walletConnect: props.connectOptions?.walletConnect, wallets: props.connectOptions?.wallets }));
112
121
  }
113
122
  if (screen.id === "swap-flow" && payer) {
114
- return ((0, jsx_runtime_1.jsx)(SwapFlow_js_1.SwapFlow, { title: props.title, isBuyForTx: !!props.buyForTx, isEmbed: props.isEmbed, client: client, onBack: () => {
123
+ return ((0, jsx_runtime_1.jsx)(SwapFlow_js_1.SwapFlow, { title: props.title, transactionMode: payOptions.mode === "transaction", isEmbed: props.isEmbed, client: client, onBack: () => {
115
124
  setScreen({
116
125
  id: "buy-with-crypto",
117
126
  });
118
- }, buyWithCryptoQuote: screen.quote, payer: payer, onViewPendingTx: props.onViewPendingTx, isFiatFlow: false, onDone: props.onDone, onTryAgain: () => {
127
+ }, buyWithCryptoQuote: screen.quote, payer: payer, isFiatFlow: false, onDone: onDone, onTryAgain: () => {
119
128
  setScreen({
120
129
  id: "buy-with-crypto",
121
130
  });
122
131
  } }));
123
132
  }
124
133
  if (screen.id === "fiat-flow" && payer) {
125
- return ((0, jsx_runtime_1.jsx)(FiatFlow_js_1.FiatFlow, { title: props.title, isBuyForTx: !!props.buyForTx, quote: screen.quote, onBack: () => {
134
+ return ((0, jsx_runtime_1.jsx)(FiatFlow_js_1.FiatFlow, { title: props.title, transactionMode: payOptions.mode === "transaction", quote: screen.quote, onBack: () => {
126
135
  setScreen({
127
136
  id: "buy-with-fiat",
128
137
  });
129
138
  }, client: client, testMode: props.payOptions.buyWithFiat !== false &&
130
- 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 }));
139
+ 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 }));
140
+ }
141
+ if (screen.id === "transfer-flow" && payer && activeAccount) {
142
+ const goBack = () => setScreen({ id: "buy-with-crypto" });
143
+ // TODO (pay) pass it via screen props
144
+ const defaultRecipientAddress = props.payOptions?.paymentInfo?.sellerAddress;
145
+ const receiverAddress = defaultRecipientAddress || activeAccount.address;
146
+ return ((0, jsx_runtime_1.jsx)(TransferFlow_js_1.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" }));
131
147
  }
132
148
  if (screen.id === "select-currency") {
133
149
  const goBack = () => setScreen(screen.backScreen);
@@ -139,8 +155,10 @@ function BuyScreenContent(props) {
139
155
  if (screen.id === "select-to-token") {
140
156
  const chains = supportedDestinations.map((x) => x.chain);
141
157
  const goBack = () => setScreen(screen.backScreen);
158
+ const allowEdits = payOptions?.prefillBuy
159
+ ?.allowEdits;
142
160
  // if token selection is disabled - only show network selector screen
143
- if (payOptions.prefillBuy?.allowEdits?.token === false) {
161
+ if (allowEdits?.token === false) {
144
162
  return ((0, jsx_runtime_1.jsx)(ChainSelectionScreen, { chains: chains, client: props.client, connectLocale: props.connectLocale, setChain: setToChain, goBack: goBack }));
145
163
  }
146
164
  return ((0, jsx_runtime_1.jsx)(TokenSelector_js_1.TokenSelector, { onBack: goBack, tokenList: ((toChain?.id ? destinationSupportedTokens[toChain.id] : undefined) ||
@@ -149,7 +167,7 @@ function BuyScreenContent(props) {
149
167
  goBack();
150
168
  }, chain: toChain, chainSelection:
151
169
  // hide chain selection if it's disabled
152
- payOptions.prefillBuy?.allowEdits?.chain !== false
170
+ allowEdits?.chain !== false
153
171
  ? {
154
172
  chains: chains,
155
173
  select: (c) => {
@@ -182,25 +200,55 @@ function BuyScreenContent(props) {
182
200
  }
183
201
  : undefined, connectLocale: connectLocale, client: client, modalTitle: "Pay with" }));
184
202
  }
185
- return ((0, jsx_runtime_1.jsx)(basic_js_1.Container, { animate: "fadein", children: (0, jsx_runtime_1.jsxs)("div", { children: [screen.id === "main" && ((0, jsx_runtime_1.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" ||
203
+ return ((0, jsx_runtime_1.jsx)(basic_js_1.Container, { animate: "fadein", children: (0, jsx_runtime_1.jsxs)("div", { children: [screen.id === "main" && ((0, jsx_runtime_1.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" ||
204
+ screen.id === "select-wallet" ||
186
205
  screen.id === "buy-with-crypto" ||
187
206
  screen.id === "buy-with-fiat") &&
188
207
  payer && ((0, jsx_runtime_1.jsxs)(TokenSelectedLayout, { title: props.title, selectedChain: toChain, selectedToken: toToken, tokenAmount: tokenAmount, client: client, onBack: () => {
189
- if (screen.id === "buy-with-crypto" ||
190
- screen.id === "buy-with-fiat") {
208
+ if (enabledPaymentMethods.showPaymentSelection &&
209
+ (screen.id === "select-wallet" ||
210
+ screen.id === "buy-with-fiat")) {
191
211
  setScreen({ id: "select-payment-method" });
192
212
  }
193
- else if (screen.id === "select-payment-method") {
213
+ else if (screen.id === "buy-with-crypto") {
214
+ setScreen({ id: "select-wallet" });
215
+ }
216
+ else {
194
217
  setScreen({ id: "main" });
195
218
  }
196
- }, children: [screen.id === "select-payment-method" && ((0, jsx_runtime_1.jsx)(PaymentMethodSelection, { setScreen: (id) => setScreen({ id }) })), screen.id === "buy-with-crypto" && activeAccount && ((0, jsx_runtime_1.jsx)(SwapScreenContent, { setScreen: setScreen, tokenAmount: deferredTokenAmount, toChain: toChain, toToken: toToken, fromChain: fromChain, fromToken: fromToken, showFromTokenSelector: () => {
219
+ }, children: [screen.id === "select-payment-method" && ((0, jsx_runtime_1.jsx)(PaymentMethodSelection, { setScreen: (id) => setScreen({ id }) })), screen.id === "select-wallet" && ((0, jsx_runtime_1.jsx)(WalletSwitcherDrawerContent_js_1.WalletSwitcherDrawerContent, { client: client, onSelect: (w) => {
220
+ const chain = w.getChain();
221
+ const account = w.getAccount();
222
+ if (chain && account) {
223
+ setPayer({
224
+ account,
225
+ chain,
226
+ wallet: w,
227
+ });
228
+ setScreen({ id: "buy-with-crypto" });
229
+ }
230
+ }, showAllWallets: !!props.connectOptions?.showAllWallets, wallets: props.connectOptions?.wallets, onBack: () => {
231
+ // no-op
232
+ }, onConnect: () => {
233
+ setScreen({
234
+ id: "connect-payer-wallet",
235
+ backScreen: {
236
+ id: "select-wallet",
237
+ },
238
+ });
239
+ }, selectedAddress: payer.account.address })), screen.id === "buy-with-crypto" && activeAccount && ((0, jsx_runtime_1.jsx)(SwapScreenContent, { setScreen: setScreen, tokenAmount: deferredTokenAmount, toChain: toChain, toToken: toToken, fromChain: fromChain, fromToken: fromToken, showFromTokenSelector: () => {
197
240
  setScreen({
198
241
  id: "select-from-token",
199
242
  backScreen: screen,
200
243
  });
201
- }, 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,
244
+ }, payer: payer, client: client, isEmbed: props.isEmbed, onDone: onDone, payOptions: payOptions, connectLocale: connectLocale, connectOptions: props.connectOptions, setPayer: setPayer,
202
245
  // pass it even though we are passing payer, because payer might be different
203
- activeAccount: activeAccount, setTokenAmount: setTokenAmount, setHasEditedAmount: setHasEditedAmount })), screen.id === "buy-with-fiat" && ((0, jsx_runtime_1.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: () => {
246
+ activeAccount: activeAccount, setTokenAmount: setTokenAmount, setHasEditedAmount: setHasEditedAmount, disableTokenSelection: payDisabled === true ||
247
+ (payOptions.buyWithCrypto !== false &&
248
+ payOptions.buyWithCrypto?.prefillSource?.allowEdits
249
+ ?.chain === false &&
250
+ payOptions.buyWithCrypto?.prefillSource?.allowEdits
251
+ ?.token === false) })), screen.id === "buy-with-fiat" && ((0, jsx_runtime_1.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: () => {
204
252
  setScreen({
205
253
  id: "select-currency",
206
254
  backScreen: screen,
@@ -213,48 +261,79 @@ function SelectedTokenInfo(props) {
213
261
  }, children: [(0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "xs", center: "y", children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "primaryText", "data-testid": "tokenAmount", size: "xl", children: (0, formatNumber_js_1.formatNumber)(Number(props.tokenAmount), 6) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "xxs", center: "y", children: [(0, jsx_runtime_1.jsx)(TokenSymbol_js_1.TokenSymbol, { token: props.selectedToken, chain: props.selectedChain, size: "md", color: "secondaryText" }), (0, jsx_runtime_1.jsx)(PayTokenIcon_js_1.PayTokenIcon, { chain: props.selectedChain, client: props.client, size: "sm", token: props.selectedToken })] })] }), (0, jsx_runtime_1.jsx)(ChainName_js_1.ChainName, { chain: props.selectedChain, client: props.client, size: "sm", short: true })] }) }));
214
262
  }
215
263
  function MainScreen(props) {
216
- const { showPaymentSelection, buyWithCryptoEnabled, buyWithFiatEnabled } = (0, useEnabledPaymentMethods_js_1.useEnabledPaymentMethods)({
217
- payOptions: props.payOptions,
218
- supportedDestinations: props.supportedDestinations,
219
- toChain: props.toChain,
220
- toToken: props.toToken,
221
- });
222
- const { buyForTx, setTokenAmount, payerAccount, client, tokenAmount, payOptions, toToken, toChain, } = props;
223
- // Buy Transaction flow states
224
- const { amountNeeded } = (0, useBuyTxStates_js_1.useBuyTxStates)({
225
- setTokenAmount,
226
- buyForTx: buyForTx || null,
227
- hasEditedAmount: props.hasEditedAmount,
228
- account: payerAccount || null,
229
- });
264
+ const { setTokenAmount, setToChain, setToToken, setFromChain, setFromToken, payerAccount, client, tokenAmount, payOptions, toToken, toChain, supportedDestinations, enabledPaymentMethods, } = props;
265
+ const { showPaymentSelection, buyWithCryptoEnabled, buyWithFiatEnabled } = enabledPaymentMethods;
230
266
  const disableContinue = !tokenAmount;
231
- return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { p: "lg", children: [(0, jsx_runtime_1.jsx)(basic_js_1.ModalHeader, { title: props.buyForTx
232
- ? `Not enough ${props.buyForTx.tokenSymbol}`
233
- : props.title, onBack: props.onBack }), amountNeeded && props.buyForTx ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(BuyForTxUI, { amountNeeded: String((0, formatNumber_js_1.formatNumber)(Number((0, units_js_1.toTokens)(amountNeeded, props.buyForTx.tokenDecimals)), 6)), buyForTx: props.buyForTx, client: client })] })) : ((0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" })), (0, jsx_runtime_1.jsx)(BuyTokenInput_js_1.BuyTokenInput, { value: tokenAmount, onChange: async (value) => {
234
- props.setHasEditedAmount(true);
235
- setTokenAmount(value);
236
- }, freezeAmount: payOptions.prefillBuy?.allowEdits?.amount === false, freezeChainAndToken: payOptions.prefillBuy?.allowEdits?.chain === false &&
237
- payOptions.prefillBuy?.allowEdits?.token === false, token: toToken, chain: toChain, onSelectToken: props.onSelectBuyToken, client: props.client, hideTokenSelector: !!props.buyForTx }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "sm", children: [!payerAccount ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ConnectButton_js_1.ConnectButton, { ...props.connectOptions, client: props.client, theme: props.theme, connectButton: {
238
- style: {
239
- width: "100%",
240
- },
241
- } }) })) : ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, disabled: disableContinue, "data-disabled": disableContinue, onClick: () => {
242
- if (showPaymentSelection) {
243
- props.setScreen({ id: "select-payment-method" });
244
- }
245
- else if (buyWithCryptoEnabled) {
246
- props.setScreen({ id: "buy-with-crypto" });
247
- }
248
- else if (buyWithFiatEnabled) {
249
- props.setScreen({ id: "buy-with-fiat" });
250
- }
251
- else {
252
- console.error("No payment method enabled");
253
- }
254
- }, children: "Continue" })), payerAccount && ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "outline", fullWidth: true, style: {
255
- padding: index_js_1.spacing.xs,
256
- fontSize: index_js_1.fontSize.sm,
257
- }, onClick: props.onViewPendingTx, children: "View all transactions" }))] })] }));
267
+ switch (payOptions.mode) {
268
+ case "transaction": {
269
+ return ((0, jsx_runtime_1.jsx)(TransactionModeScreen_js_1.TransactionModeScreen, { supportedDestinations: supportedDestinations, payUiOptions: payOptions, payerAccount: payerAccount, connectOptions: props.connectOptions, client: client, onContinue: (tokenAmount, toChain, toToken) => {
270
+ setTokenAmount(tokenAmount);
271
+ setToChain(toChain);
272
+ setFromChain(toChain);
273
+ setFromToken(toToken);
274
+ setToToken(toToken);
275
+ if (showPaymentSelection) {
276
+ props.setScreen({ id: "select-payment-method" });
277
+ }
278
+ else if (buyWithCryptoEnabled) {
279
+ props.setScreen({ id: "select-wallet" });
280
+ }
281
+ else if (buyWithFiatEnabled) {
282
+ props.setScreen({ id: "buy-with-fiat" });
283
+ }
284
+ else {
285
+ // default to buy with crypto with connected wallet if chain not supported by pay
286
+ props.setScreen({ id: "select-wallet" });
287
+ }
288
+ } }));
289
+ }
290
+ case "direct_payment": {
291
+ return ((0, jsx_runtime_1.jsx)(DirectPaymentModeScreen_js_1.DirectPaymentModeScreen, { client: client, payUiOptions: payOptions, payerAccount: payerAccount, connectOptions: props.connectOptions, supportedDestinations: supportedDestinations, onContinue: (tokenAmount, toChain, toToken) => {
292
+ setTokenAmount(tokenAmount);
293
+ setToChain(toChain);
294
+ setFromChain(toChain);
295
+ setFromToken(toToken);
296
+ setToToken(toToken);
297
+ if (showPaymentSelection) {
298
+ props.setScreen({ id: "select-payment-method" });
299
+ }
300
+ else if (buyWithCryptoEnabled) {
301
+ props.setScreen({ id: "buy-with-crypto" });
302
+ }
303
+ else if (buyWithFiatEnabled) {
304
+ props.setScreen({ id: "buy-with-fiat" });
305
+ }
306
+ else {
307
+ // default to buy with crypto with connected wallet if chain not supported by pay
308
+ props.setScreen({ id: "select-wallet" });
309
+ }
310
+ } }));
311
+ }
312
+ default: {
313
+ return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { p: "lg", children: [(0, jsx_runtime_1.jsx)(basic_js_1.ModalHeader, { title: props.title, onBack: props.onBack }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" }), (0, jsx_runtime_1.jsx)(BuyTokenInput_js_1.BuyTokenInput, { value: tokenAmount, onChange: async (value) => {
314
+ props.setHasEditedAmount(true);
315
+ setTokenAmount(value);
316
+ }, freezeAmount: payOptions.prefillBuy?.allowEdits?.amount === false, freezeChainAndToken: payOptions.prefillBuy?.allowEdits?.chain === false &&
317
+ payOptions.prefillBuy?.allowEdits?.token === false, token: toToken, chain: toChain, onSelectToken: props.onSelectBuyToken, client: props.client }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "column", gap: "sm", children: !payerAccount ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ConnectButton_js_1.ConnectButton, { ...props.connectOptions, client: props.client, theme: props.theme, connectButton: {
318
+ style: {
319
+ width: "100%",
320
+ },
321
+ } }) })) : ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, disabled: disableContinue, "data-disabled": disableContinue, onClick: () => {
322
+ if (showPaymentSelection) {
323
+ props.setScreen({ id: "select-payment-method" });
324
+ }
325
+ else if (buyWithCryptoEnabled) {
326
+ props.setScreen({ id: "buy-with-crypto" });
327
+ }
328
+ else if (buyWithFiatEnabled) {
329
+ props.setScreen({ id: "buy-with-fiat" });
330
+ }
331
+ else {
332
+ console.error("No payment method enabled");
333
+ }
334
+ }, children: "Continue" })) })] }));
335
+ }
336
+ }
258
337
  }
259
338
  function TokenSelectedLayout(props) {
260
339
  return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { p: "lg", children: (0, jsx_runtime_1.jsx)(basic_js_1.ModalHeader, { title: props.title, onBack: props.onBack }) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { px: "lg", style: {
@@ -268,13 +347,14 @@ function PaymentMethodSelection(props) {
268
347
  }, children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { color: "secondaryText", flex: "row", center: "both", children: (0, jsx_runtime_1.jsx)(react_icons_1.IdCardIcon, { style: {
269
348
  width: index_js_1.iconSize.md,
270
349
  height: index_js_1.iconSize.md,
271
- } }) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "xxs", children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Credit Card" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", children: "Easily and securely make payments" })] })] }), (0, jsx_runtime_1.jsxs)(buttons_js_1.Button, { variant: "outline", bg: "tertiaryBg", onClick: () => props.setScreen("buy-with-crypto"), style: {
350
+ } }) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "xxs", children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Credit Card" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", children: "Securely pay with credit card" })] })] }), (0, jsx_runtime_1.jsxs)(buttons_js_1.Button, { variant: "outline", bg: "tertiaryBg", onClick: () => props.setScreen("select-wallet"), style: {
272
351
  justifyContent: "flex-start",
273
- }, gap: "sm", children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { color: "secondaryText", flex: "row", center: "both", children: (0, jsx_runtime_1.jsx)(CoinsIcon_js_1.CoinsIcon, { size: index_js_1.iconSize.md }) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "xxs", children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Crypto" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", children: "Pay with confidence using crypto" })] })] })] }) }));
352
+ }, gap: "sm", children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { color: "secondaryText", flex: "row", center: "both", children: (0, jsx_runtime_1.jsx)(CoinsIcon_js_1.CoinsIcon, { size: index_js_1.iconSize.md }) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "xxs", children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Crypto" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", children: "Pay with your connected wallet" })] })] })] }) }));
274
353
  }
275
354
  function SwapScreenContent(props) {
276
- const { setScreen, payer, client, toChain, tokenAmount, toToken, fromChain, fromToken, showFromTokenSelector, payOptions, } = props;
277
- const [receiverAddress, setReceiverAddress] = (0, react_1.useState)(props.payOptions.recipientAddress || props.activeAccount.address);
355
+ const { setScreen, payer, client, toChain, tokenAmount, toToken, fromChain, fromToken, showFromTokenSelector, payOptions, disableTokenSelection, } = props;
356
+ const defaultRecipientAddress = props.payOptions?.paymentInfo?.sellerAddress;
357
+ const receiverAddress = defaultRecipientAddress || props.activeAccount.address;
278
358
  const { drawerRef, drawerOverlayRef, isOpen, setIsOpen } = (0, Drawer_js_1.useDrawer)();
279
359
  const [drawerScreen, setDrawerScreen] = (0, react_1.useState)("fees");
280
360
  const fromTokenBalanceQuery = (0, useWalletBalance_js_1.useWalletBalance)({
@@ -283,7 +363,15 @@ function SwapScreenContent(props) {
283
363
  tokenAddress: (0, nativeToken_js_1.isNativeToken)(fromToken) ? undefined : fromToken.address,
284
364
  client,
285
365
  });
286
- const quoteParams = tokenAmount && !(fromChain.id === toChain.id && fromToken === toToken)
366
+ const fromTokenId = (0, nativeToken_js_1.isNativeToken)(fromToken)
367
+ ? addresses_js_1.NATIVE_TOKEN_ADDRESS
368
+ : fromToken.address.toLowerCase();
369
+ const toTokenId = (0, nativeToken_js_1.isNativeToken)(toToken)
370
+ ? addresses_js_1.NATIVE_TOKEN_ADDRESS
371
+ : toToken.address.toLowerCase();
372
+ const swapRequired = !!tokenAmount &&
373
+ !(fromChain.id === toChain.id && fromTokenId === toTokenId);
374
+ const quoteParams = swapRequired
287
375
  ? {
288
376
  // wallets
289
377
  fromAddress: payer.account.address,
@@ -309,11 +397,13 @@ function SwapScreenContent(props) {
309
397
  refetchInterval: 30 * 1000,
310
398
  gcTime: 30 * 1000,
311
399
  });
312
- const sourceTokenAmount = quoteQuery.data?.swapDetails.fromAmount;
400
+ const sourceTokenAmount = swapRequired
401
+ ? quoteQuery.data?.swapDetails.fromAmount
402
+ : tokenAmount;
313
403
  const isNotEnoughBalance = !!sourceTokenAmount &&
314
404
  !!fromTokenBalanceQuery.data &&
315
405
  Number(fromTokenBalanceQuery.data.displayValue) < Number(sourceTokenAmount);
316
- const disableContinue = !quoteQuery.data || isNotEnoughBalance;
406
+ const disableContinue = (swapRequired && !quoteQuery.data) || isNotEnoughBalance;
317
407
  const switchChainRequired = props.payer.chain.id !== fromChain.id;
318
408
  // biome-ignore lint/suspicious/noExplicitAny: <explanation>
319
409
  function getErrorMessage(err) {
@@ -336,6 +426,22 @@ function SwapScreenContent(props) {
336
426
  ? getErrorMessage(quoteQuery.error)
337
427
  : undefined;
338
428
  function showSwapFlow() {
429
+ if ((props.payOptions.mode === "transaction" ||
430
+ props.payOptions.mode === "direct_payment") &&
431
+ !isNotEnoughBalance &&
432
+ !swapRequired) {
433
+ if (payer.account.address !== receiverAddress) {
434
+ // same currency, just transfer, but from another wallet
435
+ setScreen({
436
+ id: "transfer-flow",
437
+ });
438
+ }
439
+ else {
440
+ // has enough balance to just do the transaction directly
441
+ props.onDone();
442
+ }
443
+ return;
444
+ }
339
445
  if (!quoteQuery.data) {
340
446
  return;
341
447
  }
@@ -351,40 +457,12 @@ function SwapScreenContent(props) {
351
457
  setIsOpen(true);
352
458
  setDrawerScreen("fees");
353
459
  }
354
- const prefillSource = payOptions.buyWithCrypto !== false
355
- ? payOptions.buyWithCrypto?.prefillSource
356
- : undefined;
357
- const disableReceiverSelection = !!props.payOptions.recipientAddress;
358
- return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Drawer_js_1.DrawerOverlay, { ref: drawerOverlayRef }), (0, jsx_runtime_1.jsxs)(Drawer_js_1.Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: [drawerScreen === "fees" && quoteQuery.data && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "lg", color: "primaryText", children: "Fees" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(Fees_js_1.SwapFees, { quote: quoteQuery.data, align: "left" })] })), drawerScreen === "receiver" && ((0, jsx_runtime_1.jsx)(ReceiverWalletSelectionScreen_js_1.ReceiverWalletDrawerScreen, { client: props.client, onSelect: (x) => setReceiverAddress(x), receiverAddress: receiverAddress, onBack: () => setIsOpen(false) })), drawerScreen === "payer" && ((0, jsx_runtime_1.jsx)(WalletSwitcherDrawerContent_js_1.WalletSwitcherDrawerContent, { client: client, onSelect: (w) => {
359
- const chain = w.getChain();
360
- const account = w.getAccount();
361
- if (chain && account) {
362
- props.setPayer({
363
- account,
364
- chain,
365
- wallet: w,
366
- });
367
- }
368
- }, showAllWallets: !!props.connectOptions?.showAllWallets, wallets: props.connectOptions?.wallets, onBack: () => {
369
- setIsOpen(false);
370
- }, onConnect: () => {
371
- setScreen({
372
- id: "connect-payer-wallet",
373
- backScreen: {
374
- id: "buy-with-crypto",
375
- },
376
- });
377
- }, selectedAddress: payer.account.address }))] })] })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(WalletSelectorButton_js_1.WalletSelectorButton, { client: props.client, onClick: () => {
378
- setIsOpen(true);
379
- setDrawerScreen("payer");
460
+ return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Drawer_js_1.DrawerOverlay, { ref: drawerOverlayRef }), (0, jsx_runtime_1.jsx)(Drawer_js_1.Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: drawerScreen === "fees" && quoteQuery.data && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "lg", color: "primaryText", children: "Fees" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(Fees_js_1.SwapFees, { quote: quoteQuery.data, align: "left" })] })) })] })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(WalletSelectorButton_js_1.WalletSelectorButton, { client: props.client, onClick: () => {
461
+ setScreen({ id: "select-wallet" });
380
462
  }, address: props.payer.account.address, walletId: props.payer.wallet.id, containerStyle: {
381
463
  borderBottomRightRadius: 0,
382
464
  borderBottomLeftRadius: 0,
383
- } }), (0, jsx_runtime_1.jsx)(PayWithCrypto_js_1.PayWithCrypto, { value: sourceTokenAmount || "", onSelectToken: showFromTokenSelector, chain: fromChain, token: fromToken, isLoading: quoteQuery.isLoading && !sourceTokenAmount, client: client, freezeChainAndTokenSelection: prefillSource?.allowEdits?.chain === false &&
384
- prefillSource?.allowEdits?.token === false, payerAccount: props.payer.account }), (0, jsx_runtime_1.jsx)(EstimatedTimeAndFees_js_1.EstimatedTimeAndFees, { quoteIsLoading: quoteQuery.isLoading, estimatedSeconds: quoteQuery.data?.swapDetails.estimated.durationSeconds, onViewFees: showFees }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", children: "Send to" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xs" }), (0, jsx_runtime_1.jsx)(WalletSelectorButton_js_1.WalletSelectorButton, { client: props.client, disabled: disableReceiverSelection, disableChevron: disableReceiverSelection, onClick: () => {
385
- setIsOpen(true);
386
- setDrawerScreen("receiver");
387
- }, address: receiverAddress, walletId: undefined })] }), errorMsg && ((0, jsx_runtime_1.jsxs)("div", { children: [errorMsg.minAmount && ((0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", (0, jsx_runtime_1.jsx)(TokenSymbol_js_1.TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => ((0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), errorMsg?.minAmount ? ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, onClick: () => {
465
+ } }), (0, jsx_runtime_1.jsx)(PayWithCrypto_js_1.PayWithCrypto, { value: sourceTokenAmount || "", onSelectToken: showFromTokenSelector, chain: fromChain, token: fromToken, isLoading: quoteQuery.isLoading && !sourceTokenAmount, client: client, freezeChainAndTokenSelection: disableTokenSelection, payerAccount: props.payer.account, swapRequired: swapRequired }), swapRequired && ((0, jsx_runtime_1.jsx)(EstimatedTimeAndFees_js_1.EstimatedTimeAndFees, { quoteIsLoading: quoteQuery.isLoading, estimatedSeconds: quoteQuery.data?.swapDetails.estimated.durationSeconds, onViewFees: showFees })), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" })] }), errorMsg && ((0, jsx_runtime_1.jsxs)("div", { children: [errorMsg.minAmount && ((0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", (0, jsx_runtime_1.jsx)(TokenSymbol_js_1.TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => ((0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), !errorMsg && isNotEnoughBalance && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: "Not enough funds." }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: "Try a different wallet or token." })] })), errorMsg?.minAmount ? ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, onClick: () => {
388
466
  props.setTokenAmount(String(errorMsg.minAmount));
389
467
  props.setHasEditedAmount(true);
390
468
  }, children: "Set Minimum" })) : switchChainRequired &&
@@ -396,11 +474,12 @@ function SwapScreenContent(props) {
396
474
  if (!disableContinue) {
397
475
  showSwapFlow();
398
476
  }
399
- }, gap: "xs", children: isNotEnoughBalance ? ((0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", children: "Not Enough Funds" })) : quoteQuery.isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Getting price quote", (0, jsx_runtime_1.jsx)(Spinner_js_1.Spinner, { size: "sm", color: "accentText" })] })) : ("Continue") }))] }));
477
+ }, gap: "xs", children: quoteQuery.isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Getting price quote", (0, jsx_runtime_1.jsx)(Spinner_js_1.Spinner, { size: "sm", color: "accentText" })] })) : ("Continue") }))] }));
400
478
  }
401
479
  function FiatScreenContent(props) {
402
480
  const { toToken, tokenAmount, payer, client, setScreen, toChain, showCurrencySelector, selectedCurrency, } = props;
403
- const [receiverAddress, setReceiverAddress] = (0, react_1.useState)(props.payOptions.recipientAddress || props.payer.account.address);
481
+ const defaultRecipientAddress = props.payOptions?.paymentInfo?.sellerAddress;
482
+ const receiverAddress = defaultRecipientAddress || props.payer.account.address;
404
483
  const { drawerRef, drawerOverlayRef, isOpen, setIsOpen } = (0, Drawer_js_1.useDrawer)();
405
484
  const [drawerScreen, setDrawerScreen] = (0, react_1.useState)("fees");
406
485
  const buyWithFiatOptions = props.payOptions.buyWithFiat;
@@ -463,32 +542,19 @@ function FiatScreenContent(props) {
463
542
  };
464
543
  }
465
544
  const disableSubmit = !fiatQuoteQuery.data;
466
- const disableReceiverSelection = !!props.payOptions.recipientAddress;
467
545
  const errorMsg = !fiatQuoteQuery.isLoading && fiatQuoteQuery.error
468
546
  ? getErrorMessage(fiatQuoteQuery.error)
469
547
  : undefined;
470
- return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Drawer_js_1.DrawerOverlay, { ref: drawerOverlayRef }), (0, jsx_runtime_1.jsxs)(Drawer_js_1.Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: [drawerScreen === "fees" && fiatQuoteQuery.data && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "lg", color: "primaryText", children: "Fees" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(Fees_js_1.FiatFees, { quote: fiatQuoteQuery.data })] })), drawerScreen === "receiver" && ((0, jsx_runtime_1.jsx)(ReceiverWalletSelectionScreen_js_1.ReceiverWalletDrawerScreen, { client: props.client, onSelect: (x) => setReceiverAddress(x), receiverAddress: receiverAddress, onBack: () => setIsOpen(false) }))] })] })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PayWIthCreditCard_js_1.PayWithCreditCard, { isLoading: fiatQuoteQuery.isLoading, value: fiatQuoteQuery.data?.fromCurrencyWithFees.amount, client: client, currency: selectedCurrency, onSelectCurrency: showCurrencySelector }), (0, jsx_runtime_1.jsx)(EstimatedTimeAndFees_js_1.EstimatedTimeAndFees, { quoteIsLoading: fiatQuoteQuery.isLoading, estimatedSeconds: fiatQuoteQuery.data?.estimatedDurationSeconds, onViewFees: showFees }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", children: "Send to" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xs" }), (0, jsx_runtime_1.jsx)(WalletSelectorButton_js_1.WalletSelectorButton, { client: props.client, onClick: () => {
471
- setDrawerScreen("receiver");
472
- setIsOpen(true);
473
- }, address: receiverAddress, disabled: disableReceiverSelection, disableChevron: disableReceiverSelection, walletId: undefined })] }), errorMsg && ((0, jsx_runtime_1.jsxs)("div", { children: [errorMsg.minAmount && ((0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", (0, jsx_runtime_1.jsx)(TokenSymbol_js_1.TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => ((0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), errorMsg?.minAmount ? ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, onClick: () => {
548
+ return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "md", animate: "fadein", children: [isOpen && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Drawer_js_1.DrawerOverlay, { ref: drawerOverlayRef }), (0, jsx_runtime_1.jsx)(Drawer_js_1.Drawer, { ref: drawerRef, close: () => setIsOpen(false), children: drawerScreen === "fees" && fiatQuoteQuery.data && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "lg", color: "primaryText", children: "Fees" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(Fees_js_1.FiatFees, { quote: fiatQuoteQuery.data })] })) })] })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PayWIthCreditCard_js_1.PayWithCreditCard, { isLoading: fiatQuoteQuery.isLoading, value: fiatQuoteQuery.data?.fromCurrencyWithFees.amount, client: client, currency: selectedCurrency, onSelectCurrency: showCurrencySelector }), (0, jsx_runtime_1.jsx)(EstimatedTimeAndFees_js_1.EstimatedTimeAndFees, { quoteIsLoading: fiatQuoteQuery.isLoading, estimatedSeconds: fiatQuoteQuery.data?.estimatedDurationSeconds, onViewFees: showFees }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" })] }), errorMsg && ((0, jsx_runtime_1.jsxs)("div", { children: [errorMsg.minAmount && ((0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: ["Minimum amount is ", errorMsg.minAmount, " ", (0, jsx_runtime_1.jsx)(TokenSymbol_js_1.TokenSymbol, { token: toToken, chain: toChain, size: "sm", inline: true, color: "danger" })] })), errorMsg.msg?.map((msg) => ((0, jsx_runtime_1.jsx)(text_js_1.Text, { color: "danger", size: "sm", center: true, multiline: true, children: msg }, msg)))] })), errorMsg?.minAmount ? ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, onClick: () => {
474
549
  props.setTokenAmount(String(errorMsg.minAmount));
475
550
  props.setHasEditedAmount(true);
476
551
  }, children: "Set Minimum" })) : ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: disableSubmit ? "outline" : "accent", "data-disabled": disableSubmit, disabled: disableSubmit, fullWidth: true, onClick: handleSubmit, gap: "xs", children: fiatQuoteQuery.isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Getting price quote", (0, jsx_runtime_1.jsx)(Spinner_js_1.Spinner, { size: "sm", color: "accentText" })] })) : ("Continue") }))] }));
477
552
  }
478
- function BuyForTxUI(props) {
479
- const chainNameQuery = (0, useChainQuery_js_1.useChainName)(props.buyForTx.tx.chain);
480
- return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { children: [(0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xs" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", style: {
481
- justifyContent: "space-between",
482
- }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", children: "Amount Needed" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", style: {
483
- alignItems: "flex-end",
484
- }, children: [(0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "xs", center: "y", children: [(0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "primaryText", size: "sm", children: [props.amountNeeded, " ", props.buyForTx.tokenSymbol] }), (0, jsx_runtime_1.jsx)(TokenIcon_js_1.TokenIcon, { chain: props.buyForTx.tx.chain, client: props.client, size: "sm", token: nativeToken_js_1.NATIVE_TOKEN })] }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xxs" }), chainNameQuery.name ? ((0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", children: chainNameQuery.name })) : ((0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { height: index_js_1.fontSize.sm, width: "50px" }))] })] }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(basic_js_1.Line, {}), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", style: {
485
- justifyContent: "space-between",
486
- }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", children: "Your Balance" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "xs", children: [(0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "primaryText", size: "sm", children: [(0, formatNumber_js_1.formatNumber)(Number((0, units_js_1.toEther)(props.buyForTx.balance)), 6), " ", props.buyForTx.tokenSymbol] }), (0, jsx_runtime_1.jsx)(TokenIcon_js_1.TokenIcon, { chain: props.buyForTx.tx.chain, client: props.client, size: "sm", token: nativeToken_js_1.NATIVE_TOKEN })] })] }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(basic_js_1.Line, {}), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { center: true, size: "sm", children: "Purchase" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xxs" })] }));
487
- }
488
553
  function createSupportedTokens(data, payOptions, supportedTokensOverrides) {
489
554
  const tokens = {};
490
555
  const isBuyWithFiatDisabled = payOptions.buyWithFiat === false;
491
556
  const isBuyWithCryptoDisabled = payOptions.buyWithCrypto === false;
557
+ // FIXME (pay) when buywithFiat is disabled, missing a bunch of tokens on base??
492
558
  for (const x of data) {
493
559
  tokens[x.chain.id] = x.tokens.filter((t) => {
494
560
  // it token supports both - include it