@mintmoney/react 0.1.0-alpha.3 → 0.1.0-alpha.30

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 (293) hide show
  1. package/README.md +19 -0
  2. package/dist/css/styles.css +225 -7
  3. package/dist/esm/api/checkouts.js +24 -0
  4. package/dist/esm/api/checkouts.js.map +1 -0
  5. package/dist/esm/api/generated.js +779 -0
  6. package/dist/esm/api/generated.js.map +1 -0
  7. package/dist/esm/api/index.js +15 -0
  8. package/dist/esm/api/index.js.map +1 -0
  9. package/dist/esm/api/payments.js +53 -0
  10. package/dist/esm/api/payments.js.map +1 -0
  11. package/dist/esm/api/types.js +8 -0
  12. package/dist/esm/api/types.js.map +1 -0
  13. package/dist/esm/checkout/container.js +10 -0
  14. package/dist/esm/checkout/container.js.map +1 -0
  15. package/dist/esm/checkout/index.js +48 -0
  16. package/dist/esm/checkout/index.js.map +1 -0
  17. package/dist/esm/checkout/modal.js +91 -0
  18. package/dist/esm/checkout/modal.js.map +1 -0
  19. package/dist/esm/checkout/views/amount-header.js +42 -0
  20. package/dist/esm/checkout/views/amount-header.js.map +1 -0
  21. package/dist/esm/checkout/views/back.js +8 -0
  22. package/dist/esm/checkout/views/back.js.map +1 -0
  23. package/dist/esm/checkout/views/card-intent/details.js +36 -0
  24. package/dist/esm/checkout/views/card-intent/details.js.map +1 -0
  25. package/dist/esm/checkout/views/crypto-intent/currency-select.js +44 -0
  26. package/dist/esm/checkout/views/crypto-intent/currency-select.js.map +1 -0
  27. package/dist/esm/checkout/views/crypto-intent/direct-details.js +199 -0
  28. package/dist/esm/checkout/views/crypto-intent/direct-details.js.map +1 -0
  29. package/dist/esm/checkout/views/crypto-intent/methods.js +52 -0
  30. package/dist/esm/checkout/views/crypto-intent/methods.js.map +1 -0
  31. package/dist/esm/checkout/views/crypto-intent/processing.js +54 -0
  32. package/dist/esm/checkout/views/crypto-intent/processing.js.map +1 -0
  33. package/dist/esm/checkout/views/crypto-intent/success.js +41 -0
  34. package/dist/esm/checkout/views/crypto-intent/success.js.map +1 -0
  35. package/dist/esm/checkout/views/crypto-intent/test-payment.js +35 -0
  36. package/dist/esm/checkout/views/crypto-intent/test-payment.js.map +1 -0
  37. package/dist/esm/checkout/views/crypto-intent/wallet-select.js +63 -0
  38. package/dist/esm/checkout/views/crypto-intent/wallet-select.js.map +1 -0
  39. package/dist/esm/checkout/views/failed.js +26 -0
  40. package/dist/esm/checkout/views/failed.js.map +1 -0
  41. package/dist/esm/checkout/views/fiat-intent/bank-payment.js +35 -0
  42. package/dist/esm/checkout/views/fiat-intent/bank-payment.js.map +1 -0
  43. package/dist/esm/checkout/views/initial.js +30 -0
  44. package/dist/esm/checkout/views/initial.js.map +1 -0
  45. package/dist/esm/checkout/views/method-select.js +23 -0
  46. package/dist/esm/checkout/views/method-select.js.map +1 -0
  47. package/dist/esm/checkout/views/restart.js +10 -0
  48. package/dist/esm/checkout/views/restart.js.map +1 -0
  49. package/dist/esm/components/buttons/async-button.js +16 -0
  50. package/dist/esm/components/buttons/async-button.js.map +1 -0
  51. package/dist/esm/components/buttons/index.js +98 -15
  52. package/dist/esm/components/buttons/index.js.map +1 -1
  53. package/dist/esm/components/buttons/use-async-button.js +44 -0
  54. package/dist/esm/components/buttons/use-async-button.js.map +1 -0
  55. package/dist/esm/components/crypto/currency-selector.js +26 -0
  56. package/dist/esm/components/crypto/currency-selector.js.map +1 -0
  57. package/dist/esm/components/crypto/default-currency-selector.js +62 -0
  58. package/dist/esm/components/crypto/default-currency-selector.js.map +1 -0
  59. package/dist/esm/components/icons/alert.js +20 -0
  60. package/dist/esm/components/icons/alert.js.map +1 -0
  61. package/dist/esm/components/icons/checkMark.js +1 -1
  62. package/dist/esm/components/icons/checkMark.js.map +1 -1
  63. package/dist/esm/components/icons/clipboard-add.js +20 -0
  64. package/dist/esm/components/icons/clipboard-add.js.map +1 -0
  65. package/dist/esm/components/icons/clipboard-check.js +20 -0
  66. package/dist/esm/components/icons/clipboard-check.js.map +1 -0
  67. package/dist/esm/components/icons/close.js +1 -1
  68. package/dist/esm/components/icons/close.js.map +1 -1
  69. package/dist/esm/components/icons/index.js +5 -0
  70. package/dist/esm/components/icons/index.js.map +1 -1
  71. package/dist/esm/components/icons/link.js +20 -0
  72. package/dist/esm/components/icons/link.js.map +1 -0
  73. package/dist/esm/components/icons/loading.js +26 -0
  74. package/dist/esm/components/icons/loading.js.map +1 -0
  75. package/dist/esm/components/inputs/index.js +32 -0
  76. package/dist/esm/components/inputs/index.js.map +1 -0
  77. package/dist/esm/components/lists/index.js +1 -1
  78. package/dist/esm/components/lists/index.js.map +1 -1
  79. package/dist/esm/components/loading/index.js.map +1 -1
  80. package/dist/esm/components/modals/modal-with-views.js +4 -3
  81. package/dist/esm/components/modals/modal-with-views.js.map +1 -1
  82. package/dist/esm/components/modals/modal.js +2 -2
  83. package/dist/esm/components/modals/modal.js.map +1 -1
  84. package/dist/esm/components/modals/use-modal-with-views.js +11 -2
  85. package/dist/esm/components/modals/use-modal-with-views.js.map +1 -1
  86. package/dist/esm/components/text/index.js +1 -0
  87. package/dist/esm/components/text/index.js.map +1 -1
  88. package/dist/esm/components/wallet-selector/component.js +61 -0
  89. package/dist/esm/components/wallet-selector/component.js.map +1 -0
  90. package/dist/esm/components/wallet-selector/domain.js +2 -0
  91. package/dist/esm/components/wallet-selector/domain.js.map +1 -0
  92. package/dist/esm/components/wallet-selector/helper.js +12 -0
  93. package/dist/esm/components/wallet-selector/helper.js.map +1 -0
  94. package/dist/esm/components/wallet-selector/index.js +5 -0
  95. package/dist/esm/components/wallet-selector/index.js.map +1 -0
  96. package/dist/esm/components/wallet-selector/provider.js +15 -0
  97. package/dist/esm/components/wallet-selector/provider.js.map +1 -0
  98. package/dist/esm/components/wallet-selector/schemas.js +6 -0
  99. package/dist/esm/components/wallet-selector/schemas.js.map +1 -0
  100. package/dist/esm/components/wallet-selector/store.js +134 -0
  101. package/dist/esm/components/wallet-selector/store.js.map +1 -0
  102. package/dist/esm/components/wallet-selector/util/exceptions.js +16 -0
  103. package/dist/esm/components/wallet-selector/util/exceptions.js.map +1 -0
  104. package/dist/esm/components/wallet-selector/wallets/index.js +3 -0
  105. package/dist/esm/components/wallet-selector/wallets/index.js.map +1 -0
  106. package/dist/esm/components/wallet-selector/wallets/wagmi/index.js +211 -0
  107. package/dist/esm/components/wallet-selector/wallets/wagmi/index.js.map +1 -0
  108. package/dist/esm/components/wallet-selector/wallets/wagmi/usdt-abi.json +671 -0
  109. package/dist/esm/config.js +10 -1
  110. package/dist/esm/config.js.map +1 -1
  111. package/dist/esm/context.js +2 -1
  112. package/dist/esm/context.js.map +1 -1
  113. package/dist/esm/index.js +7 -1
  114. package/dist/esm/index.js.map +1 -1
  115. package/dist/esm/integrations/index.js +3 -0
  116. package/dist/esm/integrations/index.js.map +1 -0
  117. package/dist/esm/integrations/instaxchange.js +44 -0
  118. package/dist/esm/integrations/instaxchange.js.map +1 -0
  119. package/dist/esm/integrations/types.js +2 -0
  120. package/dist/esm/integrations/types.js.map +1 -0
  121. package/dist/esm/state/checkout/store.js +494 -0
  122. package/dist/esm/state/checkout/store.js.map +1 -0
  123. package/dist/esm/themes/default.js +42 -0
  124. package/dist/esm/themes/default.js.map +1 -1
  125. package/dist/esm/themes/types.js +1 -1
  126. package/dist/esm/themes/types.js.map +1 -1
  127. package/dist/esm/utils/cn.js +4 -0
  128. package/dist/esm/utils/cn.js.map +1 -0
  129. package/dist/esm/utils/string.js +34 -0
  130. package/dist/esm/utils/string.js.map +1 -0
  131. package/dist/types/api/checkouts.d.ts +4 -0
  132. package/dist/types/api/checkouts.d.ts.map +1 -0
  133. package/dist/types/api/generated.d.ts +1611 -0
  134. package/dist/types/api/generated.d.ts.map +1 -0
  135. package/dist/types/api/index.d.ts +6 -0
  136. package/dist/types/api/index.d.ts.map +1 -0
  137. package/dist/types/api/payments.d.ts +14 -0
  138. package/dist/types/api/payments.d.ts.map +1 -0
  139. package/dist/types/api/types.d.ts +34 -0
  140. package/dist/types/api/types.d.ts.map +1 -0
  141. package/dist/types/checkout/container.d.ts +2 -0
  142. package/dist/types/checkout/container.d.ts.map +1 -0
  143. package/dist/types/checkout/index.d.ts +11 -0
  144. package/dist/types/checkout/index.d.ts.map +1 -0
  145. package/dist/types/checkout/modal.d.ts +12 -0
  146. package/dist/types/checkout/modal.d.ts.map +1 -0
  147. package/dist/types/checkout/views/amount-header.d.ts +9 -0
  148. package/dist/types/checkout/views/amount-header.d.ts.map +1 -0
  149. package/dist/types/checkout/views/back.d.ts +7 -0
  150. package/dist/types/checkout/views/back.d.ts.map +1 -0
  151. package/dist/types/checkout/views/card-intent/details.d.ts +3 -0
  152. package/dist/types/checkout/views/card-intent/details.d.ts.map +1 -0
  153. package/dist/types/checkout/views/crypto-intent/currency-select.d.ts +3 -0
  154. package/dist/types/checkout/views/crypto-intent/currency-select.d.ts.map +1 -0
  155. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts +3 -0
  156. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts.map +1 -0
  157. package/dist/types/checkout/views/crypto-intent/methods.d.ts +3 -0
  158. package/dist/types/checkout/views/crypto-intent/methods.d.ts.map +1 -0
  159. package/dist/types/checkout/views/crypto-intent/processing.d.ts +3 -0
  160. package/dist/types/checkout/views/crypto-intent/processing.d.ts.map +1 -0
  161. package/dist/types/checkout/views/crypto-intent/success.d.ts +8 -0
  162. package/dist/types/checkout/views/crypto-intent/success.d.ts.map +1 -0
  163. package/dist/types/checkout/views/crypto-intent/test-payment.d.ts +3 -0
  164. package/dist/types/checkout/views/crypto-intent/test-payment.d.ts.map +1 -0
  165. package/dist/types/checkout/views/crypto-intent/wallet-select.d.ts +3 -0
  166. package/dist/types/checkout/views/crypto-intent/wallet-select.d.ts.map +1 -0
  167. package/dist/types/checkout/views/failed.d.ts +2 -0
  168. package/dist/types/checkout/views/failed.d.ts.map +1 -0
  169. package/dist/types/checkout/views/fiat-intent/bank-payment.d.ts +2 -0
  170. package/dist/types/checkout/views/fiat-intent/bank-payment.d.ts.map +1 -0
  171. package/dist/types/checkout/views/initial.d.ts +7 -0
  172. package/dist/types/checkout/views/initial.d.ts.map +1 -0
  173. package/dist/types/checkout/views/method-select.d.ts +3 -0
  174. package/dist/types/checkout/views/method-select.d.ts.map +1 -0
  175. package/dist/types/checkout/views/restart.d.ts +4 -0
  176. package/dist/types/checkout/views/restart.d.ts.map +1 -0
  177. package/dist/types/components/buttons/async-button.d.ts +14 -0
  178. package/dist/types/components/buttons/async-button.d.ts.map +1 -0
  179. package/dist/types/components/buttons/index.d.ts +21 -3
  180. package/dist/types/components/buttons/index.d.ts.map +1 -1
  181. package/dist/types/components/buttons/use-async-button.d.ts +16 -0
  182. package/dist/types/components/buttons/use-async-button.d.ts.map +1 -0
  183. package/dist/types/components/crypto/currency-selector.d.ts +11 -0
  184. package/dist/types/components/crypto/currency-selector.d.ts.map +1 -0
  185. package/dist/types/components/crypto/default-currency-selector.d.ts +9 -0
  186. package/dist/types/components/crypto/default-currency-selector.d.ts.map +1 -0
  187. package/dist/types/components/icons/alert.d.ts +7 -0
  188. package/dist/types/components/icons/alert.d.ts.map +1 -0
  189. package/dist/types/components/icons/checkMark.d.ts.map +1 -1
  190. package/dist/types/components/icons/clipboard-add.d.ts +6 -0
  191. package/dist/types/components/icons/clipboard-add.d.ts.map +1 -0
  192. package/dist/types/components/icons/clipboard-check.d.ts +6 -0
  193. package/dist/types/components/icons/clipboard-check.d.ts.map +1 -0
  194. package/dist/types/components/icons/close.d.ts.map +1 -1
  195. package/dist/types/components/icons/index.d.ts +5 -0
  196. package/dist/types/components/icons/index.d.ts.map +1 -1
  197. package/dist/types/components/icons/link.d.ts +6 -0
  198. package/dist/types/components/icons/link.d.ts.map +1 -0
  199. package/dist/types/components/icons/loading.d.ts +6 -0
  200. package/dist/types/components/icons/loading.d.ts.map +1 -0
  201. package/dist/types/components/inputs/index.d.ts +7 -0
  202. package/dist/types/components/inputs/index.d.ts.map +1 -0
  203. package/dist/types/components/lists/index.d.ts +2 -1
  204. package/dist/types/components/lists/index.d.ts.map +1 -1
  205. package/dist/types/components/loading/index.d.ts.map +1 -1
  206. package/dist/types/components/modals/modal-with-views.d.ts +1 -0
  207. package/dist/types/components/modals/modal-with-views.d.ts.map +1 -1
  208. package/dist/types/components/modals/modal.d.ts.map +1 -1
  209. package/dist/types/components/modals/use-modal-with-views.d.ts.map +1 -1
  210. package/dist/types/components/text/index.d.ts.map +1 -1
  211. package/dist/types/components/wallet-selector/component.d.ts +13 -0
  212. package/dist/types/components/wallet-selector/component.d.ts.map +1 -0
  213. package/dist/types/components/wallet-selector/domain.d.ts +86 -0
  214. package/dist/types/components/wallet-selector/domain.d.ts.map +1 -0
  215. package/dist/types/components/wallet-selector/helper.d.ts +4 -0
  216. package/dist/types/components/wallet-selector/helper.d.ts.map +1 -0
  217. package/dist/types/components/wallet-selector/index.d.ts +7 -0
  218. package/dist/types/components/wallet-selector/index.d.ts.map +1 -0
  219. package/dist/types/components/wallet-selector/provider.d.ts +10 -0
  220. package/dist/types/components/wallet-selector/provider.d.ts.map +1 -0
  221. package/dist/types/components/wallet-selector/schemas.d.ts +4 -0
  222. package/dist/types/components/wallet-selector/schemas.d.ts.map +1 -0
  223. package/dist/types/components/wallet-selector/store.d.ts +33 -0
  224. package/dist/types/components/wallet-selector/store.d.ts.map +1 -0
  225. package/dist/types/components/wallet-selector/util/exceptions.d.ts +7 -0
  226. package/dist/types/components/wallet-selector/util/exceptions.d.ts.map +1 -0
  227. package/dist/types/components/wallet-selector/wallets/index.d.ts +3 -0
  228. package/dist/types/components/wallet-selector/wallets/index.d.ts.map +1 -0
  229. package/dist/types/components/wallet-selector/wallets/wagmi/index.d.ts +34 -0
  230. package/dist/types/components/wallet-selector/wallets/wagmi/index.d.ts.map +1 -0
  231. package/dist/types/config.d.ts +7 -0
  232. package/dist/types/config.d.ts.map +1 -1
  233. package/dist/types/context.d.ts.map +1 -1
  234. package/dist/types/index.d.ts +7 -1
  235. package/dist/types/index.d.ts.map +1 -1
  236. package/dist/types/integrations/index.d.ts +3 -0
  237. package/dist/types/integrations/index.d.ts.map +1 -0
  238. package/dist/types/integrations/instaxchange.d.ts +4 -0
  239. package/dist/types/integrations/instaxchange.d.ts.map +1 -0
  240. package/dist/types/integrations/types.d.ts +5 -0
  241. package/dist/types/integrations/types.d.ts.map +1 -0
  242. package/dist/types/state/checkout/store.d.ts +155 -0
  243. package/dist/types/state/checkout/store.d.ts.map +1 -0
  244. package/dist/types/themes/default.d.ts +2 -2
  245. package/dist/types/themes/default.d.ts.map +1 -1
  246. package/dist/types/themes/types.d.ts +9 -0
  247. package/dist/types/themes/types.d.ts.map +1 -1
  248. package/dist/types/utils/cn.d.ts +4 -0
  249. package/dist/types/utils/cn.d.ts.map +1 -0
  250. package/dist/types/utils/string.d.ts +23 -0
  251. package/dist/types/utils/string.d.ts.map +1 -0
  252. package/package.json +82 -61
  253. package/dist/esm/components/buttons/buttons.stories.js +0 -18
  254. package/dist/esm/components/buttons/buttons.stories.js.map +0 -1
  255. package/dist/esm/components/lists/lists.stories.js +0 -42
  256. package/dist/esm/components/lists/lists.stories.js.map +0 -1
  257. package/dist/esm/components/loading/loading.stories.js +0 -8
  258. package/dist/esm/components/loading/loading.stories.js.map +0 -1
  259. package/dist/esm/components/text/text.stories.js +0 -34
  260. package/dist/esm/components/text/text.stories.js.map +0 -1
  261. package/dist/esm/exports/components.js +0 -2
  262. package/dist/esm/exports/components.js.map +0 -1
  263. package/dist/esm/exports/config.js +0 -3
  264. package/dist/esm/exports/config.js.map +0 -1
  265. package/dist/esm/exports/index.js +0 -4
  266. package/dist/esm/exports/index.js.map +0 -1
  267. package/dist/esm/exports/themes.js +0 -2
  268. package/dist/esm/exports/themes.js.map +0 -1
  269. package/dist/types/components/buttons/buttons.stories.d.ts +0 -7
  270. package/dist/types/components/buttons/buttons.stories.d.ts.map +0 -1
  271. package/dist/types/components/lists/lists.stories.d.ts +0 -27
  272. package/dist/types/components/lists/lists.stories.d.ts.map +0 -1
  273. package/dist/types/components/loading/loading.stories.d.ts +0 -4
  274. package/dist/types/components/loading/loading.stories.d.ts.map +0 -1
  275. package/dist/types/components/text/text.stories.d.ts +0 -5
  276. package/dist/types/components/text/text.stories.d.ts.map +0 -1
  277. package/dist/types/exports/components.d.ts +0 -2
  278. package/dist/types/exports/components.d.ts.map +0 -1
  279. package/dist/types/exports/config.d.ts +0 -3
  280. package/dist/types/exports/config.d.ts.map +0 -1
  281. package/dist/types/exports/index.d.ts +0 -5
  282. package/dist/types/exports/index.d.ts.map +0 -1
  283. package/dist/types/exports/themes.d.ts +0 -2
  284. package/dist/types/exports/themes.d.ts.map +0 -1
  285. package/src/components/index.ts +0 -6
  286. package/src/components/modals/index.ts +0 -3
  287. package/src/config.ts +0 -29
  288. package/src/exports/components.ts +0 -1
  289. package/src/exports/config.ts +0 -2
  290. package/src/exports/index.ts +0 -7
  291. package/src/exports/themes.ts +0 -1
  292. package/src/index.ts +0 -0
  293. package/src/themes/types.ts +0 -35
@@ -0,0 +1,199 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState } from "react";
3
+ //@ts-expect-error import error
4
+ import { QRCode } from "react-qr-code";
5
+ import { styled } from "styled-components";
6
+ import { confirmPayment } from "../../../api/payments.js";
7
+ import { useModalWithView, StyledButton, Text, ClipboardAddIcon, ClipboardCheckIcon, } from "../../../components/index.js";
8
+ import { useMintMoneyConfig } from "../../../context.js";
9
+ import { useCheckoutStore } from "../../../state/checkout/store.js";
10
+ import { ModalViewContainer } from "../../container.js";
11
+ import { ModalBackButton } from "../back.js";
12
+ const StepContainer = styled.div `
13
+ margin-bottom: 16px;
14
+ `;
15
+ const StepHeader = styled.div `
16
+ display: flex;
17
+ align-items: center;
18
+ margin-bottom: 8px;
19
+ `;
20
+ const StepNumber = styled.div `
21
+ background: ${({ theme }) => theme.btn.primary.default.backgroundColor || "#3b82f6"};
22
+ color: white;
23
+ min-width: 24px;
24
+ height: 24px;
25
+ border-radius: 50%;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ font-size: 12px;
30
+ font-weight: 600;
31
+ margin-right: 8px;
32
+ flex-shrink: 0;
33
+ `;
34
+ const StepTitle = styled.div `
35
+ font-size: 14px;
36
+ font-weight: 400;
37
+ color: ${({ theme }) => theme.font.color.primary};
38
+ line-height: 1.3;
39
+ `;
40
+ const QRCard = styled.div `
41
+ background: #f3f7fa;
42
+ border-radius: 12px;
43
+ padding: 16px 12px;
44
+ display: flex;
45
+ flex-direction: column;
46
+ align-items: center;
47
+ margin: 8px 0;
48
+ `;
49
+ const InfoRow = styled.div `
50
+ display: flex;
51
+ align-items: center;
52
+ background: #f3f7fa;
53
+ border-radius: 12px;
54
+ padding: 4px 8px;
55
+ margin: 4px 0 0 0;
56
+ cursor: pointer;
57
+ transition: all 0.2s ease-in-out;
58
+ border: 2px solid transparent;
59
+
60
+ &:hover {
61
+ background: #e8f2f7;
62
+ }
63
+
64
+ ${({ isCopied }) => isCopied &&
65
+ `
66
+ border-color: #10b981;
67
+ background: #f0fdf4;
68
+ animation: copySuccess 0.6s ease-in-out;
69
+ `}
70
+
71
+ @keyframes copySuccess {
72
+ 0% {
73
+ border-color: transparent;
74
+ }
75
+ 50% {
76
+ border-color: #10b981;
77
+ }
78
+ 100% {
79
+ border-color: #10b981;
80
+ }
81
+ }
82
+ `;
83
+ const AddressText = styled.div `
84
+ font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
85
+ font-size: 12px;
86
+ color: ${({ theme }) => theme.font.color.tertiary};
87
+ flex: 1;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ `;
91
+ const CopyButton = styled.button `
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ background: none;
96
+ border: none;
97
+ cursor: pointer;
98
+ padding: 4px;
99
+ border-radius: 4px;
100
+ transition: all 0.2s ease-in-out;
101
+
102
+ &:hover {
103
+ background-color: rgba(0, 0, 0, 0.05);
104
+ }
105
+
106
+ ${({ isCopied }) => isCopied &&
107
+ `
108
+ animation: iconBounce 0.6s ease-in-out;
109
+ `}
110
+
111
+ @keyframes iconBounce {
112
+ 0% {
113
+ transform: scale(1);
114
+ }
115
+ 25% {
116
+ transform: scale(1.2);
117
+ }
118
+ 50% {
119
+ transform: scale(0.9);
120
+ }
121
+ 75% {
122
+ transform: scale(1.1);
123
+ }
124
+ 100% {
125
+ transform: scale(1);
126
+ }
127
+ }
128
+ `;
129
+ const WarningCard = styled.div `
130
+ background: #fef3c7;
131
+ border: 1px solid #f59e0b;
132
+ border-radius: 12px;
133
+ padding: 16px;
134
+ margin: 8px 0;
135
+ text-align: center;
136
+ `;
137
+ const CryptoIntentDirectDetailsViewContent = () => {
138
+ const modalRef = useRef(null);
139
+ const { goToView } = useModalWithView();
140
+ const { cryptoPaymentAttempt, cryptoCurrency, payment } = useCheckoutStore();
141
+ const config = useMintMoneyConfig();
142
+ const [copiedAddress, setCopiedAddress] = useState(false);
143
+ const [copiedAmount, setCopiedAmount] = useState(false);
144
+ const [hasAcknowledged, setHasAcknowledged] = useState(false);
145
+ const handleConfirm = async () => {
146
+ if (!payment?.id) {
147
+ goToView("failed", { reason: "confirm_payment" });
148
+ return;
149
+ }
150
+ try {
151
+ await confirmPayment(payment.id);
152
+ goToView("paymentStatus");
153
+ }
154
+ catch (error) {
155
+ console.error("Failed to confirm payment:", error);
156
+ goToView("failed", { reason: "confirm_payment" });
157
+ }
158
+ };
159
+ if (!cryptoPaymentAttempt || !cryptoCurrency) {
160
+ return null;
161
+ }
162
+ const settlementCurrency = cryptoCurrency;
163
+ if (!settlementCurrency)
164
+ return null;
165
+ const amount = payment?.amount;
166
+ const currency = settlementCurrency.asset_name;
167
+ const chain = settlementCurrency.chain_name;
168
+ const copyToClipboard = async (value, setCopied) => {
169
+ try {
170
+ await navigator.clipboard.writeText(value);
171
+ setCopied(true);
172
+ setTimeout(() => setCopied(false), 2000); // Reset after 2 seconds
173
+ }
174
+ catch (error) {
175
+ console.error("Failed to copy to clipboard:", error);
176
+ }
177
+ };
178
+ // Show initial warning state
179
+ if (!hasAcknowledged) {
180
+ return (_jsxs(ModalViewContainer, { ref: modalRef, children: [_jsxs(WarningCard, { children: [_jsx(Text, { size: "base", weight: "medium", color: config.theme.font.color.primary, style: { marginBottom: 12 }, children: "\u26A0\uFE0F Important" }), _jsx(Text, { size: "sm", weight: "normal", color: config.theme.font.color.secondary, style: { lineHeight: 1.5 }, children: "Please ensure you are using the correct chain and currency and send the exact amount otherwise your transaction will fail." })] }), _jsx(StyledButton, { onClick: () => setHasAcknowledged(true), variant: "primary", style: { marginTop: 8 }, children: "I understand" }), _jsx(ModalBackButton, { view: "cryptoIntent" })] }));
181
+ }
182
+ return (_jsxs(ModalViewContainer, { ref: modalRef, children: [_jsxs(StepContainer, { children: [_jsxs(StepHeader, { children: [_jsx(StepNumber, { theme: config.theme, children: "1" }), _jsx(StepTitle, { theme: config.theme, children: "Scan QR code or copy wallet address" })] }), _jsx(QRCard, { children: _jsx(QRCode, { value: cryptoPaymentAttempt.destination_address, size: 120 }) }), _jsxs(InfoRow, { isCopied: copiedAddress, onClick: () => copyToClipboard(cryptoPaymentAttempt.destination_address, setCopiedAddress).catch((error) => {
183
+ console.error("Failed to copy address:", error);
184
+ }), title: "Click to copy address", children: [_jsx(AddressText, { theme: config.theme, children: cryptoPaymentAttempt.destination_address }), _jsx("span", { style: { marginLeft: 8 }, children: _jsx(CopyButton, { isCopied: copiedAddress, onClick: (e) => {
185
+ e.stopPropagation();
186
+ copyToClipboard(cryptoPaymentAttempt.destination_address, setCopiedAddress).catch((error) => {
187
+ console.error("Failed to copy address:", error);
188
+ });
189
+ }, title: "Copy address", children: copiedAddress ? (_jsx(ClipboardCheckIcon, { size: 16 })) : (_jsx(ClipboardAddIcon, { size: 16 })) }) })] })] }), _jsxs(StepContainer, { children: [_jsxs(StepHeader, { children: [_jsx(StepNumber, { theme: config.theme, children: "2" }), _jsxs(StepTitle, { theme: config.theme, children: ["Send the exact amount in ", _jsx("strong", { children: currency }), " on", " ", _jsx("strong", { children: chain })] })] }), _jsxs(InfoRow, { isCopied: copiedAmount, onClick: () => copyToClipboard(`${amount}`, setCopiedAmount).catch((error) => {
190
+ console.error("Failed to copy amount:", error);
191
+ }), title: "Click to copy amount", style: { justifyContent: "space-between" }, children: [_jsxs(Text, { size: "base", weight: "bold", color: config.theme.font.color.primary, children: [amount, " ", currency] }), _jsx("span", { style: { marginLeft: 8 }, children: _jsx(CopyButton, { isCopied: copiedAmount, onClick: (e) => {
192
+ e.stopPropagation();
193
+ copyToClipboard(`${amount}`, setCopiedAmount).catch((error) => {
194
+ console.error("Failed to copy amount:", error);
195
+ });
196
+ }, title: "Copy amount", children: copiedAmount ? (_jsx(ClipboardCheckIcon, { size: 16 })) : (_jsx(ClipboardAddIcon, { size: 16 })) }) })] })] }), _jsx(StyledButton, { onClick: handleConfirm, variant: "primary", style: { marginTop: 8 }, children: "Confirm" }), _jsx(ModalBackButton, { view: "cryptoIntent" })] }));
197
+ };
198
+ export { CryptoIntentDirectDetailsViewContent };
199
+ //# sourceMappingURL=direct-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direct-details.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/direct-details.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,+BAA+B;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAA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ACD,KAAK,EAAC,aAAa,YAElB,YAAY,CAAC,CAAC,CAAC,CACd,KAAC,kBAAkB,IAAC,IAAI,EAAE,EAAE,GAAI,CACjC,CAAC,CAAC,CAAC,CACF,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,CAC/B,GACU,GACR,IACC,IACI,EAEhB,KAAC,YAAY,IACX,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,wBAGV,EAEf,KAAC,eAAe,IAAC,IAAI,EAAC,cAAc,GAAG,IACpB,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,oCAAoC,EAAE,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import { styled } from "styled-components";
4
+ import { StyledButton } from "../../../components/buttons/index.js";
5
+ import { useModalWithView, Text } from "../../../components/index.js";
6
+ import { useMintMoneyConfig } from "../../../context.js";
7
+ import { useCheckoutStore, createCheckoutCryptoPaymentAttempt, } from "../../../state/checkout/store.js";
8
+ import { ModalViewContainer } from "../../container.js";
9
+ const OptionContainer = styled.div `
10
+ background-color: #f9fafb;
11
+ border-radius: 16px;
12
+ padding: 12px;
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 16px;
16
+ `;
17
+ const OptionsContainer = styled.div `
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 16px;
21
+ `;
22
+ const Option = ({ icon, text, buttonLabel, onClick, buttonVariant = "primary", buttonSize = "small", }) => {
23
+ const { theme } = useMintMoneyConfig();
24
+ return (_jsxs(OptionContainer, { children: [icon && _jsx("div", { style: { flexShrink: 0 }, children: icon }), _jsxs("div", { style: { flex: 1, textAlign: icon ? "left" : "center" }, children: [_jsx(Text, { size: "sm", color: theme.font.color.primary, weight: "medium", style: { marginBottom: 8, textAlign: icon ? "left" : "center" }, children: text }), _jsx(StyledButton, { onClick: onClick, variant: buttonVariant, size: buttonSize, theme: theme, children: buttonLabel })] })] }));
25
+ };
26
+ const CryptoIntentViewContent = () => {
27
+ const modalRef = useRef(null);
28
+ const { goToView } = useModalWithView();
29
+ const { cryptoCurrency } = useCheckoutStore();
30
+ // Get the settlement currency (single currency object)
31
+ const settlementCurrency = cryptoCurrency;
32
+ const handleWalletClick = () => {
33
+ goToView("cryptoIntentSelectWallet");
34
+ };
35
+ const handleDirectPaymentClick = async () => {
36
+ if (settlementCurrency) {
37
+ try {
38
+ await createCheckoutCryptoPaymentAttempt(settlementCurrency);
39
+ goToView("cryptoIntentDirectDetails");
40
+ }
41
+ catch (error) {
42
+ goToView("failure");
43
+ console.error(error);
44
+ }
45
+ }
46
+ };
47
+ return (_jsx(ModalViewContainer, { ref: modalRef, children: _jsxs(OptionsContainer, { children: [_jsx(Option, { text: "For a wider range of payment options", buttonLabel: "Connect Wallet", onClick: handleWalletClick, buttonVariant: "primary", buttonSize: "small" }), _jsx(Option, { text: settlementCurrency
48
+ ? `In ${settlementCurrency.asset_name} on ${settlementCurrency.chain_name}`
49
+ : "Direct Payment", buttonLabel: "Direct Payment", onClick: handleDirectPaymentClick, buttonVariant: "primary", buttonSize: "small" })] }) }));
50
+ };
51
+ export { CryptoIntentViewContent };
52
+ //# sourceMappingURL=methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/methods.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,kCAA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
3
+ import { styled } from "styled-components";
4
+ import { PaymentStatus } from "../../../api/types.js";
5
+ import { useModalWithView, Loader, Text } from "../../../components/index.js";
6
+ import { useMintMoneyConfig } from "../../../context.js";
7
+ import { useCheckoutStore, startPaymentPolling, stopPaymentPolling, isTestMode, } from "../../../state/checkout/store.js";
8
+ const Container = styled("div") `
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ gap: 1.5rem;
14
+ padding: 1rem;
15
+ margin: 0 auto;
16
+ `;
17
+ const CryptoIntentPaymentStatusViewContent = () => {
18
+ const { goToView } = useModalWithView();
19
+ const config = useMintMoneyConfig();
20
+ const { payment } = useCheckoutStore();
21
+ const confirmationStatus = config.cryptoCheckoutConfig.paymentConfirmationStatus;
22
+ useEffect(() => {
23
+ if (!payment || !isTestMode())
24
+ return;
25
+ if (payment.status === PaymentStatus.PAID ||
26
+ payment.status === confirmationStatus) {
27
+ goToView("paymentSuccess");
28
+ }
29
+ else if (payment.status === PaymentStatus.FAILED) {
30
+ goToView("failed");
31
+ }
32
+ }, [payment?.id, payment?.status, goToView, confirmationStatus]);
33
+ useEffect(() => {
34
+ if (!payment)
35
+ return;
36
+ if (isTestMode())
37
+ return;
38
+ const poller = startPaymentPolling((status) => {
39
+ if (status === PaymentStatus.PAID || status === confirmationStatus) {
40
+ goToView("paymentSuccess");
41
+ }
42
+ else if (status === PaymentStatus.FAILED) {
43
+ goToView("failed");
44
+ }
45
+ }, confirmationStatus);
46
+ return () => {
47
+ poller.stop();
48
+ stopPaymentPolling();
49
+ };
50
+ }, [payment?.id, goToView, confirmationStatus]);
51
+ return (_jsxs(Container, { children: [_jsx(Loader, { asChild: true }), _jsx(Text, { size: "base", color: config.theme.font.color.tertiary, children: "Waiting for payment confirmation..." })] }));
52
+ };
53
+ export { CryptoIntentPaymentStatusViewContent };
54
+ //# sourceMappingURL=processing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processing.js","sourceRoot":"","sources":["../../../../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AEjE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,IAAI,UAAU,EAAE;YAAE,OAAO;QAEzB,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5C,IAAI,MAAM,KAAK,aAAa,CAAC,IAAI,IAAI,MAAM,KAAK,kBAAkB,EAAE,CAAC;gBACnE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;YAC7B,CAAC;iBAAM,IAAI,MAAM,KAAK,aAAa,CAAC,MAAM,EAAE,CAAC;gBAC3C,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,EAAE,kBAAkB,CAAC,CAAC;QAEvB,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,IAAI,EAAE,CAAC;YACd,kBAAkB,EAAE,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEhD,OAAO,CACL,MAAC,SAAS,eACR,KAAC,MAAM,IAAC,OAAO,SAAG,EAClB,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,oDAElD,IACG,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,oCAAoC,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import { styled } from "styled-components";
4
+ import { StyledButton, CheckMarkIcon, useModalWithView, } from "../../../components/index.js";
5
+ import { useCheckoutStore } from "../../../state/checkout/store.js";
6
+ import { ModalViewContainer } from "../../container.js";
7
+ const Container = styled.div `
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: stretch;
11
+ gap: 1rem;
12
+ `;
13
+ const CheckmarkContainer = styled.div `
14
+ display: flex;
15
+ justify-content: center;
16
+ `;
17
+ const CryptoIntentPaymentSuccessViewContent = ({ onClose, onSuccess, }) => {
18
+ const { goToView } = useModalWithView();
19
+ const { payment } = useCheckoutStore();
20
+ useEffect(() => {
21
+ const handleSuccess = async () => {
22
+ if (onSuccess && payment?.id) {
23
+ try {
24
+ await onSuccess(payment.id);
25
+ onClose(false);
26
+ }
27
+ catch (error) {
28
+ console.error("Error in onSuccess callback:", error);
29
+ }
30
+ }
31
+ };
32
+ void handleSuccess();
33
+ }, [onSuccess, payment?.id, onClose]);
34
+ const handleClose = () => {
35
+ goToView("initial");
36
+ onClose(false);
37
+ };
38
+ return (_jsx(ModalViewContainer, { children: _jsxs(Container, { children: [_jsx(CheckmarkContainer, { children: _jsx(CheckMarkIcon, { size: 64 }) }), _jsx(StyledButton, { variant: "primary", onClick: handleClose, children: "Complete" })] }) }));
39
+ };
40
+ export { CryptoIntentPaymentSuccessViewContent };
41
+ //# sourceMappingURL=success.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"success.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/success.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOxD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGpC,CAAC;AAEF,MAAM,qCAAqC,GAAG,CAAC,EAC7C,OAAO,EACP,SAAS,GACH,EAAE,EAAE;IACV,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACxC,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEvC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;YAC/B,IAAI,SAAS,IAAI,OAAO,EAAE,EAAE,EAAE,CAAC;gBAC7B,IAAI,CAAC;oBACH,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;oBAC5B,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;gBACvD,CAAC;YACH,CAAC;QACH,CAAC,CAAC;QAEF,KAAK,aAAa,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtC,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,kBAAkB,cACjB,MAAC,SAAS,eACR,KAAC,kBAAkB,cACjB,KAAC,aAAa,IAAC,IAAI,EAAE,EAAE,GAAI,GACR,EACrB,KAAC,YAAY,IAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,yBAEvC,IACL,GACO,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,qCAAqC,EAAE,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import { AsyncButton } from "../../../components/buttons/async-button.js";
4
+ import { useModalWithView, Text } from "../../../components/index.js";
5
+ import { useMintMoneyConfig } from "../../../context.js";
6
+ import { createSuccessfulTestPaymentAttempt, createFailedTestPaymentAttempt, } from "../../../state/checkout/store.js";
7
+ import { ModalViewContainer } from "../../container.js";
8
+ const TestPayment = () => {
9
+ const modalRef = useRef(null);
10
+ const { goToView } = useModalWithView();
11
+ const config = useMintMoneyConfig();
12
+ const handleSuccess = async () => {
13
+ try {
14
+ await createSuccessfulTestPaymentAttempt();
15
+ goToView("paymentStatus");
16
+ }
17
+ catch (error) {
18
+ goToView("failed", { reason: "test_success" });
19
+ console.error("Failed to create test payment attempt:", error);
20
+ }
21
+ };
22
+ const handleFailure = async () => {
23
+ try {
24
+ await createFailedTestPaymentAttempt();
25
+ goToView("paymentStatus");
26
+ }
27
+ catch (error) {
28
+ goToView("failed", { reason: "test_failure" });
29
+ console.error("Failed to create test payment attempt:", error);
30
+ }
31
+ };
32
+ return (_jsxs(ModalViewContainer, { ref: modalRef, children: [_jsx(Text, { size: "xl", weight: "semibold", style: { marginBottom: 8 }, color: config.theme.font.color.primary, children: "Test Payment Status" }), _jsx(Text, { size: "base", color: config.theme.font.color.secondary, style: { marginBottom: 24 }, children: "This is a test payment, you can manually specify the status" }), _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [_jsx(AsyncButton, { onAsyncClick: handleSuccess, children: "Success" }), _jsx(AsyncButton, { onAsyncClick: handleFailure, children: "Failed" })] })] }));
33
+ };
34
+ export { TestPayment };
35
+ //# sourceMappingURL=test-payment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-payment.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/test-payment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,kCAAkC,EAClC,8BAA8B,GAC/B,MAAM,kCAAkC,C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KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACxC,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,4EAGtB,EACP,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,KAAC,WAAW,IAAC,YAAY,EAAE,aAAa,wBAAuB,EAC/D,KAAC,WAAW,IAAC,YAAY,EAAE,aAAa,uBAAsB,IAC1D,IACa,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getChainId, switchChain } from "@wagmi/core";
3
+ import { useContext, useMemo, useRef } from "react";
4
+ import { useConfig } from "wagmi";
5
+ import { Text, useModalWithView } from "../../../components/index.js";
6
+ import WalletSelector from "../../../components/wallet-selector/component.js";
7
+ import { WagmiWallets, } from "../../../components/wallet-selector/index.js";
8
+ import { WalletContext } from "../../../components/wallet-selector/provider.js";
9
+ import { useWalletActions } from "../../../components/wallet-selector/store.js";
10
+ import { useMintMoneyConfig } from "../../../context.js";
11
+ import { useCheckoutStore } from "../../../state/checkout/store.js";
12
+ import { ModalViewContainer } from "../../container.js";
13
+ const CryptoIntentSelectWalletViewContent = () => {
14
+ const modalRef = useRef(null);
15
+ const config = useMintMoneyConfig();
16
+ const wagmiConfig = useConfig();
17
+ const { goToView } = useModalWithView();
18
+ const { setWallet } = useContext(WalletContext);
19
+ const { initialiseWallets } = useWalletActions();
20
+ const { checkout } = useCheckoutStore();
21
+ const providers = useMemo(() => [WagmiWallets(wagmiConfig)], [wagmiConfig]);
22
+ const getSettlementChainId = () => {
23
+ const caip2 = checkout?.checkout_config?.crypto?.settlementConfig?.chain;
24
+ if (!caip2)
25
+ return undefined;
26
+ const parts = caip2.split(":");
27
+ if (parts.length !== 2)
28
+ return undefined;
29
+ const chainId = Number(parts[1]);
30
+ return Number.isFinite(chainId) ? chainId : undefined;
31
+ };
32
+ const handleConfirm = async (wallet) => {
33
+ try {
34
+ const chainId = getSettlementChainId();
35
+ const address = await wallet.connect(chainId);
36
+ if (address) {
37
+ if (chainId) {
38
+ try {
39
+ await switchChain(wagmiConfig, { chainId });
40
+ const activeChainId = getChainId(wagmiConfig);
41
+ if (activeChainId !== chainId) {
42
+ throw new Error("wallet did not switch chains");
43
+ }
44
+ }
45
+ catch (error) {
46
+ console.error("[WalletSelect] Failed to switch chain:", error);
47
+ goToView("failed", { reason: "switch_chain" });
48
+ return;
49
+ }
50
+ }
51
+ setWallet(wallet);
52
+ initialiseWallets([() => wallet]);
53
+ goToView("cryptoIntentSelectCurrency");
54
+ }
55
+ }
56
+ catch (error) {
57
+ console.error("[WalletSelect] Failed to connect wallet:", error);
58
+ }
59
+ };
60
+ return (_jsxs(ModalViewContainer, { ref: modalRef, children: [_jsx(Text, { size: "base", weight: "normal", color: config.theme.font.color.secondary, children: "Select a Wallet provider" }), _jsx(WalletSelector, { className: "mm-selectable-list__button-group", onWalletSelect: handleConfirm, walletProviders: providers })] }));
61
+ };
62
+ export { CryptoIntentSelectWalletViewContent };
63
+ //# sourceMappingURL=wallet-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-select.js","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/wallet-select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,cAAc,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EACL,YAAY,GAEb,MAAM,8C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Q,EACf,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,yCAGnC,EACP,KAAC,cAAc,IACb,SAAS,EAAC,kCAAkC,EAC5C,cAAc,EAAE,aAAa,EAC7B,eAAe,EAAE,SAAS,GAC1B,IACiB,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,mCAAmC,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { styled } from "styled-components";
3
+ import { AlertCircleIcon } from "../../components/icons/alert.js";
4
+ import { useModalWithView } from "../../components/modals/use-modal-with-views.js";
5
+ import { Text } from "../../components/text/index.js";
6
+ const FailedContainer = styled.div `
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: center;
10
+ justify-content: center;
11
+ padding: 2rem 1rem;
12
+ text-align: center;
13
+ flex: 1;
14
+ `;
15
+ const IconContainer = styled.div `
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ margin-bottom: 1rem;
20
+ `;
21
+ export const FailedViewContent = () => {
22
+ const { viewProps } = useModalWithView();
23
+ const reason = viewProps.reason;
24
+ return (_jsxs(FailedContainer, { children: [_jsx(IconContainer, { children: _jsx(AlertCircleIcon, { size: 32, color: "#ef4444" }) }), _jsx(Text, { size: "lg", weight: "semibold", color: "#111827", style: { marginBottom: "0.5rem" }, children: "Payment Failed" }), reason && (_jsx(Text, { size: "sm", color: "#6b7280", style: { maxWidth: "16rem" }, children: reason }))] }));
25
+ };
26
+ //# sourceMappingURL=failed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failed.js","sourceRoot":"","sources":["../../../../src/checkout/views/failed.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAEtD,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQjC,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK/B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,SAAS,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAgB,CAAC;IAE1C,OAAO,CACL,MAAC,eAAe,eACd,KAAC,aAAa,cACZ,KAAC,eAAe,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,SAAS,GAAG,GAC/B,EAEhB,KAAC,IAAI,IACH,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,UAAU,EACjB,KAAK,EAAC,SAAS,EACf,KAAK,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,+BAG5B,EAEN,MAAM,IAAI,CACT,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,YACzD,MAAM,GACF,CACR,IACe,CACnB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { useModalWithView } from "../../../components/modals/use-modal-with-views.js";
4
+ import { InstaXchangePayment } from "../../../integrations/instaxchange.js";
5
+ import { useCheckoutStore, createCheckoutFiatPaymentAttempt, ACTIONS, } from "../../../state/checkout/store.js";
6
+ import { ModalViewContainer } from "../../container.js";
7
+ export const BankIntentViewContent = () => {
8
+ const { payment, fiatPaymentAttempt, error, loading } = useCheckoutStore();
9
+ const { goToView } = useModalWithView();
10
+ const [initialised, setInitialised] = useState(false);
11
+ useEffect(() => {
12
+ if (!initialised && payment) {
13
+ setInitialised(true);
14
+ void createCheckoutFiatPaymentAttempt("bank");
15
+ }
16
+ }, [initialised, payment]);
17
+ useEffect(() => {
18
+ if (!payment) {
19
+ goToView("failed", { reason: "Payment not found" });
20
+ }
21
+ }, [payment, goToView]);
22
+ useEffect(() => {
23
+ if (error && error.CREATE_FIAT_PAYMENT_ATTEMPT) {
24
+ goToView("failed", { reason: error.CREATE_FIAT_PAYMENT_ATTEMPT });
25
+ }
26
+ }, [error, goToView]);
27
+ if (loading[ACTIONS.CREATE_FIAT_PAYMENT_ATTEMPT] || !fiatPaymentAttempt) {
28
+ return (_jsx(ModalViewContainer, { children: _jsxs("div", { className: "text-center py-8", children: [_jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900 mx-auto" }), _jsx("p", { className: "mt-2", children: "Creating bank payment..." })] }) }));
29
+ }
30
+ if (!payment) {
31
+ return null;
32
+ }
33
+ return (_jsx(ModalViewContainer, { children: _jsx(InstaXchangePayment, { onError: () => { }, clientParams: fiatPaymentAttempt.client_params }) }));
34
+ };
35
+ //# sourceMappingURL=bank-payment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bank-payment.js","sourceRoot":"","sources":["../../../../../src/checkout/views/fiat-intent/bank-payment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAChB,gCAAgC,EAChC,OAAO,GACR,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,gB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IAClB,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,EACjB,YAAY,EAAE,kBAAkB,CAAC,aAAa,GAC9C,GACiB,CACtB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { Loader, useModalWithView } from "../../components/index.js";
4
+ import { ACTIONS, initialiseStore, useCheckoutStore, } from "../../state/checkout/store.js";
5
+ const InitialiseCheckoutViewContent = (props) => {
6
+ const { goToView } = useModalWithView();
7
+ const { error, checkout, payment } = useCheckoutStore();
8
+ const [loading, setLoading] = useState(true);
9
+ useEffect(() => {
10
+ const setup = async () => {
11
+ await initialiseStore(props.payment);
12
+ };
13
+ void setup();
14
+ const timeout = setTimeout(() => setLoading(false), 1500);
15
+ return () => clearTimeout(timeout);
16
+ }, [props.payment]);
17
+ useEffect(() => {
18
+ const hasErrors = error[ACTIONS.GET_CHECKOUT_CONFIG] || error[ACTIONS.CREATE_PAYMENT];
19
+ if (hasErrors) {
20
+ goToView("failed", { reason: "get_checkout" });
21
+ return;
22
+ }
23
+ if (checkout && payment && !loading) {
24
+ goToView("methods");
25
+ }
26
+ }, [error, checkout, payment, loading]);
27
+ return loading ? _jsx(Loader, {}) : null;
28
+ };
29
+ export { InitialiseCheckoutViewContent };
30
+ //# sourceMappingURL=initial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initial.js","sourceRoot":"","sources":["../../../../src/checkout/views/initial.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,OAAO,EACP,eAAe,EACf,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAMvC,MAAM,6BAA6B,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC5D,MAAM,EAAE,QAAQ,EAA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"react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import { useModalWithView, SelectableList } from "../../components/index.js";
4
+ import { useCheckoutStore, ACTIONS, setCheckoutMethod, isTestMode, } from "../../state/checkout/store.js";
5
+ import { ModalViewContainer } from "../container.js";
6
+ const MethodSelectViewContent = () => {
7
+ const { goToView } = useModalWithView();
8
+ const modalRef = useRef(null);
9
+ const { methods, loading } = useCheckoutStore();
10
+ const handleSelectMethod = (method) => {
11
+ setCheckoutMethod(method);
12
+ if (isTestMode()) {
13
+ // go to test payment view
14
+ goToView("cryptoTestPayment");
15
+ }
16
+ else {
17
+ goToView(method.intentName);
18
+ }
19
+ };
20
+ return (_jsx(ModalViewContainer, { ref: modalRef, children: _jsx(SelectableList, { title: "Select payment method", items: methods || [], getKey: (method) => method.name, getLabel: (method) => method.name, onSelect: handleSelectMethod, loading: loading[ACTIONS.GET_CHECKOUT_CONFIG] }) }));
21
+ };
22
+ export { MethodSelectViewContent };
23
+ //# sourceMappingURL=method-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method-select.js","sourceRoot":"","sources":["../../../../src/checkout/views/method-select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EACjB,UAAU,GACX,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEhD,MAAM,kBAAkB,GAAG,CAAC,MAA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