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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionContractInteractionLight = exports.TransactionContractInteraction = exports.TransactionERC20TransferLight = exports.TransactionERC20Transfer = exports.TransactionEthTransferLight = exports.TransactionEthTransfer = exports.BuyComplexLight = exports.BuyComplex = exports.BuyWithApprovalLight = exports.BuyWithApproval = exports.BuyWithLongText = exports.BuySimpleLightDirectPayment = exports.BuySimpleDirectPayment = exports.BuySimpleLight = exports.BuySimple = exports.OnrampWithSwapsLight = exports.OnrampWithSwaps = exports.OnrampSimpleLightDirectPayment = exports.OnrampSimpleDirectPayment = exports.OnrampSimpleLight = exports.OnrampSimple = void 0;
3
+ exports.TransactionContractInteraction = exports.TransactionERC20Transfer = exports.TransactionEthTransfer = exports.BuyComplex = exports.BuyWithApproval = exports.BuyWithLongText = exports.BuySimpleDirectPayment = exports.BuySimple = exports.OnrampWithSwaps = exports.OnrampSimpleDirectPayment = exports.OnrampSimple = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const PaymentDetails_js_1 = require("../../react/web/ui/Bridge/payment-details/PaymentDetails.js");
6
6
  const json_js_1 = require("../../utils/json.js");
@@ -40,391 +40,112 @@ const ethCryptoPaymentMethod = JSON.parse((0, json_js_1.stringify)({
40
40
  payerWallet: fixtures_js_1.STORY_MOCK_WALLET,
41
41
  type: "wallet",
42
42
  }));
43
- // Wrapper component to provide theme context
44
- const PaymentDetailsWithTheme = (props) => {
45
- const { theme, ...componentProps } = props;
46
- return ((0, jsx_runtime_1.jsx)(utils_js_1.ModalThemeWrapper, { theme: theme, children: (0, jsx_runtime_1.jsx)(PaymentDetails_js_1.PaymentDetails, { ...componentProps }) }));
47
- };
48
43
  const meta = {
49
44
  args: {
50
45
  onBack: () => { },
51
46
  onConfirm: () => { },
52
47
  onError: (error) => console.error("Error:", error),
53
48
  preparedQuote: fixtures_js_1.simpleOnrampQuote,
54
- theme: "dark",
55
- uiOptions: {
56
- destinationToken: fixtures_js_1.USDC,
49
+ modeInfo: {
57
50
  mode: "fund_wallet",
58
51
  },
59
- },
60
- argTypes: {
61
- onBack: { action: "back clicked" },
62
- onConfirm: { action: "route confirmed" },
63
- onError: { action: "error occurred" },
64
- theme: {
65
- control: "select",
66
- description: "Theme for the component",
67
- options: ["light", "dark"],
68
- },
69
- },
70
- component: PaymentDetailsWithTheme,
71
- parameters: {
72
- docs: {
73
- description: {
74
- component: "Route preview screen that displays prepared quote details, fees, estimated time, and transaction steps for user confirmation.",
75
- },
52
+ currency: "USD",
53
+ metadata: {
54
+ title: undefined,
55
+ description: undefined,
76
56
  },
77
- layout: "centered",
57
+ client: utils_js_1.storyClient,
58
+ confirmButtonLabel: undefined,
78
59
  },
79
- tags: ["autodocs"],
80
- title: "Bridge/PaymentDetails",
60
+ decorators: [
61
+ (Story) => ((0, jsx_runtime_1.jsx)(utils_js_1.ModalThemeWrapper, { children: (0, jsx_runtime_1.jsx)(Story, {}) })),
62
+ ],
63
+ component: PaymentDetails_js_1.PaymentDetails,
64
+ title: "Bridge/screens/PaymentDetails",
81
65
  };
82
66
  exports.default = meta;
83
67
  exports.OnrampSimple = {
84
68
  args: {
85
- client: utils_js_1.storyClient,
86
69
  paymentMethod: fiatPaymentMethod,
87
70
  preparedQuote: fixtures_js_1.simpleOnrampQuote,
88
- theme: "dark",
89
- },
90
- parameters: {
91
- backgrounds: { default: "dark" },
92
- docs: {
93
- description: {
94
- story: "Simple onramp quote with no extra steps - direct fiat to crypto.",
95
- },
96
- },
97
- },
98
- };
99
- exports.OnrampSimpleLight = {
100
- args: {
101
- client: utils_js_1.storyClient,
102
- paymentMethod: fiatPaymentMethod,
103
- preparedQuote: fixtures_js_1.simpleOnrampQuote,
104
- theme: "light",
105
- },
106
- parameters: {
107
- backgrounds: { default: "light" },
108
- docs: {
109
- description: {
110
- story: "Simple onramp quote with no extra steps (light theme).",
111
- },
112
- },
113
71
  },
114
72
  };
115
73
  exports.OnrampSimpleDirectPayment = {
116
74
  args: {
117
- client: utils_js_1.storyClient,
118
- paymentMethod: fiatPaymentMethod,
119
- preparedQuote: fixtures_js_1.simpleOnrampQuote,
120
- theme: "dark",
121
- uiOptions: fixtures_js_1.DIRECT_PAYMENT_UI_OPTIONS.credits,
122
- },
123
- parameters: {
124
- backgrounds: { default: "dark" },
125
- docs: {
126
- description: {
127
- story: "Simple onramp quote with no extra steps - direct fiat to crypto.",
128
- },
129
- },
130
- },
131
- };
132
- exports.OnrampSimpleLightDirectPayment = {
133
- args: {
134
- client: utils_js_1.storyClient,
135
75
  paymentMethod: fiatPaymentMethod,
136
76
  preparedQuote: fixtures_js_1.simpleOnrampQuote,
137
- theme: "light",
138
- uiOptions: fixtures_js_1.DIRECT_PAYMENT_UI_OPTIONS.concertTicket,
139
- },
140
- parameters: {
141
- backgrounds: { default: "light" },
142
- docs: {
143
- description: {
144
- story: "Simple onramp quote with no extra steps (light theme).",
145
- },
146
- },
77
+ ...fixtures_js_1.DIRECT_PAYMENT_UI_OPTIONS.credits,
147
78
  },
148
79
  };
149
80
  exports.OnrampWithSwaps = {
150
81
  args: {
151
- client: utils_js_1.storyClient,
152
- paymentMethod: fiatPaymentMethod,
153
- preparedQuote: fixtures_js_1.onrampWithSwapsQuote,
154
- theme: "dark",
155
- },
156
- parameters: {
157
- backgrounds: { default: "dark" },
158
- docs: {
159
- description: {
160
- story: "Onramp quote with 2 additional swap steps after the fiat purchase.",
161
- },
162
- },
163
- },
164
- };
165
- exports.OnrampWithSwapsLight = {
166
- args: {
167
- client: utils_js_1.storyClient,
168
82
  paymentMethod: fiatPaymentMethod,
169
83
  preparedQuote: fixtures_js_1.onrampWithSwapsQuote,
170
- theme: "light",
171
- },
172
- parameters: {
173
- backgrounds: { default: "light" },
174
- docs: {
175
- description: {
176
- story: "Onramp quote with 2 additional swap steps (light theme).",
177
- },
178
- },
179
84
  },
180
85
  };
181
86
  exports.BuySimple = {
182
87
  args: {
183
- client: utils_js_1.storyClient,
184
88
  paymentMethod: ethCryptoPaymentMethod,
185
89
  preparedQuote: fixtures_js_1.simpleBuyQuote,
186
- theme: "dark",
187
- },
188
- parameters: {
189
- backgrounds: { default: "dark" },
190
- docs: {
191
- description: {
192
- story: "Simple buy quote with a single transaction (no approval needed).",
193
- },
194
- },
195
- },
196
- };
197
- exports.BuySimpleLight = {
198
- args: {
199
- client: utils_js_1.storyClient,
200
- paymentMethod: ethCryptoPaymentMethod,
201
- preparedQuote: fixtures_js_1.simpleBuyQuote,
202
- theme: "light",
203
- },
204
- parameters: {
205
- backgrounds: { default: "light" },
206
- docs: {
207
- description: {
208
- story: "Simple buy quote with a single transaction (light theme).",
209
- },
210
- },
211
90
  },
212
91
  };
213
92
  exports.BuySimpleDirectPayment = {
214
93
  args: {
215
- client: utils_js_1.storyClient,
216
94
  paymentMethod: ethCryptoPaymentMethod,
217
95
  preparedQuote: fixtures_js_1.simpleBuyQuote,
218
- theme: "dark",
219
- uiOptions: fixtures_js_1.DIRECT_PAYMENT_UI_OPTIONS.digitalArt,
220
- },
221
- parameters: {
222
- backgrounds: { default: "dark" },
223
- docs: {
224
- description: {
225
- story: "Simple buy quote with a single transaction (no approval needed).",
226
- },
227
- },
228
- },
229
- };
230
- exports.BuySimpleLightDirectPayment = {
231
- args: {
232
- client: utils_js_1.storyClient,
233
- paymentMethod: ethCryptoPaymentMethod,
234
- preparedQuote: fixtures_js_1.simpleBuyQuote,
235
- theme: "light",
236
- uiOptions: fixtures_js_1.DIRECT_PAYMENT_UI_OPTIONS.subscription,
237
- },
238
- parameters: {
239
- backgrounds: { default: "light" },
240
- docs: {
241
- description: {
242
- story: "Simple buy quote with a single transaction (light theme).",
243
- },
244
- },
96
+ ...fixtures_js_1.DIRECT_PAYMENT_UI_OPTIONS.digitalArt,
245
97
  },
246
98
  };
247
99
  exports.BuyWithLongText = {
248
100
  args: {
249
- client: utils_js_1.storyClient,
250
101
  paymentMethod: ethCryptoPaymentMethod,
251
102
  preparedQuote: fixtures_js_1.longTextBuyQuote,
252
- theme: "dark",
253
- },
254
- parameters: {
255
- backgrounds: { default: "dark" },
256
- docs: {
257
- description: {
258
- story: "Simple buy quote with a single transaction (light theme).",
259
- },
260
- },
261
103
  },
262
104
  };
263
105
  exports.BuyWithApproval = {
264
106
  args: {
265
- client: utils_js_1.storyClient,
266
107
  paymentMethod: cryptoPaymentMethod,
267
108
  preparedQuote: fixtures_js_1.buyWithApprovalQuote,
268
- theme: "dark",
269
- },
270
- parameters: {
271
- backgrounds: { default: "dark" },
272
- docs: {
273
- description: {
274
- story: "Buy quote requiring both approval and buy transactions in a single step.",
275
- },
276
- },
277
- },
278
- };
279
- exports.BuyWithApprovalLight = {
280
- args: {
281
- client: utils_js_1.storyClient,
282
- paymentMethod: cryptoPaymentMethod,
283
- preparedQuote: fixtures_js_1.buyWithApprovalQuote,
284
- theme: "light",
285
- },
286
- parameters: {
287
- backgrounds: { default: "light" },
288
- docs: {
289
- description: {
290
- story: "Buy quote with approval and buy transactions (light theme).",
291
- },
292
- },
293
109
  },
294
110
  };
295
111
  exports.BuyComplex = {
296
112
  args: {
297
- client: utils_js_1.storyClient,
298
- paymentMethod: ethCryptoPaymentMethod,
299
- preparedQuote: fixtures_js_1.complexBuyQuote,
300
- theme: "dark",
301
- },
302
- parameters: {
303
- backgrounds: { default: "dark" },
304
- docs: {
305
- description: {
306
- story: "Complex buy quote with 3 steps, each requiring approval and execution transactions across multiple chains.",
307
- },
308
- },
309
- },
310
- };
311
- exports.BuyComplexLight = {
312
- args: {
313
- client: utils_js_1.storyClient,
314
113
  paymentMethod: ethCryptoPaymentMethod,
315
114
  preparedQuote: fixtures_js_1.complexBuyQuote,
316
- theme: "light",
317
- },
318
- parameters: {
319
- backgrounds: { default: "light" },
320
- docs: {
321
- description: {
322
- story: "Complex multi-step buy quote spanning multiple chains (light theme).",
323
- },
324
- },
325
115
  },
326
116
  };
327
117
  // ========== TRANSACTION MODE STORIES ========== //
328
118
  exports.TransactionEthTransfer = {
329
119
  args: {
330
- client: utils_js_1.storyClient,
331
120
  paymentMethod: ethCryptoPaymentMethod,
332
121
  preparedQuote: fixtures_js_1.simpleBuyQuote,
333
- theme: "dark",
334
- uiOptions: fixtures_js_1.TRANSACTION_UI_OPTIONS.ethTransfer,
335
- },
336
- parameters: {
337
- backgrounds: { default: "dark" },
338
- docs: {
339
- description: {
340
- story: "Transaction mode showing ETH transfer payment details with function name and contract information displayed in the PaymentDetails screen.",
341
- },
342
- },
343
- },
344
- };
345
- exports.TransactionEthTransferLight = {
346
- args: {
347
- client: utils_js_1.storyClient,
348
- paymentMethod: ethCryptoPaymentMethod,
349
- preparedQuote: fixtures_js_1.simpleBuyQuote,
350
- theme: "light",
351
- uiOptions: fixtures_js_1.TRANSACTION_UI_OPTIONS.ethTransfer,
352
- },
353
- parameters: {
354
- backgrounds: { default: "light" },
355
- docs: {
356
- description: {
357
- story: "Light theme version of transaction mode for ETH transfer with detailed payment overview.",
358
- },
122
+ modeInfo: {
123
+ mode: "transaction",
124
+ transaction: fixtures_js_1.TRANSACTION_UI_OPTIONS.ethTransfer.transaction,
359
125
  },
126
+ ...fixtures_js_1.TRANSACTION_UI_OPTIONS.ethTransfer,
360
127
  },
361
128
  };
362
129
  exports.TransactionERC20Transfer = {
363
130
  args: {
364
- client: utils_js_1.storyClient,
365
- paymentMethod: cryptoPaymentMethod,
366
- preparedQuote: fixtures_js_1.simpleBuyQuote,
367
- theme: "dark",
368
- uiOptions: fixtures_js_1.TRANSACTION_UI_OPTIONS.erc20Transfer,
369
- },
370
- parameters: {
371
- backgrounds: { default: "dark" },
372
- docs: {
373
- description: {
374
- story: "Transaction mode for ERC20 token transfer showing token details and transfer function in payment preview.",
375
- },
376
- },
377
- },
378
- };
379
- exports.TransactionERC20TransferLight = {
380
- args: {
381
- client: utils_js_1.storyClient,
382
131
  paymentMethod: cryptoPaymentMethod,
383
132
  preparedQuote: fixtures_js_1.simpleBuyQuote,
384
- theme: "light",
385
- uiOptions: fixtures_js_1.TRANSACTION_UI_OPTIONS.erc20Transfer,
386
- },
387
- parameters: {
388
- backgrounds: { default: "light" },
389
- docs: {
390
- description: {
391
- story: "Light theme version of ERC20 token transfer transaction mode with payment details.",
392
- },
133
+ modeInfo: {
134
+ mode: "transaction",
135
+ transaction: fixtures_js_1.TRANSACTION_UI_OPTIONS.erc20Transfer.transaction,
393
136
  },
137
+ ...fixtures_js_1.TRANSACTION_UI_OPTIONS.erc20Transfer,
394
138
  },
395
139
  };
396
140
  exports.TransactionContractInteraction = {
397
141
  args: {
398
- client: utils_js_1.storyClient,
399
- paymentMethod: ethCryptoPaymentMethod,
400
- preparedQuote: fixtures_js_1.simpleBuyQuote,
401
- theme: "dark",
402
- uiOptions: fixtures_js_1.TRANSACTION_UI_OPTIONS.contractInteraction,
403
- },
404
- parameters: {
405
- backgrounds: { default: "dark" },
406
- docs: {
407
- description: {
408
- story: "Transaction mode for complex contract interaction (claimTo function) showing detailed contract information and function details in payment preview.",
409
- },
410
- },
411
- },
412
- };
413
- exports.TransactionContractInteractionLight = {
414
- args: {
415
- client: utils_js_1.storyClient,
416
142
  paymentMethod: ethCryptoPaymentMethod,
417
143
  preparedQuote: fixtures_js_1.simpleBuyQuote,
418
- theme: "light",
419
- uiOptions: fixtures_js_1.TRANSACTION_UI_OPTIONS.contractInteraction,
420
- },
421
- parameters: {
422
- backgrounds: { default: "light" },
423
- docs: {
424
- description: {
425
- story: "Light theme version of contract interaction transaction mode with comprehensive payment details.",
426
- },
144
+ modeInfo: {
145
+ mode: "transaction",
146
+ transaction: fixtures_js_1.TRANSACTION_UI_OPTIONS.contractInteraction.transaction,
427
147
  },
148
+ ...fixtures_js_1.TRANSACTION_UI_OPTIONS.contractInteraction,
428
149
  },
429
150
  };
430
151
  //# 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,mGAGqE;AACrE,iDAAgD;AAChD,0CAA6D;AAC7D,+CAWuB;AAEvB,MAAM,iBAAiB,GAAkB;IACvC,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,+BAAiB;IAC9B,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,mBAAmB,GAAkB,IAAI,CAAC,KAAK,CACnD,IAAA,mBAAS,EAAC;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;KACf;IACD,WAAW,EAAE,+BAAiB;IAC9B,IAAI,EAAE,QAAQ;CACf,CAAC,CACH,CAAC;AAEF,MAAM,sBAAsB,GAAkB,IAAI,CAAC,KAAK,CACtD,IAAA,mBAAS,EAAC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;IACD,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QACjC,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,oFAAoF;aACvF;SACF;KACF;CACF,CAAC;AAEW,QAAA,8BAA8B,GAAU;IACnD,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAW;QACnB,aAAa,EAAE,sBAAsB;QACrC,aAAa,EAAE,4BAAc;QAC7B,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,oCAAsB,CAAC,mBAAmB;KACtD;IACD,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,qJAAqJ;aACxJ;SACF;KACF;CACF,CAAC;AAEW,QAAA,mCAAmC,GAAU;IACxD,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAW;QACnB,aAAa,EAAE,sBAAsB;QACrC,aAAa,EAAE,4BAAc;QAC7B,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,oCAAsB,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,mGAA6F;AAE7F,iDAAgD;AAChD,0CAA6D;AAC7D,+CAUuB;AAEvB,MAAM,iBAAiB,GAAkB;IACvC,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,+BAAiB;IAC9B,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,mBAAmB,GAAkB,IAAI,CAAC,KAAK,CACnD,IAAA,mBAAS,EAAC;IACR,OAAO,EAAE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,WAAW;SAC5D;QACD,GAAG,oCAAsB,CAAC,WAAW;KACtC;CACF,CAAC;AAEW,QAAA,wBAAwB,GAAU;IAC7C,IAAI,EAAE;QACJ,aAAa,EAAE,mBAAmB;QAClC,aAAa,EAAE,4BAAc;QAC7B,QAAQ,EAAE;YACR,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,oCAAsB,CAAC,aAAa,CAAC,WAAW;SAC9D;QACD,GAAG,oCAAsB,CAAC,aAAa;KACxC;CACF,CAAC;AAEW,QAAA,8BAA8B,GAAU;IACnD,IAAI,EAAE;QACJ,aAAa,EAAE,sBAAsB;QACrC,aAAa,EAAE,4BAAc;QAC7B,QAAQ,EAAE;YACR,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,oCAAsB,CAAC,mBAAmB,CAAC,WAAW;SACpE;QACD,GAAG,oCAAsB,CAAC,mBAAmB;KAC9C;CACF,CAAC"}
@@ -1,152 +1,45 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LargeAmount = exports.DifferentDestinationToken = exports.WithBackButtonLight = exports.WithBackButton = exports.Dark = exports.Light = void 0;
3
+ exports.OnlyFiatMethodEnabled = exports.OnlyCryptoMethodEnabled = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const PaymentSelection_js_1 = require("../../react/web/ui/Bridge/payment-selection/PaymentSelection.js");
6
6
  const en_js_1 = require("../../react/web/ui/ConnectWallet/locale/en.js");
7
7
  const utils_js_1 = require("../utils.js");
8
8
  const fixtures_js_1 = require("./fixtures.js");
9
- // Wrapper component to provide theme context
10
- const PaymentSelectionWithTheme = (props) => {
11
- const { theme, ...componentProps } = props;
12
- return ((0, jsx_runtime_1.jsx)(utils_js_1.ModalThemeWrapper, { theme: theme, children: (0, jsx_runtime_1.jsx)(PaymentSelection_js_1.PaymentSelection, { ...componentProps }) }));
13
- };
14
9
  const meta = {
15
10
  args: {
16
11
  client: utils_js_1.storyClient,
12
+ onBack: () => {
13
+ alert("Back");
14
+ },
17
15
  connectLocale: en_js_1.default,
18
16
  destinationAmount: "1",
19
17
  destinationToken: fixtures_js_1.USDC,
20
18
  onError: (error) => console.error("Error:", error),
21
- onPaymentMethodSelected: (_paymentMethod) => { },
22
- theme: "dark",
19
+ onPaymentMethodSelected: () => { },
23
20
  country: "US",
24
- },
25
- argTypes: {
26
- connectLocale: {
27
- description: "Locale for connecting wallets",
28
- },
29
- destinationAmount: {
30
- description: "Amount of destination token to bridge",
31
- },
32
- destinationToken: {
33
- description: "The target token to bridge to",
34
- },
35
- onBack: {
36
- action: "back clicked",
37
- description: "Called when user wants to go back (only shown in Step 1)",
38
- },
39
- onError: {
40
- action: "error occurred",
41
- description: "Called when an error occurs during the flow",
42
- },
43
- onPaymentMethodSelected: {
44
- action: "payment method selected",
45
- description: "Called when user selects a wallet token or fiat provider",
46
- },
47
- theme: {
48
- control: "select",
49
- description: "Theme for the component",
50
- options: ["light", "dark"],
51
- },
52
- },
53
- component: PaymentSelectionWithTheme,
54
- parameters: {
55
- docs: {
56
- description: {
57
- component: "Payment method selection screen with a 2-step flow:\n\n" +
58
- "**Step 1:** Choose payment method - shows connected wallets, connect wallet option, and pay with fiat option\n\n" +
59
- "**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" +
60
- "**Step 2b:** If fiat selected - shows onramp provider options (Coinbase, Stripe, Transak)\n\n" +
61
- "The component intelligently manages wallet context and provides proper error handling for each step.",
62
- },
63
- },
64
- layout: "centered",
65
- },
66
- tags: ["autodocs"],
67
- title: "Bridge/PaymentSelection",
21
+ connectOptions: undefined,
22
+ currency: "USD",
23
+ paymentMethods: ["crypto", "card"],
24
+ receiverAddress: "0x0000000000000000000000000000000000000000",
25
+ feePayer: undefined,
26
+ supportedTokens: undefined,
27
+ },
28
+ decorators: [
29
+ (Story) => ((0, jsx_runtime_1.jsx)(utils_js_1.ModalThemeWrapper, { children: (0, jsx_runtime_1.jsx)(Story, {}) })),
30
+ ],
31
+ component: PaymentSelection_js_1.PaymentSelection,
32
+ title: "Bridge/screens/PaymentSelection",
68
33
  };
69
34
  exports.default = meta;
70
- exports.Light = {
35
+ exports.OnlyCryptoMethodEnabled = {
71
36
  args: {
72
- theme: "light",
73
- },
74
- parameters: {
75
- backgrounds: { default: "light" },
76
- docs: {
77
- description: {
78
- 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.",
79
- },
80
- },
37
+ paymentMethods: ["crypto"],
81
38
  },
82
39
  };
83
- exports.Dark = {
40
+ exports.OnlyFiatMethodEnabled = {
84
41
  args: {
85
- theme: "dark",
86
- },
87
- parameters: {
88
- backgrounds: { default: "dark" },
89
- docs: {
90
- description: {
91
- story: "Dark theme version of the payment selection flow. The component starts with wallet selection and provides navigation through the 2-step process.",
92
- },
93
- },
94
- },
95
- };
96
- exports.WithBackButton = {
97
- args: {
98
- onBack: () => { },
99
- theme: "dark",
100
- },
101
- parameters: {
102
- backgrounds: { default: "dark" },
103
- docs: {
104
- description: {
105
- 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.",
106
- },
107
- },
108
- },
109
- };
110
- exports.WithBackButtonLight = {
111
- args: {
112
- onBack: () => { },
113
- theme: "light",
114
- },
115
- parameters: {
116
- backgrounds: { default: "light" },
117
- docs: {
118
- description: {
119
- story: "Light theme version with back button functionality. Demonstrates the navigation flow between steps.",
120
- },
121
- },
122
- },
123
- };
124
- exports.DifferentDestinationToken = {
125
- args: {
126
- destinationToken: fixtures_js_1.UNI,
127
- theme: "dark",
128
- },
129
- parameters: {
130
- backgrounds: { default: "dark" },
131
- docs: {
132
- description: {
133
- story: "Example with a different destination token (UNI). This will show different available origin tokens in Step 2a when a wallet is selected.",
134
- },
135
- },
136
- },
137
- };
138
- exports.LargeAmount = {
139
- args: {
140
- destinationAmount: "1000",
141
- theme: "dark",
142
- },
143
- parameters: {
144
- backgrounds: { default: "dark" },
145
- docs: {
146
- description: {
147
- story: "Example with a larger destination amount (1000 USDC). This may affect which origin tokens are available based on user balances.",
148
- },
149
- },
42
+ paymentMethods: ["card"],
150
43
  },
151
44
  };
152
45
  //# 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,yGAGyE;AACzE,yEAA+D;AAC/D,0CAA6D;AAC7D,+CAA0C;AAO1C,6CAA6C;AAC7C,MAAM,yBAAyB,GAAG,CAAC,KAAqC,EAAE,EAAE;IAC1E,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,CACL,uBAAC,4BAAiB,IAAC,KAAK,EAAE,KAAK,YAC7B,uBAAC,sCAAgB,OAAK,cAAc,GAAI,GACtB,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG;IACX,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAW;QACnB,aAAa,EAAE,eAAE;QACjB,iBAAiB,EAAE,GAAG;QACtB,gBAAgB,EAAE,kBAAI;QACtB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;QAClD,uBAAuB,EAAE,CAAC,cAAc,EAAE,EAAE,GAAE,CAAC;QAC/C,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,WAAW,EAAE,+BAA+B;SAC7C;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,uCAAuC;SACrD;QACD,gBAAgB,EAAE;YAChB,WAAW,EAAE,+BAA+B;SAC7C;QACD,MAAM,EAAE;YACN,MAAM,EAAE,cAAc;YACtB,WAAW,EAAE,0DAA0D;SACxE;QACD,OAAO,EAAE;YACP,MAAM,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AAK,EACH,oJAAoJ;aACvJ;SACF;KACF;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAU;IACxC,IAAI,EAAE;QACJ,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,KAAK,EAAE,OAAO;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;AAEW,QAAA,yBAAyB,GAAU;IAC9C,IAAI,EAAE;QACJ,gBAAgB,EAAE,iBAAG;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;AAEW,QAAA,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,yGAAmG;AACnG,yEAA+D;AAC/D,0CAA6D;AAC7D,+CAAqC;AAErC,MAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAW;QACnB,MAAM,EAAE,GAAG,EAAE;YACX,KAAK,CAAC,MAAM,CAAC,CAAC;QAChB,CAAC;QACD,aAAa,EAAE,eAAE;QACjB,iBAAiB,EAAE,GAAG;QACtB,gBAAgB,EAAE,kBAAI;QACtB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;QAClD,uBAAuB,EAAE,GAAG,EAAE,GAAE,CAAC;QACjC,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,SAAS;QACzB,QAAQ,EAAE,KAAK;QACf,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;QAClC,eAAe,EAAE,4CAA4C;QAC7D,QAAQ,EAAE,SAAS;QACnB,eAAe,EAAE,SAAS;KAC3B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,uBAAC,4BAAiB,cAChB,uBAAC,KAAK,KAAG,GACS,CACrB;KACF;IACD,SAAS,EAAE,sCAAgB;IAC3B,KAAK,EAAE,iCAAiC;CACzC,CAAC;AAEF,kBAAe,IAAI,CAAC;AAGP,QAAA,uBAAuB,GAAU;IAC5C,IAAI,EAAE;QACJ,cAAc,EAAE,CAAC,QAAQ,CAAC;KAC3B;CACF,CAAC;AAEW,QAAA,qBAAqB,GAAU;IAC1C,IAAI,EAAE;QACJ,cAAc,EAAE,CAAC,MAAM,CAAC;KACzB;CACF,CAAC"}