@mintmoney/react 0.2.0-alpha.1 → 0.2.0-alpha.3

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 (316) hide show
  1. package/dist/css/styles.css +12 -1
  2. package/dist/docs/customisation.md +8 -0
  3. package/dist/esm/api/errors.js +89 -0
  4. package/dist/esm/api/errors.js.map +1 -0
  5. package/dist/esm/api/generated.js +825 -65
  6. package/dist/esm/api/generated.js.map +1 -1
  7. package/dist/esm/api/payments.js +26 -2
  8. package/dist/esm/api/payments.js.map +1 -1
  9. package/dist/esm/api/tokens.js +34 -0
  10. package/dist/esm/api/tokens.js.map +1 -0
  11. package/dist/esm/api/types.js.map +1 -1
  12. package/dist/esm/checkout/claimable-funds.js +20 -10
  13. package/dist/esm/checkout/claimable-funds.js.map +1 -1
  14. package/dist/esm/checkout/creation-error-modal.js +2 -2
  15. package/dist/esm/checkout/creation-error-modal.js.map +1 -1
  16. package/dist/esm/checkout/index.js +48 -8
  17. package/dist/esm/checkout/index.js.map +1 -1
  18. package/dist/esm/checkout/modal.js +78 -78
  19. package/dist/esm/checkout/modal.js.map +1 -1
  20. package/dist/esm/checkout/payment-status.js +68 -28
  21. package/dist/esm/checkout/payment-status.js.map +1 -1
  22. package/dist/esm/checkout/provider-status.js +9 -0
  23. package/dist/esm/checkout/provider-status.js.map +1 -0
  24. package/dist/esm/checkout/providers/checkout-wallet.js +315 -0
  25. package/dist/esm/checkout/providers/checkout-wallet.js.map +1 -0
  26. package/dist/esm/checkout/providers/wagmi-config.js +55 -49
  27. package/dist/esm/checkout/providers/wagmi-config.js.map +1 -1
  28. package/dist/esm/checkout/refund-notice.js +16 -0
  29. package/dist/esm/checkout/refund-notice.js.map +1 -0
  30. package/dist/esm/checkout/resume-state.js +151 -13
  31. package/dist/esm/checkout/resume-state.js.map +1 -1
  32. package/dist/esm/checkout/surplus-refund.js +12 -0
  33. package/dist/esm/checkout/surplus-refund.js.map +1 -1
  34. package/dist/esm/checkout/views/amount-header.js +1 -1
  35. package/dist/esm/checkout/views/amount-header.js.map +1 -1
  36. package/dist/esm/checkout/views/claimable-funds.js +22 -13
  37. package/dist/esm/checkout/views/claimable-funds.js.map +1 -1
  38. package/dist/esm/checkout/views/crypto-intent/direct-details.js +226 -887
  39. package/dist/esm/checkout/views/crypto-intent/direct-details.js.map +1 -1
  40. package/dist/esm/checkout/views/crypto-intent/manual-instruction-card.js +235 -0
  41. package/dist/esm/checkout/views/crypto-intent/manual-instruction-card.js.map +1 -0
  42. package/dist/esm/checkout/views/crypto-intent/manual-payment-summary.js +2 -26
  43. package/dist/esm/checkout/views/crypto-intent/manual-payment-summary.js.map +1 -1
  44. package/dist/esm/checkout/views/crypto-intent/manual-refresh.js +19 -0
  45. package/dist/esm/checkout/views/crypto-intent/manual-refresh.js.map +1 -0
  46. package/dist/esm/checkout/views/crypto-intent/manual-refund-preference.js +151 -23
  47. package/dist/esm/checkout/views/crypto-intent/manual-refund-preference.js.map +1 -1
  48. package/dist/esm/checkout/views/crypto-intent/manual-route-picker.js +295 -0
  49. package/dist/esm/checkout/views/crypto-intent/manual-route-picker.js.map +1 -0
  50. package/dist/esm/checkout/views/crypto-intent/manual-sources.js +155 -0
  51. package/dist/esm/checkout/views/crypto-intent/manual-sources.js.map +1 -0
  52. package/dist/esm/checkout/views/crypto-intent/manual-transfer-instructions.js +84 -0
  53. package/dist/esm/checkout/views/crypto-intent/manual-transfer-instructions.js.map +1 -0
  54. package/dist/esm/checkout/views/crypto-intent/methods.js +22 -123
  55. package/dist/esm/checkout/views/crypto-intent/methods.js.map +1 -1
  56. package/dist/esm/checkout/views/crypto-intent/payment-route-error.js +10 -0
  57. package/dist/esm/checkout/views/crypto-intent/payment-route-error.js.map +1 -0
  58. package/dist/esm/checkout/views/crypto-intent/processing.js +167 -25
  59. package/dist/esm/checkout/views/crypto-intent/processing.js.map +1 -1
  60. package/dist/esm/checkout/views/crypto-intent/success.js +74 -46
  61. package/dist/esm/checkout/views/crypto-intent/success.js.map +1 -1
  62. package/dist/esm/checkout/views/crypto-intent/test-payment.js +11 -1
  63. package/dist/esm/checkout/views/crypto-intent/test-payment.js.map +1 -1
  64. package/dist/esm/checkout/views/crypto-intent/wallet-payment-confirmation-amount.js +14 -24
  65. package/dist/esm/checkout/views/crypto-intent/wallet-payment-confirmation-amount.js.map +1 -1
  66. package/dist/esm/checkout/views/crypto-intent/wallet-payment-discovery.js +61 -0
  67. package/dist/esm/checkout/views/crypto-intent/wallet-payment-discovery.js.map +1 -0
  68. package/dist/esm/checkout/views/crypto-intent/wallet-payment-options.js +136 -1169
  69. package/dist/esm/checkout/views/crypto-intent/wallet-payment-options.js.map +1 -1
  70. package/dist/esm/checkout/views/crypto-intent/wallet-payment-options.styles.js +506 -0
  71. package/dist/esm/checkout/views/crypto-intent/wallet-payment-options.styles.js.map +1 -0
  72. package/dist/esm/checkout/views/crypto-intent/wallet-select.js +7 -164
  73. package/dist/esm/checkout/views/crypto-intent/wallet-select.js.map +1 -1
  74. package/dist/esm/checkout/views/failed.js +62 -26
  75. package/dist/esm/checkout/views/failed.js.map +1 -1
  76. package/dist/esm/checkout/views/funding-timeline.js +255 -0
  77. package/dist/esm/checkout/views/funding-timeline.js.map +1 -0
  78. package/dist/esm/checkout/views/initial.js +25 -41
  79. package/dist/esm/checkout/views/initial.js.map +1 -1
  80. package/dist/esm/checkout/views/method-select.js +6 -4
  81. package/dist/esm/checkout/views/method-select.js.map +1 -1
  82. package/dist/esm/checkout/views/payment-follower.js +105 -0
  83. package/dist/esm/checkout/views/payment-follower.js.map +1 -0
  84. package/dist/esm/checkout/views/restart.js +11 -2
  85. package/dist/esm/checkout/views/restart.js.map +1 -1
  86. package/dist/esm/components/buttons/index.js +3 -2
  87. package/dist/esm/components/buttons/index.js.map +1 -1
  88. package/dist/esm/components/icons/search.js +5 -0
  89. package/dist/esm/components/icons/search.js.map +1 -0
  90. package/dist/esm/components/loading/index.js +2 -2
  91. package/dist/esm/components/loading/index.js.map +1 -1
  92. package/dist/esm/components/modals/modal-with-views.js +6 -12
  93. package/dist/esm/components/modals/modal-with-views.js.map +1 -1
  94. package/dist/esm/components/modals/modal.js +3 -3
  95. package/dist/esm/components/modals/modal.js.map +1 -1
  96. package/dist/esm/components/modals/transition-view.js +16 -0
  97. package/dist/esm/components/modals/transition-view.js.map +1 -0
  98. package/dist/esm/components/modals/use-modal-with-views.js +17 -19
  99. package/dist/esm/components/modals/use-modal-with-views.js.map +1 -1
  100. package/dist/esm/components/wallet-selector/wallets/wagmi/index.js +21 -2
  101. package/dist/esm/components/wallet-selector/wallets/wagmi/index.js.map +1 -1
  102. package/dist/esm/config.js.map +1 -1
  103. package/dist/esm/integrations/bitcoin-metamask.js +87 -0
  104. package/dist/esm/integrations/bitcoin-metamask.js.map +1 -0
  105. package/dist/esm/integrations/bitcoin-network.js +59 -0
  106. package/dist/esm/integrations/bitcoin-network.js.map +1 -0
  107. package/dist/esm/integrations/bitcoin-psbt.js +4 -0
  108. package/dist/esm/integrations/bitcoin-psbt.js.map +1 -0
  109. package/dist/esm/integrations/bitcoin-source.js +12 -0
  110. package/dist/esm/integrations/bitcoin-source.js.map +1 -0
  111. package/dist/esm/integrations/bitcoin-wallet.js +225 -0
  112. package/dist/esm/integrations/bitcoin-wallet.js.map +1 -0
  113. package/dist/esm/integrations/evm-chain.js +18 -0
  114. package/dist/esm/integrations/evm-chain.js.map +1 -1
  115. package/dist/esm/integrations/guarded-wallet-client.js +19 -0
  116. package/dist/esm/integrations/guarded-wallet-client.js.map +1 -0
  117. package/dist/esm/integrations/lifi.js +85 -38
  118. package/dist/esm/integrations/lifi.js.map +1 -1
  119. package/dist/esm/refund/index.js +217 -226
  120. package/dist/esm/refund/index.js.map +1 -1
  121. package/dist/esm/state/checkout/bitcoin-payment.js +253 -0
  122. package/dist/esm/state/checkout/bitcoin-payment.js.map +1 -0
  123. package/dist/esm/state/checkout/checkout-state.js +54 -0
  124. package/dist/esm/state/checkout/checkout-state.js.map +1 -0
  125. package/dist/esm/state/checkout/funding.js +5 -0
  126. package/dist/esm/state/checkout/funding.js.map +1 -0
  127. package/dist/esm/state/checkout/issuance-conflicts.js +29 -0
  128. package/dist/esm/state/checkout/issuance-conflicts.js.map +1 -0
  129. package/dist/esm/state/checkout/manual-route.js +10 -0
  130. package/dist/esm/state/checkout/manual-route.js.map +1 -0
  131. package/dist/esm/state/checkout/payment-attempt.js +50 -20
  132. package/dist/esm/state/checkout/payment-attempt.js.map +1 -1
  133. package/dist/esm/state/checkout/payment-lifecycle.js +9 -15
  134. package/dist/esm/state/checkout/payment-lifecycle.js.map +1 -1
  135. package/dist/esm/state/checkout/payment-observer.js +147 -0
  136. package/dist/esm/state/checkout/payment-observer.js.map +1 -0
  137. package/dist/esm/state/checkout/payment-phase.js +131 -0
  138. package/dist/esm/state/checkout/payment-phase.js.map +1 -0
  139. package/dist/esm/state/checkout/quote-countdown.js +26 -0
  140. package/dist/esm/state/checkout/quote-countdown.js.map +1 -0
  141. package/dist/esm/state/checkout/quote-lifecycle.js +378 -0
  142. package/dist/esm/state/checkout/quote-lifecycle.js.map +1 -0
  143. package/dist/esm/state/checkout/route-estimate.js +77 -0
  144. package/dist/esm/state/checkout/route-estimate.js.map +1 -0
  145. package/dist/esm/state/checkout/store.js +350 -708
  146. package/dist/esm/state/checkout/store.js.map +1 -1
  147. package/dist/esm/state/checkout/wallet-payment-options.js +0 -32
  148. package/dist/esm/state/checkout/wallet-payment-options.js.map +1 -1
  149. package/dist/esm/state/checkout/wallet-payment.js +249 -0
  150. package/dist/esm/state/checkout/wallet-payment.js.map +1 -0
  151. package/dist/esm/utils/string.js +2 -0
  152. package/dist/esm/utils/string.js.map +1 -1
  153. package/dist/esm/utils/token-amount.js +88 -0
  154. package/dist/esm/utils/token-amount.js.map +1 -0
  155. package/dist/esm/utils/wallet-errors.js +21 -4
  156. package/dist/esm/utils/wallet-errors.js.map +1 -1
  157. package/dist/types/api/errors.d.ts +37 -0
  158. package/dist/types/api/errors.d.ts.map +1 -0
  159. package/dist/types/api/generated.d.ts +4570 -695
  160. package/dist/types/api/generated.d.ts.map +1 -1
  161. package/dist/types/api/payments.d.ts +28 -1
  162. package/dist/types/api/payments.d.ts.map +1 -1
  163. package/dist/types/api/tokens.d.ts +6 -0
  164. package/dist/types/api/tokens.d.ts.map +1 -0
  165. package/dist/types/api/types.d.ts +28 -2
  166. package/dist/types/api/types.d.ts.map +1 -1
  167. package/dist/types/checkout/claimable-funds.d.ts +15 -2
  168. package/dist/types/checkout/claimable-funds.d.ts.map +1 -1
  169. package/dist/types/checkout/creation-error-modal.d.ts +2 -1
  170. package/dist/types/checkout/creation-error-modal.d.ts.map +1 -1
  171. package/dist/types/checkout/index.d.ts +21 -1
  172. package/dist/types/checkout/index.d.ts.map +1 -1
  173. package/dist/types/checkout/modal.d.ts +4 -1
  174. package/dist/types/checkout/modal.d.ts.map +1 -1
  175. package/dist/types/checkout/payment-status.d.ts +10 -2
  176. package/dist/types/checkout/payment-status.d.ts.map +1 -1
  177. package/dist/types/checkout/provider-status.d.ts +11 -0
  178. package/dist/types/checkout/provider-status.d.ts.map +1 -0
  179. package/dist/types/checkout/providers/checkout-wallet.d.ts +23 -0
  180. package/dist/types/checkout/providers/checkout-wallet.d.ts.map +1 -0
  181. package/dist/types/checkout/providers/wagmi-config.d.ts +8 -2
  182. package/dist/types/checkout/providers/wagmi-config.d.ts.map +1 -1
  183. package/dist/types/checkout/refund-notice.d.ts +7 -0
  184. package/dist/types/checkout/refund-notice.d.ts.map +1 -0
  185. package/dist/types/checkout/resume-state.d.ts +41 -4
  186. package/dist/types/checkout/resume-state.d.ts.map +1 -1
  187. package/dist/types/checkout/surplus-refund.d.ts +8 -0
  188. package/dist/types/checkout/surplus-refund.d.ts.map +1 -1
  189. package/dist/types/checkout/views/amount-header.d.ts.map +1 -1
  190. package/dist/types/checkout/views/claimable-funds.d.ts.map +1 -1
  191. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts +3 -13
  192. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts.map +1 -1
  193. package/dist/types/checkout/views/crypto-intent/manual-instruction-card.d.ts +10 -0
  194. package/dist/types/checkout/views/crypto-intent/manual-instruction-card.d.ts.map +1 -0
  195. package/dist/types/checkout/views/crypto-intent/manual-payment-summary.d.ts +4 -11
  196. package/dist/types/checkout/views/crypto-intent/manual-payment-summary.d.ts.map +1 -1
  197. package/dist/types/checkout/views/crypto-intent/manual-refresh.d.ts +4 -0
  198. package/dist/types/checkout/views/crypto-intent/manual-refresh.d.ts.map +1 -0
  199. package/dist/types/checkout/views/crypto-intent/manual-refund-preference.d.ts +14 -10
  200. package/dist/types/checkout/views/crypto-intent/manual-refund-preference.d.ts.map +1 -1
  201. package/dist/types/checkout/views/crypto-intent/manual-route-picker.d.ts +18 -0
  202. package/dist/types/checkout/views/crypto-intent/manual-route-picker.d.ts.map +1 -0
  203. package/dist/types/checkout/views/crypto-intent/manual-sources.d.ts +33 -0
  204. package/dist/types/checkout/views/crypto-intent/manual-sources.d.ts.map +1 -0
  205. package/dist/types/checkout/views/crypto-intent/manual-transfer-instructions.d.ts +18 -0
  206. package/dist/types/checkout/views/crypto-intent/manual-transfer-instructions.d.ts.map +1 -0
  207. package/dist/types/checkout/views/crypto-intent/methods.d.ts.map +1 -1
  208. package/dist/types/checkout/views/crypto-intent/payment-route-error.d.ts +2 -0
  209. package/dist/types/checkout/views/crypto-intent/payment-route-error.d.ts.map +1 -0
  210. package/dist/types/checkout/views/crypto-intent/processing.d.ts.map +1 -1
  211. package/dist/types/checkout/views/crypto-intent/success.d.ts +2 -1
  212. package/dist/types/checkout/views/crypto-intent/success.d.ts.map +1 -1
  213. package/dist/types/checkout/views/crypto-intent/test-payment.d.ts.map +1 -1
  214. package/dist/types/checkout/views/crypto-intent/wallet-payment-confirmation-amount.d.ts +8 -8
  215. package/dist/types/checkout/views/crypto-intent/wallet-payment-confirmation-amount.d.ts.map +1 -1
  216. package/dist/types/checkout/views/crypto-intent/wallet-payment-discovery.d.ts +17 -0
  217. package/dist/types/checkout/views/crypto-intent/wallet-payment-discovery.d.ts.map +1 -0
  218. package/dist/types/checkout/views/crypto-intent/wallet-payment-options.d.ts +2 -1
  219. package/dist/types/checkout/views/crypto-intent/wallet-payment-options.d.ts.map +1 -1
  220. package/dist/types/checkout/views/crypto-intent/wallet-payment-options.styles.d.ts +61 -0
  221. package/dist/types/checkout/views/crypto-intent/wallet-payment-options.styles.d.ts.map +1 -0
  222. package/dist/types/checkout/views/crypto-intent/wallet-select.d.ts +1 -2
  223. package/dist/types/checkout/views/crypto-intent/wallet-select.d.ts.map +1 -1
  224. package/dist/types/checkout/views/failed.d.ts +6 -0
  225. package/dist/types/checkout/views/failed.d.ts.map +1 -1
  226. package/dist/types/checkout/views/funding-timeline.d.ts +49 -0
  227. package/dist/types/checkout/views/funding-timeline.d.ts.map +1 -0
  228. package/dist/types/checkout/views/initial.d.ts +2 -4
  229. package/dist/types/checkout/views/initial.d.ts.map +1 -1
  230. package/dist/types/checkout/views/method-select.d.ts +2 -1
  231. package/dist/types/checkout/views/method-select.d.ts.map +1 -1
  232. package/dist/types/checkout/views/payment-follower.d.ts +31 -0
  233. package/dist/types/checkout/views/payment-follower.d.ts.map +1 -0
  234. package/dist/types/checkout/views/restart.d.ts +1 -1
  235. package/dist/types/checkout/views/restart.d.ts.map +1 -1
  236. package/dist/types/components/buttons/index.d.ts.map +1 -1
  237. package/dist/types/components/icons/search.d.ts +2 -0
  238. package/dist/types/components/icons/search.d.ts.map +1 -0
  239. package/dist/types/components/loading/index.d.ts +6 -1
  240. package/dist/types/components/loading/index.d.ts.map +1 -1
  241. package/dist/types/components/modals/modal-with-views.d.ts +2 -0
  242. package/dist/types/components/modals/modal-with-views.d.ts.map +1 -1
  243. package/dist/types/components/modals/modal.d.ts +2 -1
  244. package/dist/types/components/modals/modal.d.ts.map +1 -1
  245. package/dist/types/components/modals/transition-view.d.ts +2 -0
  246. package/dist/types/components/modals/transition-view.d.ts.map +1 -0
  247. package/dist/types/components/modals/use-modal-with-views.d.ts +2 -1
  248. package/dist/types/components/modals/use-modal-with-views.d.ts.map +1 -1
  249. package/dist/types/components/wallet-selector/domain.d.ts +1 -1
  250. package/dist/types/components/wallet-selector/domain.d.ts.map +1 -1
  251. package/dist/types/components/wallet-selector/wallets/wagmi/index.d.ts +2 -2
  252. package/dist/types/components/wallet-selector/wallets/wagmi/index.d.ts.map +1 -1
  253. package/dist/types/config.d.ts +1 -0
  254. package/dist/types/config.d.ts.map +1 -1
  255. package/dist/types/integrations/bitcoin-metamask.d.ts +11 -0
  256. package/dist/types/integrations/bitcoin-metamask.d.ts.map +1 -0
  257. package/dist/types/integrations/bitcoin-network.d.ts +13 -0
  258. package/dist/types/integrations/bitcoin-network.d.ts.map +1 -0
  259. package/dist/types/integrations/bitcoin-psbt.d.ts +5 -0
  260. package/dist/types/integrations/bitcoin-psbt.d.ts.map +1 -0
  261. package/dist/types/integrations/bitcoin-source.d.ts +12 -0
  262. package/dist/types/integrations/bitcoin-source.d.ts.map +1 -0
  263. package/dist/types/integrations/bitcoin-wallet.d.ts +63 -0
  264. package/dist/types/integrations/bitcoin-wallet.d.ts.map +1 -0
  265. package/dist/types/integrations/evm-chain.d.ts +5 -0
  266. package/dist/types/integrations/evm-chain.d.ts.map +1 -1
  267. package/dist/types/integrations/guarded-wallet-client.d.ts +4 -0
  268. package/dist/types/integrations/guarded-wallet-client.d.ts.map +1 -0
  269. package/dist/types/integrations/lifi.d.ts +22 -0
  270. package/dist/types/integrations/lifi.d.ts.map +1 -1
  271. package/dist/types/refund/index.d.ts +1 -1
  272. package/dist/types/refund/index.d.ts.map +1 -1
  273. package/dist/types/state/checkout/bitcoin-payment.d.ts +28 -0
  274. package/dist/types/state/checkout/bitcoin-payment.d.ts.map +1 -0
  275. package/dist/types/state/checkout/checkout-state.d.ts +102 -0
  276. package/dist/types/state/checkout/checkout-state.d.ts.map +1 -0
  277. package/dist/types/state/checkout/funding.d.ts +6 -0
  278. package/dist/types/state/checkout/funding.d.ts.map +1 -0
  279. package/dist/types/state/checkout/issuance-conflicts.d.ts +22 -0
  280. package/dist/types/state/checkout/issuance-conflicts.d.ts.map +1 -0
  281. package/dist/types/state/checkout/manual-route.d.ts +13 -0
  282. package/dist/types/state/checkout/manual-route.d.ts.map +1 -0
  283. package/dist/types/state/checkout/payment-attempt.d.ts +20 -1
  284. package/dist/types/state/checkout/payment-attempt.d.ts.map +1 -1
  285. package/dist/types/state/checkout/payment-lifecycle.d.ts +6 -8
  286. package/dist/types/state/checkout/payment-lifecycle.d.ts.map +1 -1
  287. package/dist/types/state/checkout/payment-observer.d.ts +41 -0
  288. package/dist/types/state/checkout/payment-observer.d.ts.map +1 -0
  289. package/dist/types/state/checkout/payment-phase.d.ts +116 -0
  290. package/dist/types/state/checkout/payment-phase.d.ts.map +1 -0
  291. package/dist/types/state/checkout/quote-countdown.d.ts +15 -0
  292. package/dist/types/state/checkout/quote-countdown.d.ts.map +1 -0
  293. package/dist/types/state/checkout/quote-lifecycle.d.ts +39 -0
  294. package/dist/types/state/checkout/quote-lifecycle.d.ts.map +1 -0
  295. package/dist/types/state/checkout/route-estimate.d.ts +38 -0
  296. package/dist/types/state/checkout/route-estimate.d.ts.map +1 -0
  297. package/dist/types/state/checkout/store.d.ts +38 -90
  298. package/dist/types/state/checkout/store.d.ts.map +1 -1
  299. package/dist/types/state/checkout/wallet-payment-options.d.ts +0 -16
  300. package/dist/types/state/checkout/wallet-payment-options.d.ts.map +1 -1
  301. package/dist/types/state/checkout/wallet-payment.d.ts +24 -0
  302. package/dist/types/state/checkout/wallet-payment.d.ts.map +1 -0
  303. package/dist/types/utils/string.d.ts +2 -0
  304. package/dist/types/utils/string.d.ts.map +1 -1
  305. package/dist/types/utils/token-amount.d.ts +18 -0
  306. package/dist/types/utils/token-amount.d.ts.map +1 -0
  307. package/dist/types/utils/wallet-errors.d.ts.map +1 -1
  308. package/package.json +3 -1
  309. package/dist/esm/checkout/providers/wallet-connect-resume.js +0 -129
  310. package/dist/esm/checkout/providers/wallet-connect-resume.js.map +0 -1
  311. package/dist/esm/refund/confirmation.js +0 -30
  312. package/dist/esm/refund/confirmation.js.map +0 -1
  313. package/dist/types/checkout/providers/wallet-connect-resume.d.ts +0 -9
  314. package/dist/types/checkout/providers/wallet-connect-resume.d.ts.map +0 -1
  315. package/dist/types/refund/confirmation.d.ts +0 -14
  316. package/dist/types/refund/confirmation.d.ts.map +0 -1
@@ -0,0 +1,155 @@
1
+ import { useEffect, useState } from "react";
2
+ import { getManualPaymentOptions, } from "../../../api/payments.js";
3
+ import { sourceKey } from "../../../state/checkout/manual-route.js";
4
+ const ETHEREUM_ICON_URL = "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628";
5
+ export const getMonogram = (value) => {
6
+ const parts = value
7
+ .split(/\s+/)
8
+ .map((part) => part.trim())
9
+ .filter(Boolean);
10
+ if (parts.length === 0) {
11
+ return "?";
12
+ }
13
+ if (parts.length === 1) {
14
+ return parts[0].slice(0, 2).toUpperCase();
15
+ }
16
+ return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
17
+ };
18
+ export const getChainAbbreviation = (chainName) => {
19
+ const normalized = chainName.toLowerCase();
20
+ if (normalized === "base")
21
+ return "B";
22
+ if (normalized === "ethereum")
23
+ return "ETH";
24
+ return getMonogram(chainName);
25
+ };
26
+ export const getManualChainIconUrl = (source) => {
27
+ const normalizedChain = source.chain.toLowerCase();
28
+ const normalizedChainName = source.chain_name.toLowerCase();
29
+ if (normalizedChain === "eip155:1" || normalizedChainName === "ethereum") {
30
+ return ETHEREUM_ICON_URL;
31
+ }
32
+ return source.chain_logo_url ?? null;
33
+ };
34
+ export const isEvmAddress = (value) => /^0x[0-9a-fA-F]{40}$/.test(value);
35
+ export const formatManualPaymentAmount = (amount, currency) => {
36
+ const amountText = String(amount);
37
+ return `${amountText} ${currency}`;
38
+ };
39
+ export const shouldUseRawManualAmount = (chainName, currency) => {
40
+ const normalizedChain = chainName.toLowerCase();
41
+ const normalizedCurrency = currency.toLowerCase();
42
+ return (normalizedChain.includes("sepolia") ||
43
+ normalizedChain.includes("testnet") ||
44
+ normalizedCurrency.includes("mock"));
45
+ };
46
+ export const isTestnetOrMockCurrency = (currency) => shouldUseRawManualAmount(currency.chain_name, currency.asset_name) ||
47
+ shouldUseRawManualAmount(currency.chain, currency.asset);
48
+ export const shouldLoadManualPaymentOptions = (currency) => !isTestnetOrMockCurrency(currency);
49
+ export const uniqueSourceOptions = (settlementCurrency, configuredSources) => {
50
+ const options = [settlementCurrency, ...(configuredSources ?? [])];
51
+ const seen = new Set();
52
+ return options.filter((option) => {
53
+ const key = sourceKey(option);
54
+ if (seen.has(key))
55
+ return false;
56
+ seen.add(key);
57
+ return true;
58
+ });
59
+ };
60
+ export const manualPaymentOptionToCurrency = (option) => ({
61
+ chain: option.from_chain.caip2,
62
+ asset: option.from_token.caip21,
63
+ chain_name: option.from_chain.name,
64
+ asset_name: option.from_token.name,
65
+ asset_id: option.id,
66
+ logo_url: option.from_token.logo_url,
67
+ chain_logo_url: option.from_chain.logo_url,
68
+ });
69
+ export const manualPaymentOptionKey = (option) => `${option.from_chain.caip2}__${option.from_token.caip21}`;
70
+ export const manualOptionLookupKey = (source) => `${source.chain}__${source.asset}`.toLowerCase();
71
+ export const getSourceTokenSymbol = (source, manualOptions) => manualOptions.find((option) => manualPaymentOptionKey(option).toLowerCase() ===
72
+ manualOptionLookupKey(source))?.from_token.symbol ?? source.asset_name;
73
+ export const getSourceTokenGroupKey = (source, manualOptions) => getSourceTokenSymbol(source, manualOptions).toLowerCase();
74
+ export const uniqueSourceTokens = (options, manualOptions) => {
75
+ const seen = new Set();
76
+ return options.filter((option) => {
77
+ const key = getSourceTokenGroupKey(option, manualOptions);
78
+ if (seen.has(key))
79
+ return false;
80
+ seen.add(key);
81
+ return true;
82
+ });
83
+ };
84
+ export const uniqueSourceChains = (options) => {
85
+ const seen = new Set();
86
+ return options.filter((option) => {
87
+ if (seen.has(option.chain))
88
+ return false;
89
+ seen.add(option.chain);
90
+ return true;
91
+ });
92
+ };
93
+ export const getManualInstructionSource = (instructions) => {
94
+ if (!instructions)
95
+ return null;
96
+ if ("source_chain" in instructions &&
97
+ "source_token" in instructions &&
98
+ typeof instructions.source_chain === "string" &&
99
+ typeof instructions.source_token === "string") {
100
+ return {
101
+ chain: instructions.source_chain,
102
+ token: instructions.source_token,
103
+ };
104
+ }
105
+ const tokenTransferInstructions = instructions;
106
+ if (typeof tokenTransferInstructions.chain === "string" &&
107
+ typeof tokenTransferInstructions.token === "string") {
108
+ return {
109
+ chain: tokenTransferInstructions.chain,
110
+ token: tokenTransferInstructions.token,
111
+ };
112
+ }
113
+ return null;
114
+ };
115
+ /**
116
+ * The API's manual payment options for the payment, loaded again only when
117
+ * the payment or the settlement currency changes. Testnet and mock currencies
118
+ * have none.
119
+ */
120
+ export const useManualPaymentOptions = (paymentId, settlementCurrency) => {
121
+ const requestKey = paymentId &&
122
+ settlementCurrency &&
123
+ shouldLoadManualPaymentOptions(settlementCurrency)
124
+ ? `${paymentId}:${sourceKey(settlementCurrency)}`
125
+ : null;
126
+ const [result, setResult] = useState(null);
127
+ useEffect(() => {
128
+ if (!paymentId || !requestKey)
129
+ return;
130
+ let cancelled = false;
131
+ getManualPaymentOptions(paymentId)
132
+ .then((options) => {
133
+ if (cancelled)
134
+ return;
135
+ setResult({ key: requestKey, options, status: "ready" });
136
+ })
137
+ .catch((error) => {
138
+ if (cancelled)
139
+ return;
140
+ console.error("Failed to load manual payment options:", error);
141
+ setResult({ key: requestKey, options: [], status: "failed" });
142
+ });
143
+ return () => {
144
+ cancelled = true;
145
+ };
146
+ }, [requestKey, paymentId]);
147
+ const current = result?.key === requestKey ? result : null;
148
+ return {
149
+ manualPaymentOptions: current?.options ?? [],
150
+ manualPaymentOptionsStatus: requestKey
151
+ ? (current?.status ?? "loading")
152
+ : "idle",
153
+ };
154
+ };
155
+ //# sourceMappingURL=manual-sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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AS,IAAI,CAAC,UAAU;YAAE,OAAO;QAEtC,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,uBAAuB,CAAC,SAAS,CAAC;aAC/B,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,IAAI,SAAS;gBAAE,OAAO;YACtB,SAAS,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACf,IAAI,SAAS;gBAAE,OAAO;YACtB,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;YAC/D,SAAS,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QAEL,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAE5B,MAAM,OAAO,GAAG,MAAM,EAAE,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,OAAO;QACL,oBAAoB,EAAE,OAAO,EAAE,OAAO,IAAI,EAAE;QAC5C,0BAA0B,EAAE,UAAU;YACpC,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC;YAChC,CAAC,CAAC,MAAM;KACX,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { BITCOIN, BITCOIN_CHAIN, } from "../../../integrations/bitcoin-source.js";
2
+ import { formatBaseUnits } from "../../../utils/token-amount.js";
3
+ import { formatManualPaymentAmount, shouldUseRawManualAmount, } from "./manual-sources.js";
4
+ const qrAmountParameter = /([?&]uint256=)\d+(?=&|$)/;
5
+ export function manualInstructionsMatchFunding(attempt, shortfall) {
6
+ const instructions = attempt?.payment_instructions;
7
+ if (!attempt)
8
+ return true;
9
+ if (instructions?.type === "token_transfer" &&
10
+ attempt.amount_to_pay &&
11
+ shortfall) {
12
+ // If funding preceded this quote, the estimate can be larger than the
13
+ // newly issued amount. Only a smaller remainder makes these details stale.
14
+ return BigInt(instructions.amount) <= BigInt(shortfall);
15
+ }
16
+ if (instructions?.type !== "relay_deposit_address")
17
+ return true;
18
+ const quotedAmount = instructions.quoted_destination_amount;
19
+ // A legacy Relay quote can be shown for a new payment, but its top-up basis is unknown.
20
+ if (quotedAmount === undefined)
21
+ return shortfall === null;
22
+ return quotedAmount === (shortfall ?? String(attempt.amount));
23
+ }
24
+ export function getManualTransferInstructions(attempt, source, funding, shortfall) {
25
+ if (!attempt)
26
+ return { kind: "missing" };
27
+ const instructions = attempt.payment_instructions;
28
+ const paymentAddress = instructions?.payment_address ?? attempt.destination_address;
29
+ if (!paymentAddress)
30
+ return { kind: "missing" };
31
+ const relay = instructions?.type === "relay_deposit_address";
32
+ const formatted = relay
33
+ ? instructions.source_amount_formatted
34
+ : (instructions?.amount_formatted ?? attempt.amount_formatted);
35
+ const raw = relay
36
+ ? instructions.source_amount
37
+ : (instructions?.amount ?? String(attempt.amount));
38
+ const useRaw = Boolean(raw) &&
39
+ raw !== String(formatted) &&
40
+ shouldUseRawManualAmount(source.chain, source.currency);
41
+ let amount = useRaw ? raw : formatted;
42
+ let amountUsd = instructions?.amount_usd;
43
+ let symbol = source.currency;
44
+ let qrPayload = instructions?.type === "token_transfer"
45
+ ? instructions.qr_payload
46
+ : paymentAddress;
47
+ if (shortfall && !relay && attempt.amount_to_pay === undefined) {
48
+ if (instructions?.type !== "token_transfer" ||
49
+ funding?.token.toLowerCase() !== instructions.token.toLowerCase() ||
50
+ funding.chain.toLowerCase() !== instructions.chain.toLowerCase()) {
51
+ return { kind: "unavailable_top_up" };
52
+ }
53
+ amount = useRaw
54
+ ? shortfall
55
+ : formatBaseUnits(shortfall, funding.token_decimals);
56
+ if (amount === null)
57
+ return { kind: "unavailable_top_up" };
58
+ // The original estimate describes the original transfer amount.
59
+ if (shortfall !== raw)
60
+ amountUsd = undefined;
61
+ symbol = instructions.token_symbol;
62
+ // A QR with an unrecognized format must not reuse the original amount.
63
+ qrPayload = qrAmountParameter.test(qrPayload)
64
+ ? qrPayload.replace(qrAmountParameter, (_amount, parameter) => `${parameter}${shortfall}`)
65
+ : paymentAddress;
66
+ }
67
+ if (amount == null || amount === "")
68
+ return { kind: "missing" };
69
+ if (relay && instructions.source_chain === BITCOIN_CHAIN) {
70
+ symbol = BITCOIN.symbol;
71
+ qrPayload = BITCOIN.paymentUri(paymentAddress, amount);
72
+ }
73
+ return {
74
+ kind: "ready",
75
+ paymentAddress,
76
+ sendAmount: useRaw
77
+ ? String(amount)
78
+ : formatManualPaymentAmount(amount, symbol),
79
+ copyAmount: String(amount),
80
+ qrPayload,
81
+ amountUsd,
82
+ };
83
+ }
84
+ //# sourceMappingURL=manual-transfer-instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manual-transfer-instructions.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/manual-transfer-instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,aAAa,GACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAkB7B,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAErD,MAAM,UAAU,8BAA8B,CAC5C,OAAoC,EACpC,SAAwB;IAExB,MAAM,YAAY,GAAG,OAAO,EAAE,oBAAoB,CAAC;IACnD,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,IACE,YAAY,EAAE,IAAI,KAAK,gBAAgB;QACvC,OAAO,CAAC,aAAa;QACrB,SAAS,EACT,CAAC;QACD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SAAiB,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,SAAS,EAAE,CAC3D;YACH,CAAC,CAAC,cAAc,CAAC;IACrB,CAAC;IAED,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAChE,IAAI,KAAK,IAAI,YAAY,CAAC,YAAY,KAAK,aAAa,EAAE,CAAC;QACzD,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QACxB,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IACD,OAAO;QACL,IAAI,EAAE,OAAO;QACb,cAAc;QACd,UAAU,EAAE,MAAM;YAChB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;YAChB,CAAC,CAAC,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC;QAC7C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC;QAC1B,SAAS;QACT,SAAS;KACV,CAAC;AACJ,CAAC"}
@@ -1,18 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useAppKit, useAppKitAccount } from "@reown/appkit/react";
3
- import { reconnect } from "@wagmi/core";
4
- import { useCallback, useContext, useEffect, useRef, useState } from "react";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
5
3
  import { styled } from "styled-components";
6
- import { useAccount, useConfig } from "wagmi";
7
4
  import { StyledButton } from "../../../components/buttons/index.js";
8
5
  import { Loader, useModalWithView } from "../../../components/index.js";
9
- import { WalletContext } from "../../../components/wallet-selector/provider.js";
10
- import { useWalletActions } from "../../../components/wallet-selector/store.js";
11
- import { WagmiWalletInterface } from "../../../components/wallet-selector/wallets/wagmi/index.js";
12
6
  import { useMintMoneyConfig } from "../../../context.js";
13
- import { clearQuoteRefresh, resetWalletPaymentState, useCheckoutStore, } from "../../../state/checkout/store.js";
7
+ import { useCheckoutStore } from "../../../state/checkout/store.js";
14
8
  import { ModalViewContainer } from "../../container.js";
15
- import { readCheckoutResumeState, writeCheckoutResumeState, writePendingWalletConnectionResumeState, } from "../../resume-state.js";
9
+ import { useCheckoutWallet } from "../../providers/checkout-wallet.js";
16
10
  const OptionsContainer = styled.div `
17
11
  display: flex;
18
12
  flex-direction: column;
@@ -37,131 +31,36 @@ const supportsConnectedWalletPayment = (settlementCurrency) => {
37
31
  };
38
32
  const ConnectedWalletButton = () => {
39
33
  const { goToView } = useModalWithView();
40
- const wagmiConfig = useConfig();
41
- const { setWallet } = useContext(WalletContext);
42
- const { initialiseWallets } = useWalletActions();
43
- const { open } = useAppKit();
44
- const appKitAccount = useAppKitAccount({ namespace: "eip155" });
45
- const account = useAccount();
46
- const pendingWalletConnectRef = useRef(false);
47
- const [hasConnectionSettlingTimedOut, setHasConnectionSettlingTimedOut] = useState(false);
34
+ const { connection, connecting, ready, error, connect } = useCheckoutWallet();
48
35
  const config = useMintMoneyConfig();
49
- const { payment } = useCheckoutStore();
50
- const isWalletConnectionStatusSettling = account.status === "connecting" || account.status === "reconnecting";
51
- const isWalletConnectionSettling = isWalletConnectionStatusSettling && !hasConnectionSettlingTimedOut;
36
+ const pendingConnect = useRef(false);
52
37
  useEffect(() => {
53
- if (!isWalletConnectionStatusSettling || account.isConnected) {
54
- setHasConnectionSettlingTimedOut(false);
55
- return undefined;
56
- }
57
- const timer = window.setTimeout(() => {
58
- setHasConnectionSettlingTimedOut(true);
59
- }, 12000);
60
- return () => window.clearTimeout(timer);
61
- }, [account.isConnected, isWalletConnectionStatusSettling]);
62
- const continueWithConnectedWallet = useCallback(() => {
63
- if (isWalletConnectionSettling) {
64
- return false;
65
- }
66
- if (!account.isConnected || !account.address || !account.connector) {
67
- return false;
68
- }
69
- const wallet = new WagmiWalletInterface(account.connector, wagmiConfig);
70
- setWallet(wallet);
71
- initialiseWallets([() => wallet]);
72
- resetWalletPaymentState();
73
- clearQuoteRefresh({ preserveWalletAddress: true });
74
- writeCheckoutResumeState(payment?.id, {
75
- view: "cryptoIntentWalletPaymentOptions",
76
- walletAddress: account.address,
77
- selectedWalletOptionId: null,
78
- pendingWalletConnection: false,
79
- });
80
- goToView("cryptoIntentWalletPaymentOptions");
81
- return true;
82
- }, [
83
- account.isConnected,
84
- account.address,
85
- account.connector,
86
- wagmiConfig,
87
- setWallet,
88
- initialiseWallets,
89
- goToView,
90
- isWalletConnectionSettling,
91
- payment?.id,
92
- ]);
93
- const handleWalletClick = useCallback(() => {
94
- if (isWalletConnectionSettling) {
95
- return;
96
- }
97
- if (continueWithConnectedWallet()) {
98
- return;
99
- }
100
- pendingWalletConnectRef.current = true;
101
- writePendingWalletConnectionResumeState(payment?.id, "cryptoIntent");
102
- void open({ view: "Connect", namespace: "eip155" });
103
- }, [
104
- continueWithConnectedWallet,
105
- isWalletConnectionSettling,
106
- open,
107
- payment?.id,
108
- ]);
109
- useEffect(() => {
110
- if (!payment?.id) {
111
- return;
112
- }
113
- pendingWalletConnectRef.current = Boolean(readCheckoutResumeState(payment.id).pendingWalletConnection);
114
- }, [payment?.id]);
115
- useEffect(() => {
116
- if (!pendingWalletConnectRef.current ||
117
- account.isConnected ||
118
- isWalletConnectionSettling ||
119
- !appKitAccount.isConnected ||
120
- !appKitAccount.address) {
121
- return;
122
- }
123
- void reconnect(wagmiConfig).catch((error) => {
124
- console.warn("Unable to restore WalletConnect session", error);
125
- });
126
- }, [
127
- account.isConnected,
128
- appKitAccount.address,
129
- appKitAccount.isConnected,
130
- isWalletConnectionSettling,
131
- wagmiConfig,
132
- ]);
133
- useEffect(() => {
134
- if (!pendingWalletConnectRef.current) {
135
- return;
136
- }
137
- if (continueWithConnectedWallet()) {
138
- pendingWalletConnectRef.current = false;
139
- }
140
- }, [
141
- account.address,
142
- account.connector,
143
- account.isConnected,
144
- continueWithConnectedWallet,
145
- ]);
146
- return (_jsx(StyledButton, { onClick: handleWalletClick, variant: "primary", theme: config.theme, disabled: isWalletConnectionSettling, children: isWalletConnectionSettling
147
- ? "Connecting wallet..."
148
- : account.isConnected && account.address
149
- ? "Use Connected Wallet"
150
- : "Connect Wallet" }));
38
+ if (pendingConnect.current && connection)
39
+ goToView("cryptoIntentWalletPaymentOptions");
40
+ }, [connection, goToView]);
41
+ return (_jsxs(_Fragment, { children: [error ? _jsx("p", { role: "alert", children: error }) : null, _jsx(StyledButton, { onClick: () => {
42
+ if (connection) {
43
+ goToView("cryptoIntentWalletPaymentOptions");
44
+ }
45
+ else {
46
+ pendingConnect.current = true;
47
+ void connect();
48
+ }
49
+ }, variant: "primary", theme: config.theme, disabled: !ready, children: connecting
50
+ ? "Connecting wallet..."
51
+ : connection
52
+ ? "Use Connected Wallet"
53
+ : "Connect Wallet" })] }));
151
54
  };
152
55
  const CryptoIntentViewContent = () => {
153
56
  const modalRef = useRef(null);
154
57
  const { goToView } = useModalWithView();
155
58
  const { cryptoCurrency } = useCheckoutStore();
156
- const { payment } = useCheckoutStore();
157
59
  const settlementCurrency = cryptoCurrency;
158
60
  const canUseConnectedWallet = supportsConnectedWalletPayment(settlementCurrency);
159
61
  const config = useMintMoneyConfig();
160
62
  const handleDirectPaymentClick = () => {
161
63
  if (settlementCurrency) {
162
- writeCheckoutResumeState(payment?.id, {
163
- pendingWalletConnection: false,
164
- });
165
64
  goToView("cryptoIntentDirectDetails");
166
65
  }
167
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/methods.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,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AC;IAC9C,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACxC,MAAM,EAAE,cAAc,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE9C,MAAM,kBAAkB,GAAG,cAAc,CAAC;IAC1C,MAAM,qBAAqB,GACzB,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IAEpC,MAAM,wBAAwB,GAAG,GAAG,EAAE;QACpC,IAAI,kBAAkB,EAAE,CAAC;YACvB,QAAQ,CAAC,2BAA2B,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,OAAO,CACL,KAAC,kBAAkB,IAAC,GAAG,EAAE,QAAQ,YAC/B,KAAC,YAAY,cACX,KAAC,MAAM,IAAC,OAAO,SAAG,GACL,GACI,CACtB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,kBAAkB,IAAC,GAAG,EAAE,QAAQ,YAC/B,MAAC,gBAAgB,eACd,qBAAqB,CAAC,CAAC,CAAC,KAAC,qBAAqB,KAAG,CAAC,CAAC,CAAC,IAAI,EAEzD,KAAC,YAAY,IACX,OAAO,EAAE,wBAAwB,EACjC,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,CAAC,kBAAkB,kCAGhB,IACE,GACA,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { styled } from "styled-components";
2
+ export const PaymentRouteError = styled.div `
3
+ flex: 0 0 auto;
4
+ min-block-size: 1.45em;
5
+ overflow-wrap: anywhere;
6
+ font-size: 13px;
7
+ line-height: 1.45;
8
+ color: #b91c1c;
9
+ `;
10
+ //# sourceMappingURL=payment-route-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-route-error.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/payment-route-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAO1C,CAAC"}