thirdweb 5.108.6 → 5.108.7

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 (391) hide show
  1. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  2. package/dist/cjs/react/core/hooks/usePaymentMethods.js +1 -2
  3. package/dist/cjs/react/core/hooks/usePaymentMethods.js.map +1 -1
  4. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +1 -1
  5. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  6. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +185 -99
  7. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  8. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js +210 -56
  9. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  10. package/dist/cjs/react/web/ui/Bridge/DirectPayment.js +7 -7
  11. package/dist/cjs/react/web/ui/Bridge/DirectPayment.js.map +1 -1
  12. package/dist/cjs/react/web/ui/Bridge/FundWallet.js +233 -105
  13. package/dist/cjs/react/web/ui/Bridge/FundWallet.js.map +1 -1
  14. package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js +1 -7
  15. package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js.map +1 -1
  16. package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js +16 -12
  17. package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
  18. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js +199 -36
  19. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  20. package/dist/cjs/react/web/ui/Bridge/bridge-widget/bridge-widget.js +2 -2
  21. package/dist/cjs/react/web/ui/Bridge/bridge-widget/bridge-widget.js.map +1 -1
  22. package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js +4 -5
  23. package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js.map +1 -1
  24. package/dist/cjs/react/web/ui/Bridge/common/active-wallet-details.js +52 -0
  25. package/dist/cjs/react/web/ui/Bridge/common/active-wallet-details.js.map +1 -0
  26. package/dist/cjs/react/web/ui/Bridge/common/decimal-input.js +36 -0
  27. package/dist/cjs/react/web/ui/Bridge/common/decimal-input.js.map +1 -0
  28. package/dist/cjs/react/web/ui/Bridge/common/selected-token-button.js +58 -0
  29. package/dist/cjs/react/web/ui/Bridge/common/selected-token-button.js.map +1 -0
  30. package/dist/cjs/react/web/ui/Bridge/common/token-balance.js +20 -0
  31. package/dist/cjs/react/web/ui/Bridge/common/token-balance.js.map +1 -0
  32. package/dist/cjs/react/web/ui/Bridge/common/token-query.js +34 -0
  33. package/dist/cjs/react/web/ui/Bridge/common/token-query.js.map +1 -0
  34. package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentDetails.js +3 -3
  35. package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentDetails.js.map +1 -1
  36. package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js +7 -7
  37. package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -1
  38. package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -4
  39. package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
  40. package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
  41. package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js +3 -3
  42. package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -1
  43. package/dist/cjs/react/web/ui/Bridge/swap-widget/SwapWidget.js +8 -11
  44. package/dist/cjs/react/web/ui/Bridge/swap-widget/SwapWidget.js.map +1 -1
  45. package/dist/cjs/react/web/ui/Bridge/swap-widget/swap-ui.js +19 -147
  46. package/dist/cjs/react/web/ui/Bridge/swap-widget/swap-ui.js.map +1 -1
  47. package/dist/cjs/react/web/ui/Bridge/types.js +3 -0
  48. package/dist/cjs/react/web/ui/Bridge/types.js.map +1 -0
  49. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +4 -2
  50. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  51. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +1 -1
  52. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
  53. package/dist/cjs/react/web/ui/ConnectWallet/screens/formatTokenBalance.js.map +1 -1
  54. package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js +1 -1
  55. package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
  56. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +17 -10
  57. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  58. package/dist/cjs/react/web/ui/components/CopyIcon.js +1 -1
  59. package/dist/cjs/react/web/ui/components/CopyIcon.js.map +1 -1
  60. package/dist/cjs/stories/Bridge/CheckoutWidget.stories.js +115 -0
  61. package/dist/cjs/stories/Bridge/CheckoutWidget.stories.js.map +1 -0
  62. package/dist/cjs/stories/Bridge/ErrorBanner.stories.js +7 -111
  63. package/dist/cjs/stories/Bridge/ErrorBanner.stories.js.map +1 -1
  64. package/dist/cjs/stories/Bridge/PaymentDetails.stories.js +27 -306
  65. package/dist/cjs/stories/Bridge/PaymentDetails.stories.js.map +1 -1
  66. package/dist/cjs/stories/Bridge/PaymentSelection.stories.js +21 -128
  67. package/dist/cjs/stories/Bridge/PaymentSelection.stories.js.map +1 -1
  68. package/dist/cjs/stories/Bridge/StepRunner.stories.js +13 -39
  69. package/dist/cjs/stories/Bridge/StepRunner.stories.js.map +1 -1
  70. package/dist/cjs/stories/Bridge/SuccessScreen.stories.js +13 -101
  71. package/dist/cjs/stories/Bridge/SuccessScreen.stories.js.map +1 -1
  72. package/dist/cjs/stories/Bridge/Transaction/TransactionWidget.stories.js +49 -0
  73. package/dist/cjs/stories/Bridge/Transaction/TransactionWidget.stories.js.map +1 -0
  74. package/dist/cjs/stories/Bridge/Transaction/useSendTransactionModal.stories.js +53 -0
  75. package/dist/cjs/stories/Bridge/Transaction/useSendTransactionModal.stories.js.map +1 -0
  76. package/dist/cjs/stories/Bridge/UnsupportedTokenScreen.stories.js +11 -79
  77. package/dist/cjs/stories/Bridge/UnsupportedTokenScreen.stories.js.map +1 -1
  78. package/dist/cjs/stories/Bridge/fixtures.js +21 -62
  79. package/dist/cjs/stories/Bridge/fixtures.js.map +1 -1
  80. package/dist/cjs/stories/BuyWidget.stories.js +44 -8
  81. package/dist/cjs/stories/BuyWidget.stories.js.map +1 -1
  82. package/dist/cjs/stories/utils.js +5 -2
  83. package/dist/cjs/stories/utils.js.map +1 -1
  84. package/dist/cjs/version.js +1 -1
  85. package/dist/cjs/x402/common.js +3 -5
  86. package/dist/cjs/x402/common.js.map +1 -1
  87. package/dist/cjs/x402/facilitator.js +0 -1
  88. package/dist/cjs/x402/facilitator.js.map +1 -1
  89. package/dist/cjs/x402/schemas.js +4 -0
  90. package/dist/cjs/x402/schemas.js.map +1 -1
  91. package/dist/cjs/x402/settle-payment.js +6 -5
  92. package/dist/cjs/x402/settle-payment.js.map +1 -1
  93. package/dist/cjs/x402/sign.js +2 -6
  94. package/dist/cjs/x402/sign.js.map +1 -1
  95. package/dist/cjs/x402/types.js.map +1 -1
  96. package/dist/cjs/x402/verify-payment.js +6 -5
  97. package/dist/cjs/x402/verify-payment.js.map +1 -1
  98. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  99. package/dist/esm/react/core/hooks/usePaymentMethods.js +1 -2
  100. package/dist/esm/react/core/hooks/usePaymentMethods.js.map +1 -1
  101. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +1 -1
  102. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  103. package/dist/esm/react/web/ui/Bridge/BuyWidget.js +185 -99
  104. package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  105. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js +211 -57
  106. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  107. package/dist/esm/react/web/ui/Bridge/DirectPayment.js +7 -7
  108. package/dist/esm/react/web/ui/Bridge/DirectPayment.js.map +1 -1
  109. package/dist/esm/react/web/ui/Bridge/FundWallet.js +237 -109
  110. package/dist/esm/react/web/ui/Bridge/FundWallet.js.map +1 -1
  111. package/dist/esm/react/web/ui/Bridge/QuoteLoader.js +1 -7
  112. package/dist/esm/react/web/ui/Bridge/QuoteLoader.js.map +1 -1
  113. package/dist/esm/react/web/ui/Bridge/TransactionPayment.js +16 -12
  114. package/dist/esm/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
  115. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js +198 -36
  116. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  117. package/dist/esm/react/web/ui/Bridge/bridge-widget/bridge-widget.js +2 -2
  118. package/dist/esm/react/web/ui/Bridge/bridge-widget/bridge-widget.js.map +1 -1
  119. package/dist/esm/react/web/ui/Bridge/common/WithHeader.js +4 -5
  120. package/dist/esm/react/web/ui/Bridge/common/WithHeader.js.map +1 -1
  121. package/dist/esm/react/web/ui/Bridge/common/active-wallet-details.js +49 -0
  122. package/dist/esm/react/web/ui/Bridge/common/active-wallet-details.js.map +1 -0
  123. package/dist/esm/react/web/ui/Bridge/common/decimal-input.js +33 -0
  124. package/dist/esm/react/web/ui/Bridge/common/decimal-input.js.map +1 -0
  125. package/dist/esm/react/web/ui/Bridge/common/selected-token-button.js +55 -0
  126. package/dist/esm/react/web/ui/Bridge/common/selected-token-button.js.map +1 -0
  127. package/dist/esm/react/web/ui/Bridge/common/token-balance.js +17 -0
  128. package/dist/esm/react/web/ui/Bridge/common/token-balance.js.map +1 -0
  129. package/dist/esm/react/web/ui/Bridge/common/token-query.js +31 -0
  130. package/dist/esm/react/web/ui/Bridge/common/token-query.js.map +1 -0
  131. package/dist/esm/react/web/ui/Bridge/payment-details/PaymentDetails.js +3 -3
  132. package/dist/esm/react/web/ui/Bridge/payment-details/PaymentDetails.js.map +1 -1
  133. package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js +7 -7
  134. package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -1
  135. package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -4
  136. package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
  137. package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
  138. package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js +3 -3
  139. package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -1
  140. package/dist/esm/react/web/ui/Bridge/swap-widget/SwapWidget.js +8 -11
  141. package/dist/esm/react/web/ui/Bridge/swap-widget/SwapWidget.js.map +1 -1
  142. package/dist/esm/react/web/ui/Bridge/swap-widget/swap-ui.js +16 -144
  143. package/dist/esm/react/web/ui/Bridge/swap-widget/swap-ui.js.map +1 -1
  144. package/dist/esm/react/web/ui/Bridge/types.js +2 -0
  145. package/dist/esm/react/web/ui/Bridge/types.js.map +1 -0
  146. package/dist/esm/react/web/ui/ConnectWallet/Details.js +4 -2
  147. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  148. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +1 -1
  149. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
  150. package/dist/esm/react/web/ui/ConnectWallet/screens/formatTokenBalance.js.map +1 -1
  151. package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js +1 -1
  152. package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
  153. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +17 -10
  154. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  155. package/dist/esm/react/web/ui/components/CopyIcon.js +1 -1
  156. package/dist/esm/react/web/ui/components/CopyIcon.js.map +1 -1
  157. package/dist/esm/stories/Bridge/CheckoutWidget.stories.js +112 -0
  158. package/dist/esm/stories/Bridge/CheckoutWidget.stories.js.map +1 -0
  159. package/dist/esm/stories/Bridge/ErrorBanner.stories.js +7 -111
  160. package/dist/esm/stories/Bridge/ErrorBanner.stories.js.map +1 -1
  161. package/dist/esm/stories/Bridge/PaymentDetails.stories.js +28 -307
  162. package/dist/esm/stories/Bridge/PaymentDetails.stories.js.map +1 -1
  163. package/dist/esm/stories/Bridge/PaymentSelection.stories.js +22 -129
  164. package/dist/esm/stories/Bridge/PaymentSelection.stories.js.map +1 -1
  165. package/dist/esm/stories/Bridge/StepRunner.stories.js +12 -38
  166. package/dist/esm/stories/Bridge/StepRunner.stories.js.map +1 -1
  167. package/dist/esm/stories/Bridge/SuccessScreen.stories.js +14 -102
  168. package/dist/esm/stories/Bridge/SuccessScreen.stories.js.map +1 -1
  169. package/dist/esm/stories/Bridge/Transaction/TransactionWidget.stories.js +46 -0
  170. package/dist/esm/stories/Bridge/Transaction/TransactionWidget.stories.js.map +1 -0
  171. package/dist/esm/stories/Bridge/Transaction/useSendTransactionModal.stories.js +50 -0
  172. package/dist/esm/stories/Bridge/Transaction/useSendTransactionModal.stories.js.map +1 -0
  173. package/dist/esm/stories/Bridge/UnsupportedTokenScreen.stories.js +12 -80
  174. package/dist/esm/stories/Bridge/UnsupportedTokenScreen.stories.js.map +1 -1
  175. package/dist/esm/stories/Bridge/fixtures.js +15 -56
  176. package/dist/esm/stories/Bridge/fixtures.js.map +1 -1
  177. package/dist/esm/stories/BuyWidget.stories.js +37 -9
  178. package/dist/esm/stories/BuyWidget.stories.js.map +1 -1
  179. package/dist/esm/stories/utils.js +6 -3
  180. package/dist/esm/stories/utils.js.map +1 -1
  181. package/dist/esm/version.js +1 -1
  182. package/dist/esm/x402/common.js +3 -5
  183. package/dist/esm/x402/common.js.map +1 -1
  184. package/dist/esm/x402/facilitator.js +0 -1
  185. package/dist/esm/x402/facilitator.js.map +1 -1
  186. package/dist/esm/x402/schemas.js +5 -1
  187. package/dist/esm/x402/schemas.js.map +1 -1
  188. package/dist/esm/x402/settle-payment.js +6 -5
  189. package/dist/esm/x402/settle-payment.js.map +1 -1
  190. package/dist/esm/x402/sign.js +2 -6
  191. package/dist/esm/x402/sign.js.map +1 -1
  192. package/dist/esm/x402/types.js.map +1 -1
  193. package/dist/esm/x402/verify-payment.js +6 -5
  194. package/dist/esm/x402/verify-payment.js.map +1 -1
  195. package/dist/scripts/bridge-widget.d.ts +3 -3
  196. package/dist/scripts/bridge-widget.js +113 -150
  197. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +6 -0
  198. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  199. package/dist/types/react/core/hooks/usePaymentMethods.d.ts +1 -2
  200. package/dist/types/react/core/hooks/usePaymentMethods.d.ts.map +1 -1
  201. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  202. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +7 -12
  203. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
  204. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +5 -8
  205. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -1
  206. package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts +15 -12
  207. package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts.map +1 -1
  208. package/dist/types/react/web/ui/Bridge/FundWallet.d.ts +33 -15
  209. package/dist/types/react/web/ui/Bridge/FundWallet.d.ts.map +1 -1
  210. package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts +9 -12
  211. package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts.map +1 -1
  212. package/dist/types/react/web/ui/Bridge/StepRunner.d.ts +7 -7
  213. package/dist/types/react/web/ui/Bridge/StepRunner.d.ts.map +1 -1
  214. package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts +14 -7
  215. package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts.map +1 -1
  216. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +3 -5
  217. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -1
  218. package/dist/types/react/web/ui/Bridge/UnsupportedTokenScreen.d.ts +4 -3
  219. package/dist/types/react/web/ui/Bridge/UnsupportedTokenScreen.d.ts.map +1 -1
  220. package/dist/types/react/web/ui/Bridge/bridge-widget/bridge-widget.d.ts +3 -3
  221. package/dist/types/react/web/ui/Bridge/bridge-widget/bridge-widget.d.ts.map +1 -1
  222. package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts +4 -4
  223. package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts.map +1 -1
  224. package/dist/types/react/web/ui/Bridge/common/active-wallet-details.d.ts +8 -0
  225. package/dist/types/react/web/ui/Bridge/common/active-wallet-details.d.ts.map +1 -0
  226. package/dist/types/react/web/ui/Bridge/common/decimal-input.d.ts +6 -0
  227. package/dist/types/react/web/ui/Bridge/common/decimal-input.d.ts.map +1 -0
  228. package/dist/types/react/web/ui/Bridge/common/selected-token-button.d.ts +13 -0
  229. package/dist/types/react/web/ui/Bridge/common/selected-token-button.d.ts.map +1 -0
  230. package/dist/types/react/web/ui/Bridge/common/token-balance.d.ts +8 -0
  231. package/dist/types/react/web/ui/Bridge/common/token-balance.d.ts.map +1 -0
  232. package/dist/types/react/web/ui/Bridge/common/token-query.d.ts +15 -0
  233. package/dist/types/react/web/ui/Bridge/common/token-query.d.ts.map +1 -0
  234. package/dist/types/react/web/ui/Bridge/payment-details/PaymentDetails.d.ts +13 -11
  235. package/dist/types/react/web/ui/Bridge/payment-details/PaymentDetails.d.ts.map +1 -1
  236. package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts +8 -3
  237. package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts.map +1 -1
  238. package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts +12 -16
  239. package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts.map +1 -1
  240. package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts +1 -1
  241. package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts.map +1 -1
  242. package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts +6 -6
  243. package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts.map +1 -1
  244. package/dist/types/react/web/ui/Bridge/swap-widget/swap-ui.d.ts.map +1 -1
  245. package/dist/types/react/web/ui/Bridge/types.d.ts +39 -0
  246. package/dist/types/react/web/ui/Bridge/types.d.ts.map +1 -0
  247. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  248. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
  249. package/dist/types/react/web/ui/ConnectWallet/screens/formatTokenBalance.d.ts +2 -1
  250. package/dist/types/react/web/ui/ConnectWallet/screens/formatTokenBalance.d.ts.map +1 -1
  251. package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts +0 -1
  252. package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts.map +1 -1
  253. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +3 -1
  254. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
  255. package/dist/types/react/web/ui/components/CopyIcon.d.ts +1 -0
  256. package/dist/types/react/web/ui/components/CopyIcon.d.ts.map +1 -1
  257. package/dist/types/script-exports/bridge-widget-script.d.ts +3 -3
  258. package/dist/types/script-exports/bridge-widget-script.d.ts.map +1 -1
  259. package/dist/types/stories/Bridge/CheckoutWidget.stories.d.ts +25 -0
  260. package/dist/types/stories/Bridge/CheckoutWidget.stories.d.ts.map +1 -0
  261. package/dist/types/stories/Bridge/ErrorBanner.stories.d.ts +3 -47
  262. package/dist/types/stories/Bridge/ErrorBanner.stories.d.ts.map +1 -1
  263. package/dist/types/stories/Bridge/PaymentDetails.stories.d.ts +3 -56
  264. package/dist/types/stories/Bridge/PaymentDetails.stories.d.ts.map +1 -1
  265. package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts +5 -63
  266. package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts.map +1 -1
  267. package/dist/types/stories/Bridge/StepRunner.stories.d.ts +4 -52
  268. package/dist/types/stories/Bridge/StepRunner.stories.d.ts.map +1 -1
  269. package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts +4 -54
  270. package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts.map +1 -1
  271. package/dist/types/stories/Bridge/Transaction/TransactionWidget.stories.d.ts +11 -0
  272. package/dist/types/stories/Bridge/Transaction/TransactionWidget.stories.d.ts.map +1 -0
  273. package/dist/types/stories/Bridge/Transaction/useSendTransactionModal.stories.d.ts +18 -0
  274. package/dist/types/stories/Bridge/Transaction/useSendTransactionModal.stories.d.ts.map +1 -0
  275. package/dist/types/stories/Bridge/UnsupportedTokenScreen.stories.d.ts +3 -34
  276. package/dist/types/stories/Bridge/UnsupportedTokenScreen.stories.d.ts.map +1 -1
  277. package/dist/types/stories/Bridge/fixtures.d.ts +19 -17
  278. package/dist/types/stories/Bridge/fixtures.d.ts.map +1 -1
  279. package/dist/types/stories/BuyWidget.stories.d.ts +9 -1
  280. package/dist/types/stories/BuyWidget.stories.d.ts.map +1 -1
  281. package/dist/types/stories/utils.d.ts +0 -2
  282. package/dist/types/stories/utils.d.ts.map +1 -1
  283. package/dist/types/version.d.ts +1 -1
  284. package/dist/types/x402/common.d.ts.map +1 -1
  285. package/dist/types/x402/facilitator.d.ts +2 -3
  286. package/dist/types/x402/facilitator.d.ts.map +1 -1
  287. package/dist/types/x402/schemas.d.ts +21 -0
  288. package/dist/types/x402/schemas.d.ts.map +1 -1
  289. package/dist/types/x402/settle-payment.d.ts.map +1 -1
  290. package/dist/types/x402/types.d.ts +5 -4
  291. package/dist/types/x402/types.d.ts.map +1 -1
  292. package/dist/types/x402/verify-payment.d.ts.map +1 -1
  293. package/package.json +1 -1
  294. package/src/react/core/hooks/transaction/useSendTransaction.ts +6 -0
  295. package/src/react/core/hooks/usePaymentMethods.ts +1 -4
  296. package/src/react/web/hooks/transaction/useSendTransaction.tsx +1 -0
  297. package/src/react/web/ui/Bridge/BuyWidget.tsx +355 -160
  298. package/src/react/web/ui/Bridge/CheckoutWidget.tsx +384 -107
  299. package/src/react/web/ui/Bridge/DirectPayment.tsx +34 -26
  300. package/src/react/web/ui/Bridge/FundWallet.tsx +610 -266
  301. package/src/react/web/ui/Bridge/QuoteLoader.tsx +10 -20
  302. package/src/react/web/ui/Bridge/StepRunner.tsx +7 -7
  303. package/src/react/web/ui/Bridge/TransactionPayment.tsx +35 -25
  304. package/src/react/web/ui/Bridge/TransactionWidget.tsx +395 -71
  305. package/src/react/web/ui/Bridge/UnsupportedTokenScreen.tsx +3 -3
  306. package/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx +16 -14
  307. package/src/react/web/ui/Bridge/common/WithHeader.tsx +13 -19
  308. package/src/react/web/ui/Bridge/common/active-wallet-details.tsx +103 -0
  309. package/src/react/web/ui/Bridge/common/decimal-input.tsx +61 -0
  310. package/src/react/web/ui/Bridge/common/selected-token-button.tsx +168 -0
  311. package/src/react/web/ui/Bridge/common/token-balance.tsx +23 -0
  312. package/src/react/web/ui/Bridge/common/token-query.ts +49 -0
  313. package/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx +23 -14
  314. package/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx +36 -22
  315. package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +11 -22
  316. package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +1 -1
  317. package/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx +7 -8
  318. package/src/react/web/ui/Bridge/swap-widget/SwapWidget.tsx +14 -12
  319. package/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx +19 -332
  320. package/src/react/web/ui/Bridge/types.ts +47 -0
  321. package/src/react/web/ui/ConnectWallet/Details.tsx +3 -1
  322. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +1 -5
  323. package/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts +5 -1
  324. package/src/react/web/ui/TransactionButton/DepositScreen.tsx +1 -2
  325. package/src/react/web/ui/TransactionButton/TransactionModal.tsx +44 -27
  326. package/src/react/web/ui/components/CopyIcon.tsx +11 -2
  327. package/src/script-exports/bridge-widget-script.tsx +3 -3
  328. package/src/script-exports/readme.md +1 -8
  329. package/src/stories/Bridge/CheckoutWidget.stories.tsx +147 -0
  330. package/src/stories/Bridge/ErrorBanner.stories.tsx +13 -138
  331. package/src/stories/Bridge/PaymentDetails.stories.tsx +34 -349
  332. package/src/stories/Bridge/PaymentSelection.stories.tsx +28 -156
  333. package/src/stories/Bridge/StepRunner.stories.tsx +18 -65
  334. package/src/stories/Bridge/SuccessScreen.stories.tsx +21 -130
  335. package/src/stories/Bridge/Transaction/TransactionWidget.stories.tsx +63 -0
  336. package/src/stories/Bridge/Transaction/useSendTransactionModal.stories.tsx +68 -0
  337. package/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx +19 -108
  338. package/src/stories/Bridge/fixtures.ts +36 -63
  339. package/src/stories/BuyWidget.stories.tsx +103 -8
  340. package/src/stories/utils.tsx +16 -9
  341. package/src/version.ts +1 -1
  342. package/src/x402/common.ts +2 -5
  343. package/src/x402/facilitator.ts +3 -3
  344. package/src/x402/schemas.ts +10 -0
  345. package/src/x402/settle-payment.ts +7 -6
  346. package/src/x402/sign.ts +3 -8
  347. package/src/x402/types.ts +5 -4
  348. package/src/x402/verify-payment.ts +7 -6
  349. package/dist/cjs/react/core/machines/paymentMachine.js +0 -191
  350. package/dist/cjs/react/core/machines/paymentMachine.js.map +0 -1
  351. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js +0 -129
  352. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +0 -1
  353. package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js +0 -258
  354. package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js.map +0 -1
  355. package/dist/cjs/stories/Bridge/DirectPayment.stories.js +0 -222
  356. package/dist/cjs/stories/Bridge/DirectPayment.stories.js.map +0 -1
  357. package/dist/cjs/stories/Bridge/FundWallet.stories.js +0 -201
  358. package/dist/cjs/stories/Bridge/FundWallet.stories.js.map +0 -1
  359. package/dist/cjs/stories/Bridge/TransactionPayment.stories.js +0 -168
  360. package/dist/cjs/stories/Bridge/TransactionPayment.stories.js.map +0 -1
  361. package/dist/esm/react/core/machines/paymentMachine.js +0 -188
  362. package/dist/esm/react/core/machines/paymentMachine.js.map +0 -1
  363. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js +0 -126
  364. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +0 -1
  365. package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js +0 -255
  366. package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js.map +0 -1
  367. package/dist/esm/stories/Bridge/DirectPayment.stories.js +0 -219
  368. package/dist/esm/stories/Bridge/DirectPayment.stories.js.map +0 -1
  369. package/dist/esm/stories/Bridge/FundWallet.stories.js +0 -198
  370. package/dist/esm/stories/Bridge/FundWallet.stories.js.map +0 -1
  371. package/dist/esm/stories/Bridge/TransactionPayment.stories.js +0 -165
  372. package/dist/esm/stories/Bridge/TransactionPayment.stories.js.map +0 -1
  373. package/dist/types/react/core/machines/paymentMachine.d.ts +0 -89
  374. package/dist/types/react/core/machines/paymentMachine.d.ts.map +0 -1
  375. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +0 -99
  376. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +0 -1
  377. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts +0 -97
  378. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +0 -1
  379. package/dist/types/stories/Bridge/DirectPayment.stories.d.ts +0 -69
  380. package/dist/types/stories/Bridge/DirectPayment.stories.d.ts.map +0 -1
  381. package/dist/types/stories/Bridge/FundWallet.stories.d.ts +0 -67
  382. package/dist/types/stories/Bridge/FundWallet.stories.d.ts.map +0 -1
  383. package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts +0 -60
  384. package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts.map +0 -1
  385. package/src/react/core/machines/paymentMachine.test.ts +0 -519
  386. package/src/react/core/machines/paymentMachine.ts +0 -295
  387. package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +0 -425
  388. package/src/stories/Bridge/BridgeOrchestrator.stories.tsx +0 -298
  389. package/src/stories/Bridge/DirectPayment.stories.tsx +0 -256
  390. package/src/stories/Bridge/FundWallet.stories.tsx +0 -227
  391. package/src/stories/Bridge/TransactionPayment.stories.tsx +0 -202
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PaymentDetails, } from "../../react/web/ui/Bridge/payment-details/PaymentDetails.js";
2
+ import { PaymentDetails } from "../../react/web/ui/Bridge/payment-details/PaymentDetails.js";
3
3
  import { stringify } from "../../utils/json.js";
4
4
  import { ModalThemeWrapper, storyClient } from "../utils.js";
5
- import { buyWithApprovalQuote, complexBuyQuote, DIRECT_PAYMENT_UI_OPTIONS, longTextBuyQuote, onrampWithSwapsQuote, STORY_MOCK_WALLET, simpleBuyQuote, simpleOnrampQuote, TRANSACTION_UI_OPTIONS, USDC, } from "./fixtures.js";
5
+ import { buyWithApprovalQuote, complexBuyQuote, DIRECT_PAYMENT_UI_OPTIONS, longTextBuyQuote, onrampWithSwapsQuote, STORY_MOCK_WALLET, simpleBuyQuote, simpleOnrampQuote, TRANSACTION_UI_OPTIONS, } from "./fixtures.js";
6
6
  const fiatPaymentMethod = {
7
7
  currency: "USD",
8
8
  onramp: "coinbase",
@@ -37,391 +37,112 @@ const ethCryptoPaymentMethod = JSON.parse(stringify({
37
37
  payerWallet: STORY_MOCK_WALLET,
38
38
  type: "wallet",
39
39
  }));
40
- // Wrapper component to provide theme context
41
- const PaymentDetailsWithTheme = (props) => {
42
- const { theme, ...componentProps } = props;
43
- return (_jsx(ModalThemeWrapper, { theme: theme, children: _jsx(PaymentDetails, { ...componentProps }) }));
44
- };
45
40
  const meta = {
46
41
  args: {
47
42
  onBack: () => { },
48
43
  onConfirm: () => { },
49
44
  onError: (error) => console.error("Error:", error),
50
45
  preparedQuote: simpleOnrampQuote,
51
- theme: "dark",
52
- uiOptions: {
53
- destinationToken: USDC,
46
+ modeInfo: {
54
47
  mode: "fund_wallet",
55
48
  },
56
- },
57
- argTypes: {
58
- onBack: { action: "back clicked" },
59
- onConfirm: { action: "route confirmed" },
60
- onError: { action: "error occurred" },
61
- theme: {
62
- control: "select",
63
- description: "Theme for the component",
64
- options: ["light", "dark"],
65
- },
66
- },
67
- component: PaymentDetailsWithTheme,
68
- parameters: {
69
- docs: {
70
- description: {
71
- component: "Route preview screen that displays prepared quote details, fees, estimated time, and transaction steps for user confirmation.",
72
- },
49
+ currency: "USD",
50
+ metadata: {
51
+ title: undefined,
52
+ description: undefined,
73
53
  },
74
- layout: "centered",
54
+ client: storyClient,
55
+ confirmButtonLabel: undefined,
75
56
  },
76
- tags: ["autodocs"],
77
- title: "Bridge/PaymentDetails",
57
+ decorators: [
58
+ (Story) => (_jsx(ModalThemeWrapper, { children: _jsx(Story, {}) })),
59
+ ],
60
+ component: PaymentDetails,
61
+ title: "Bridge/screens/PaymentDetails",
78
62
  };
79
63
  export default meta;
80
64
  export const OnrampSimple = {
81
65
  args: {
82
- client: storyClient,
83
66
  paymentMethod: fiatPaymentMethod,
84
67
  preparedQuote: simpleOnrampQuote,
85
- theme: "dark",
86
- },
87
- parameters: {
88
- backgrounds: { default: "dark" },
89
- docs: {
90
- description: {
91
- story: "Simple onramp quote with no extra steps - direct fiat to crypto.",
92
- },
93
- },
94
- },
95
- };
96
- export const OnrampSimpleLight = {
97
- args: {
98
- client: storyClient,
99
- paymentMethod: fiatPaymentMethod,
100
- preparedQuote: simpleOnrampQuote,
101
- theme: "light",
102
- },
103
- parameters: {
104
- backgrounds: { default: "light" },
105
- docs: {
106
- description: {
107
- story: "Simple onramp quote with no extra steps (light theme).",
108
- },
109
- },
110
68
  },
111
69
  };
112
70
  export const OnrampSimpleDirectPayment = {
113
71
  args: {
114
- client: storyClient,
115
- paymentMethod: fiatPaymentMethod,
116
- preparedQuote: simpleOnrampQuote,
117
- theme: "dark",
118
- uiOptions: DIRECT_PAYMENT_UI_OPTIONS.credits,
119
- },
120
- parameters: {
121
- backgrounds: { default: "dark" },
122
- docs: {
123
- description: {
124
- story: "Simple onramp quote with no extra steps - direct fiat to crypto.",
125
- },
126
- },
127
- },
128
- };
129
- export const OnrampSimpleLightDirectPayment = {
130
- args: {
131
- client: storyClient,
132
72
  paymentMethod: fiatPaymentMethod,
133
73
  preparedQuote: simpleOnrampQuote,
134
- theme: "light",
135
- uiOptions: DIRECT_PAYMENT_UI_OPTIONS.concertTicket,
136
- },
137
- parameters: {
138
- backgrounds: { default: "light" },
139
- docs: {
140
- description: {
141
- story: "Simple onramp quote with no extra steps (light theme).",
142
- },
143
- },
74
+ ...DIRECT_PAYMENT_UI_OPTIONS.credits,
144
75
  },
145
76
  };
146
77
  export const OnrampWithSwaps = {
147
78
  args: {
148
- client: storyClient,
149
- paymentMethod: fiatPaymentMethod,
150
- preparedQuote: onrampWithSwapsQuote,
151
- theme: "dark",
152
- },
153
- parameters: {
154
- backgrounds: { default: "dark" },
155
- docs: {
156
- description: {
157
- story: "Onramp quote with 2 additional swap steps after the fiat purchase.",
158
- },
159
- },
160
- },
161
- };
162
- export const OnrampWithSwapsLight = {
163
- args: {
164
- client: storyClient,
165
79
  paymentMethod: fiatPaymentMethod,
166
80
  preparedQuote: onrampWithSwapsQuote,
167
- theme: "light",
168
- },
169
- parameters: {
170
- backgrounds: { default: "light" },
171
- docs: {
172
- description: {
173
- story: "Onramp quote with 2 additional swap steps (light theme).",
174
- },
175
- },
176
81
  },
177
82
  };
178
83
  export const BuySimple = {
179
84
  args: {
180
- client: storyClient,
181
85
  paymentMethod: ethCryptoPaymentMethod,
182
86
  preparedQuote: simpleBuyQuote,
183
- theme: "dark",
184
- },
185
- parameters: {
186
- backgrounds: { default: "dark" },
187
- docs: {
188
- description: {
189
- story: "Simple buy quote with a single transaction (no approval needed).",
190
- },
191
- },
192
- },
193
- };
194
- export const BuySimpleLight = {
195
- args: {
196
- client: storyClient,
197
- paymentMethod: ethCryptoPaymentMethod,
198
- preparedQuote: simpleBuyQuote,
199
- theme: "light",
200
- },
201
- parameters: {
202
- backgrounds: { default: "light" },
203
- docs: {
204
- description: {
205
- story: "Simple buy quote with a single transaction (light theme).",
206
- },
207
- },
208
87
  },
209
88
  };
210
89
  export const BuySimpleDirectPayment = {
211
90
  args: {
212
- client: storyClient,
213
91
  paymentMethod: ethCryptoPaymentMethod,
214
92
  preparedQuote: simpleBuyQuote,
215
- theme: "dark",
216
- uiOptions: DIRECT_PAYMENT_UI_OPTIONS.digitalArt,
217
- },
218
- parameters: {
219
- backgrounds: { default: "dark" },
220
- docs: {
221
- description: {
222
- story: "Simple buy quote with a single transaction (no approval needed).",
223
- },
224
- },
225
- },
226
- };
227
- export const BuySimpleLightDirectPayment = {
228
- args: {
229
- client: storyClient,
230
- paymentMethod: ethCryptoPaymentMethod,
231
- preparedQuote: simpleBuyQuote,
232
- theme: "light",
233
- uiOptions: DIRECT_PAYMENT_UI_OPTIONS.subscription,
234
- },
235
- parameters: {
236
- backgrounds: { default: "light" },
237
- docs: {
238
- description: {
239
- story: "Simple buy quote with a single transaction (light theme).",
240
- },
241
- },
93
+ ...DIRECT_PAYMENT_UI_OPTIONS.digitalArt,
242
94
  },
243
95
  };
244
96
  export const BuyWithLongText = {
245
97
  args: {
246
- client: storyClient,
247
98
  paymentMethod: ethCryptoPaymentMethod,
248
99
  preparedQuote: longTextBuyQuote,
249
- theme: "dark",
250
- },
251
- parameters: {
252
- backgrounds: { default: "dark" },
253
- docs: {
254
- description: {
255
- story: "Simple buy quote with a single transaction (light theme).",
256
- },
257
- },
258
100
  },
259
101
  };
260
102
  export const BuyWithApproval = {
261
103
  args: {
262
- client: storyClient,
263
104
  paymentMethod: cryptoPaymentMethod,
264
105
  preparedQuote: buyWithApprovalQuote,
265
- theme: "dark",
266
- },
267
- parameters: {
268
- backgrounds: { default: "dark" },
269
- docs: {
270
- description: {
271
- story: "Buy quote requiring both approval and buy transactions in a single step.",
272
- },
273
- },
274
- },
275
- };
276
- export const BuyWithApprovalLight = {
277
- args: {
278
- client: storyClient,
279
- paymentMethod: cryptoPaymentMethod,
280
- preparedQuote: buyWithApprovalQuote,
281
- theme: "light",
282
- },
283
- parameters: {
284
- backgrounds: { default: "light" },
285
- docs: {
286
- description: {
287
- story: "Buy quote with approval and buy transactions (light theme).",
288
- },
289
- },
290
106
  },
291
107
  };
292
108
  export const BuyComplex = {
293
109
  args: {
294
- client: storyClient,
295
- paymentMethod: ethCryptoPaymentMethod,
296
- preparedQuote: complexBuyQuote,
297
- theme: "dark",
298
- },
299
- parameters: {
300
- backgrounds: { default: "dark" },
301
- docs: {
302
- description: {
303
- story: "Complex buy quote with 3 steps, each requiring approval and execution transactions across multiple chains.",
304
- },
305
- },
306
- },
307
- };
308
- export const BuyComplexLight = {
309
- args: {
310
- client: storyClient,
311
110
  paymentMethod: ethCryptoPaymentMethod,
312
111
  preparedQuote: complexBuyQuote,
313
- theme: "light",
314
- },
315
- parameters: {
316
- backgrounds: { default: "light" },
317
- docs: {
318
- description: {
319
- story: "Complex multi-step buy quote spanning multiple chains (light theme).",
320
- },
321
- },
322
112
  },
323
113
  };
324
114
  // ========== TRANSACTION MODE STORIES ========== //
325
115
  export const TransactionEthTransfer = {
326
116
  args: {
327
- client: storyClient,
328
117
  paymentMethod: ethCryptoPaymentMethod,
329
118
  preparedQuote: simpleBuyQuote,
330
- theme: "dark",
331
- uiOptions: TRANSACTION_UI_OPTIONS.ethTransfer,
332
- },
333
- parameters: {
334
- backgrounds: { default: "dark" },
335
- docs: {
336
- description: {
337
- story: "Transaction mode showing ETH transfer payment details with function name and contract information displayed in the PaymentDetails screen.",
338
- },
339
- },
340
- },
341
- };
342
- export const TransactionEthTransferLight = {
343
- args: {
344
- client: storyClient,
345
- paymentMethod: ethCryptoPaymentMethod,
346
- preparedQuote: simpleBuyQuote,
347
- theme: "light",
348
- uiOptions: TRANSACTION_UI_OPTIONS.ethTransfer,
349
- },
350
- parameters: {
351
- backgrounds: { default: "light" },
352
- docs: {
353
- description: {
354
- story: "Light theme version of transaction mode for ETH transfer with detailed payment overview.",
355
- },
119
+ modeInfo: {
120
+ mode: "transaction",
121
+ transaction: TRANSACTION_UI_OPTIONS.ethTransfer.transaction,
356
122
  },
123
+ ...TRANSACTION_UI_OPTIONS.ethTransfer,
357
124
  },
358
125
  };
359
126
  export const TransactionERC20Transfer = {
360
127
  args: {
361
- client: storyClient,
362
- paymentMethod: cryptoPaymentMethod,
363
- preparedQuote: simpleBuyQuote,
364
- theme: "dark",
365
- uiOptions: TRANSACTION_UI_OPTIONS.erc20Transfer,
366
- },
367
- parameters: {
368
- backgrounds: { default: "dark" },
369
- docs: {
370
- description: {
371
- story: "Transaction mode for ERC20 token transfer showing token details and transfer function in payment preview.",
372
- },
373
- },
374
- },
375
- };
376
- export const TransactionERC20TransferLight = {
377
- args: {
378
- client: storyClient,
379
128
  paymentMethod: cryptoPaymentMethod,
380
129
  preparedQuote: simpleBuyQuote,
381
- theme: "light",
382
- uiOptions: TRANSACTION_UI_OPTIONS.erc20Transfer,
383
- },
384
- parameters: {
385
- backgrounds: { default: "light" },
386
- docs: {
387
- description: {
388
- story: "Light theme version of ERC20 token transfer transaction mode with payment details.",
389
- },
130
+ modeInfo: {
131
+ mode: "transaction",
132
+ transaction: TRANSACTION_UI_OPTIONS.erc20Transfer.transaction,
390
133
  },
134
+ ...TRANSACTION_UI_OPTIONS.erc20Transfer,
391
135
  },
392
136
  };
393
137
  export const TransactionContractInteraction = {
394
138
  args: {
395
- client: storyClient,
396
- paymentMethod: ethCryptoPaymentMethod,
397
- preparedQuote: simpleBuyQuote,
398
- theme: "dark",
399
- uiOptions: TRANSACTION_UI_OPTIONS.contractInteraction,
400
- },
401
- parameters: {
402
- backgrounds: { default: "dark" },
403
- docs: {
404
- description: {
405
- story: "Transaction mode for complex contract interaction (claimTo function) showing detailed contract information and function details in payment preview.",
406
- },
407
- },
408
- },
409
- };
410
- export const TransactionContractInteractionLight = {
411
- args: {
412
- client: storyClient,
413
139
  paymentMethod: ethCryptoPaymentMethod,
414
140
  preparedQuote: simpleBuyQuote,
415
- theme: "light",
416
- uiOptions: TRANSACTION_UI_OPTIONS.contractInteraction,
417
- },
418
- parameters: {
419
- backgrounds: { default: "light" },
420
- docs: {
421
- description: {
422
- story: "Light theme version of contract interaction transaction mode with comprehensive payment details.",
423
- },
141
+ modeInfo: {
142
+ mode: "transaction",
143
+ transaction: TRANSACTION_UI_OPTIONS.contractInteraction.transaction,
424
144
  },
145
+ ...TRANSACTION_UI_OPTIONS.contractInteraction,
425
146
  },
426
147
  };
427
148
  //# sourceMappingURL=PaymentDetails.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentDetails.stories.js","sourceRoot":"","sources":["../../../../src/stories/Bridge/PaymentDetails.stories.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,cAAc,GAEf,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,IAAI,GACL,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H,qJAAqJ;aACxJ;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAU;IACxD,IAAI,EAAE;QACJ,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,sBAAsB;QACrC,aAAa,EAAE,cAAc;QAC7B,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,sBAAsB,CAAC,mBAAmB;KACtD;IACD,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QACjC,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,kGAAkG;aACrG;SACF;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"PaymentDetails.stories.js","sourceRoot":"","sources":["../../../../src/stories/Bridge/PaymentDetails.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAE7F,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,MAAM,iBAAiB,GAAkB;IACvC,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,mBAAmB,GAAkB,IAAI,CAAC,KAAK,CACnD,SAAS,CAAC;IACR,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE;QACX,OAAO,EAAE,4CAA4C;QACrD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,CAAC;QACX,OAAO,EACL,wEAAwE;QAC1E,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,MAAM;K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C,IAAI,EAAE;QACJ,aAAa,EAAE,mBAAmB;QAClC,aAAa,EAAE,cAAc;QAC7B,QAAQ,EAAE;YACR,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,WAAW;SAC9D;QACD,GAAG,sBAAsB,CAAC,aAAa;KACxC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAU;IACnD,IAAI,EAAE;QACJ,aAAa,EAAE,sBAAsB;QACrC,aAAa,EAAE,cAAc;QAC7B,QAAQ,EAAE;YACR,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,WAAW;SACpE;QACD,GAAG,sBAAsB,CAAC,mBAAmB;KAC9C;CACF,CAAC"}
@@ -1,149 +1,42 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PaymentSelection, } from "../../react/web/ui/Bridge/payment-selection/PaymentSelection.js";
2
+ import { PaymentSelection } from "../../react/web/ui/Bridge/payment-selection/PaymentSelection.js";
3
3
  import en from "../../react/web/ui/ConnectWallet/locale/en.js";
4
4
  import { ModalThemeWrapper, storyClient } from "../utils.js";
5
- import { UNI, USDC } from "./fixtures.js";
6
- // Wrapper component to provide theme context
7
- const PaymentSelectionWithTheme = (props) => {
8
- const { theme, ...componentProps } = props;
9
- return (_jsx(ModalThemeWrapper, { theme: theme, children: _jsx(PaymentSelection, { ...componentProps }) }));
10
- };
5
+ import { USDC } from "./fixtures.js";
11
6
  const meta = {
12
7
  args: {
13
8
  client: storyClient,
9
+ onBack: () => {
10
+ alert("Back");
11
+ },
14
12
  connectLocale: en,
15
13
  destinationAmount: "1",
16
14
  destinationToken: USDC,
17
15
  onError: (error) => console.error("Error:", error),
18
- onPaymentMethodSelected: (_paymentMethod) => { },
19
- theme: "dark",
16
+ onPaymentMethodSelected: () => { },
20
17
  country: "US",
21
- },
22
- argTypes: {
23
- connectLocale: {
24
- description: "Locale for connecting wallets",
25
- },
26
- destinationAmount: {
27
- description: "Amount of destination token to bridge",
28
- },
29
- destinationToken: {
30
- description: "The target token to bridge to",
31
- },
32
- onBack: {
33
- action: "back clicked",
34
- description: "Called when user wants to go back (only shown in Step 1)",
35
- },
36
- onError: {
37
- action: "error occurred",
38
- description: "Called when an error occurs during the flow",
39
- },
40
- onPaymentMethodSelected: {
41
- action: "payment method selected",
42
- description: "Called when user selects a wallet token or fiat provider",
43
- },
44
- theme: {
45
- control: "select",
46
- description: "Theme for the component",
47
- options: ["light", "dark"],
48
- },
49
- },
50
- component: PaymentSelectionWithTheme,
51
- parameters: {
52
- docs: {
53
- description: {
54
- component: "Payment method selection screen with a 2-step flow:\n\n" +
55
- "**Step 1:** Choose payment method - shows connected wallets, connect wallet option, and pay with fiat option\n\n" +
56
- "**Step 2a:** If wallet selected - shows available origin tokens for bridging to the destination token (fetches real routes data from the Bridge API)\n\n" +
57
- "**Step 2b:** If fiat selected - shows onramp provider options (Coinbase, Stripe, Transak)\n\n" +
58
- "The component intelligently manages wallet context and provides proper error handling for each step.",
59
- },
60
- },
61
- layout: "centered",
62
- },
63
- tags: ["autodocs"],
64
- title: "Bridge/PaymentSelection",
18
+ connectOptions: undefined,
19
+ currency: "USD",
20
+ paymentMethods: ["crypto", "card"],
21
+ receiverAddress: "0x0000000000000000000000000000000000000000",
22
+ feePayer: undefined,
23
+ supportedTokens: undefined,
24
+ },
25
+ decorators: [
26
+ (Story) => (_jsx(ModalThemeWrapper, { children: _jsx(Story, {}) })),
27
+ ],
28
+ component: PaymentSelection,
29
+ title: "Bridge/screens/PaymentSelection",
65
30
  };
66
31
  export default meta;
67
- export const Light = {
32
+ export const OnlyCryptoMethodEnabled = {
68
33
  args: {
69
- theme: "light",
70
- },
71
- parameters: {
72
- backgrounds: { default: "light" },
73
- docs: {
74
- description: {
75
- story: "Light theme version showing the initial wallet selection step. Click on a connected wallet to see token selection, or click 'Pay with Fiat' to see provider selection.",
76
- },
77
- },
34
+ paymentMethods: ["crypto"],
78
35
  },
79
36
  };
80
- export const Dark = {
37
+ export const OnlyFiatMethodEnabled = {
81
38
  args: {
82
- theme: "dark",
83
- },
84
- parameters: {
85
- backgrounds: { default: "dark" },
86
- docs: {
87
- description: {
88
- story: "Dark theme version of the payment selection flow. The component starts with wallet selection and provides navigation through the 2-step process.",
89
- },
90
- },
91
- },
92
- };
93
- export const WithBackButton = {
94
- args: {
95
- onBack: () => { },
96
- theme: "dark",
97
- },
98
- parameters: {
99
- backgrounds: { default: "dark" },
100
- docs: {
101
- description: {
102
- story: "Version with a back button in the header. The back behavior changes based on the current step - Step 1 calls onBack, Steps 2a/2b return to Step 1.",
103
- },
104
- },
105
- },
106
- };
107
- export const WithBackButtonLight = {
108
- args: {
109
- onBack: () => { },
110
- theme: "light",
111
- },
112
- parameters: {
113
- backgrounds: { default: "light" },
114
- docs: {
115
- description: {
116
- story: "Light theme version with back button functionality. Demonstrates the navigation flow between steps.",
117
- },
118
- },
119
- },
120
- };
121
- export const DifferentDestinationToken = {
122
- args: {
123
- destinationToken: UNI,
124
- theme: "dark",
125
- },
126
- parameters: {
127
- backgrounds: { default: "dark" },
128
- docs: {
129
- description: {
130
- story: "Example with a different destination token (UNI). This will show different available origin tokens in Step 2a when a wallet is selected.",
131
- },
132
- },
133
- },
134
- };
135
- export const LargeAmount = {
136
- args: {
137
- destinationAmount: "1000",
138
- theme: "dark",
139
- },
140
- parameters: {
141
- backgrounds: { default: "dark" },
142
- docs: {
143
- description: {
144
- story: "Example with a larger destination amount (1000 USDC). This may affect which origin tokens are available based on user balances.",
145
- },
146
- },
39
+ paymentMethods: ["card"],
147
40
  },
148
41
  };
149
42
  //# sourceMappingURL=PaymentSelection.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentSelection.stories.js","sourceRoot":"","sources":["../../../../src/stories/Bridge/PaymentSelection.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,gBAAgB,GAEjB,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,MAAM,+C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KACf;IACD,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QACjC,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,qGAAqG;aACxG;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAU;IAC9C,IAAI,EAAE;QACJ,gBAAgB,EAAE,GAAG;QACrB,KAAK,EAAE,MAAM;KACd;IACD,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,0IAA0I;aAC7I;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,iBAAiB,EAAE,MAAM;QACzB,KAAK,EAAE,MAAM;KACd;IACD,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,iIAAiI;aACpI;SACF;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"PaymentSelection.stories.js","sourceRoot":"","sources":["../../../../src/stories/Bridge/PaymentSelection.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iEAAiE,CAAC;AACnG,OAAO,EAAE,MAAM,+CAA+C,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE;QACJ,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,GAAG,EAAE;YACX,KAAK,CAAC,MAAM,CAAC,CAAC;QAChB,CAAC;QACD,aAAa,EAAE,EAAE;QACjB,iBAAiB,EAAE,GAAG;QACtB,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,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