thirdweb 5.100.0-nightly-713ebe0a2d6d8a409e41ce0f0317fc34b1f221bb-20250520000414 → 5.100.1

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 (228) hide show
  1. package/dist/cjs/bridge/Buy.js +1 -1
  2. package/dist/cjs/bridge/Onramp.js +152 -0
  3. package/dist/cjs/bridge/Onramp.js.map +1 -0
  4. package/dist/cjs/bridge/OnrampStatus.js +78 -0
  5. package/dist/cjs/bridge/OnrampStatus.js.map +1 -0
  6. package/dist/cjs/bridge/Sell.js +1 -1
  7. package/dist/cjs/bridge/index.js +2 -1
  8. package/dist/cjs/bridge/index.js.map +1 -1
  9. package/dist/cjs/{react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js → bridge/types/BridgeAction.js} +1 -1
  10. package/dist/cjs/bridge/types/BridgeAction.js.map +1 -0
  11. package/dist/cjs/extensions/ens/resolve-l2-name.js +0 -2
  12. package/dist/cjs/extensions/ens/resolve-l2-name.js.map +1 -1
  13. package/dist/cjs/pay/buyWithFiat/getQuote.js +129 -33
  14. package/dist/cjs/pay/buyWithFiat/getQuote.js.map +1 -1
  15. package/dist/cjs/pay/buyWithFiat/getStatus.js +71 -20
  16. package/dist/cjs/pay/buyWithFiat/getStatus.js.map +1 -1
  17. package/dist/cjs/pay/utils/commonTypes.js +1 -1
  18. package/dist/cjs/pay/utils/commonTypes.js.map +1 -1
  19. package/dist/cjs/pay/utils/definitions.js +1 -13
  20. package/dist/cjs/pay/utils/definitions.js.map +1 -1
  21. package/dist/cjs/react/core/hooks/auth/useSiweAuth.js +1 -1
  22. package/dist/cjs/react/core/hooks/auth/useSiweAuth.js.map +1 -1
  23. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -3
  24. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
  25. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +42 -38
  26. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  27. package/dist/cjs/react/core/utils/wallet.js +15 -0
  28. package/dist/cjs/react/core/utils/wallet.js.map +1 -1
  29. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +1 -1
  30. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  31. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js +0 -9
  32. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
  33. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +1 -1
  34. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
  35. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +0 -177
  36. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  37. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +2 -10
  38. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -1
  39. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +5 -8
  40. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  41. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +0 -15
  42. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -1
  43. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js +0 -60
  44. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +1 -1
  45. package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js +133 -0
  46. package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js.map +1 -0
  47. package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js +4 -3
  48. package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -1
  49. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +9 -1
  50. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  51. package/dist/cjs/version.js +1 -1
  52. package/dist/cjs/version.js.map +1 -1
  53. package/dist/esm/bridge/Buy.js +1 -1
  54. package/dist/esm/bridge/Onramp.js +147 -0
  55. package/dist/esm/bridge/Onramp.js.map +1 -0
  56. package/dist/esm/bridge/OnrampStatus.js +75 -0
  57. package/dist/esm/bridge/OnrampStatus.js.map +1 -0
  58. package/dist/esm/bridge/Sell.js +1 -1
  59. package/dist/esm/bridge/index.js +1 -0
  60. package/dist/esm/bridge/index.js.map +1 -1
  61. package/dist/esm/bridge/types/BridgeAction.js +2 -0
  62. package/dist/esm/bridge/types/BridgeAction.js.map +1 -0
  63. package/dist/esm/extensions/ens/resolve-l2-name.js +0 -2
  64. package/dist/esm/extensions/ens/resolve-l2-name.js.map +1 -1
  65. package/dist/esm/pay/buyWithFiat/getQuote.js +129 -33
  66. package/dist/esm/pay/buyWithFiat/getQuote.js.map +1 -1
  67. package/dist/esm/pay/buyWithFiat/getStatus.js +71 -20
  68. package/dist/esm/pay/buyWithFiat/getStatus.js.map +1 -1
  69. package/dist/esm/pay/utils/commonTypes.js +1 -1
  70. package/dist/esm/pay/utils/commonTypes.js.map +1 -1
  71. package/dist/esm/pay/utils/definitions.js +0 -10
  72. package/dist/esm/pay/utils/definitions.js.map +1 -1
  73. package/dist/esm/react/core/hooks/auth/useSiweAuth.js +1 -1
  74. package/dist/esm/react/core/hooks/auth/useSiweAuth.js.map +1 -1
  75. package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -3
  76. package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
  77. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +42 -38
  78. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  79. package/dist/esm/react/core/utils/wallet.js +15 -0
  80. package/dist/esm/react/core/utils/wallet.js.map +1 -1
  81. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +1 -1
  82. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  83. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js +0 -9
  84. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
  85. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +1 -1
  86. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
  87. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +4 -180
  88. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  89. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +2 -10
  90. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -1
  91. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +5 -8
  92. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  93. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +2 -16
  94. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -1
  95. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js +0 -59
  96. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +1 -1
  97. package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js +130 -0
  98. package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js.map +1 -0
  99. package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js +4 -3
  100. package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -1
  101. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +9 -1
  102. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  103. package/dist/esm/version.js +1 -1
  104. package/dist/esm/version.js.map +1 -1
  105. package/dist/types/bridge/Buy.d.ts +1 -1
  106. package/dist/types/bridge/Onramp.d.ts +123 -0
  107. package/dist/types/bridge/Onramp.d.ts.map +1 -0
  108. package/dist/types/bridge/OnrampStatus.d.ts +108 -0
  109. package/dist/types/bridge/OnrampStatus.d.ts.map +1 -0
  110. package/dist/types/bridge/Sell.d.ts +1 -1
  111. package/dist/types/bridge/index.d.ts +6 -3
  112. package/dist/types/bridge/index.d.ts.map +1 -1
  113. package/dist/types/bridge/types/BridgeAction.d.ts +2 -0
  114. package/dist/types/bridge/types/BridgeAction.d.ts.map +1 -0
  115. package/dist/types/bridge/types/Quote.d.ts +3 -65
  116. package/dist/types/bridge/types/Quote.d.ts.map +1 -1
  117. package/dist/types/bridge/types/Route.d.ts +35 -0
  118. package/dist/types/bridge/types/Route.d.ts.map +1 -1
  119. package/dist/types/bridge/types/Token.d.ts +1 -0
  120. package/dist/types/bridge/types/Token.d.ts.map +1 -1
  121. package/dist/types/extensions/ens/resolve-l2-name.d.ts.map +1 -1
  122. package/dist/types/pay/buyWithFiat/getQuote.d.ts.map +1 -1
  123. package/dist/types/pay/buyWithFiat/getStatus.d.ts +1 -12
  124. package/dist/types/pay/buyWithFiat/getStatus.d.ts.map +1 -1
  125. package/dist/types/pay/utils/commonTypes.d.ts +1 -1
  126. package/dist/types/pay/utils/commonTypes.d.ts.map +1 -1
  127. package/dist/types/pay/utils/definitions.d.ts +0 -10
  128. package/dist/types/pay/utils/definitions.d.ts.map +1 -1
  129. package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts.map +1 -1
  130. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +1 -0
  131. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  132. package/dist/types/react/core/utils/wallet.d.ts.map +1 -1
  133. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  134. package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts.map +1 -1
  135. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts +1 -30
  136. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
  137. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts +2 -0
  138. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts.map +1 -1
  139. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts +2 -0
  140. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts.map +1 -1
  141. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts +0 -5
  142. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +1 -1
  143. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.d.ts +1 -3
  144. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.d.ts.map +1 -1
  145. package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts +15 -0
  146. package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts.map +1 -0
  147. package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts.map +1 -1
  148. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +1 -0
  149. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
  150. package/dist/types/version.d.ts +1 -1
  151. package/dist/types/version.d.ts.map +1 -1
  152. package/package.json +15 -15
  153. package/src/bridge/Buy.ts +1 -1
  154. package/src/bridge/Onramp.test.ts +118 -0
  155. package/src/bridge/Onramp.ts +244 -0
  156. package/src/bridge/OnrampStatus.ts +133 -0
  157. package/src/bridge/Sell.ts +1 -1
  158. package/src/bridge/index.ts +11 -3
  159. package/src/bridge/types/BridgeAction.ts +1 -0
  160. package/src/bridge/types/Quote.ts +3 -65
  161. package/src/bridge/types/Route.ts +39 -0
  162. package/src/bridge/types/Token.ts +1 -0
  163. package/src/extensions/ens/resolve-l2-name.ts +0 -2
  164. package/src/pay/buyWithFiat/getQuote.ts +184 -33
  165. package/src/pay/buyWithFiat/getStatus.ts +101 -42
  166. package/src/pay/convert/cryptoToFiat.test.ts +7 -5
  167. package/src/pay/convert/fiatToCrypto.test.ts +6 -4
  168. package/src/pay/utils/commonTypes.ts +1 -1
  169. package/src/pay/utils/definitions.ts +0 -14
  170. package/src/react/core/hooks/auth/useSiweAuth.ts +1 -1
  171. package/src/react/core/hooks/pay/useBuyWithFiatStatus.ts +0 -2
  172. package/src/react/core/hooks/transaction/useSendTransaction.ts +48 -41
  173. package/src/react/core/utils/wallet.ts +15 -0
  174. package/src/react/web/hooks/transaction/useSendTransaction.tsx +1 -0
  175. package/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx +0 -53
  176. package/src/react/web/ui/ConnectWallet/locale/en.ts +1 -1
  177. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +3 -510
  178. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx +2 -12
  179. package/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts +2 -0
  180. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts +19 -20
  181. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.tsx +1 -37
  182. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.test.ts +1 -95
  183. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.ts +0 -69
  184. package/src/react/web/ui/TransactionButton/DepositScreen.tsx +295 -0
  185. package/src/react/web/ui/TransactionButton/ExecutingScreen.tsx +4 -3
  186. package/src/react/web/ui/TransactionButton/TransactionModal.tsx +20 -1
  187. package/src/version.ts +1 -1
  188. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +0 -37
  189. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +0 -1
  190. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js +0 -86
  191. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js.map +0 -1
  192. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js +0 -25
  193. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js.map +0 -1
  194. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js +0 -81
  195. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +0 -1
  196. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js +0 -17
  197. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +0 -1
  198. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +0 -1
  199. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +0 -34
  200. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +0 -1
  201. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js +0 -83
  202. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.js.map +0 -1
  203. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js +0 -22
  204. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.js.map +0 -1
  205. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js +0 -78
  206. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +0 -1
  207. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js +0 -14
  208. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +0 -1
  209. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js +0 -2
  210. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +0 -1
  211. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts +0 -26
  212. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts.map +0 -1
  213. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.d.ts +0 -16
  214. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.d.ts.map +0 -1
  215. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.d.ts +0 -23
  216. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.d.ts.map +0 -1
  217. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.d.ts +0 -14
  218. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.d.ts.map +0 -1
  219. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.d.ts +0 -14
  220. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.d.ts.map +0 -1
  221. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.d.ts +0 -10
  222. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.d.ts.map +0 -1
  223. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +0 -142
  224. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.tsx +0 -170
  225. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwapFlow.tsx +0 -63
  226. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx +0 -138
  227. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.tsx +0 -45
  228. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.ts +0 -12
@@ -13,50 +13,14 @@ import {
13
13
  useChainExplorers,
14
14
  useChainName,
15
15
  } from "../../../../../../core/hooks/others/useChainQuery.js";
16
- import { useBuyWithCryptoStatus } from "../../../../../../core/hooks/pay/useBuyWithCryptoStatus.js";
17
16
  import { Spacer } from "../../../../components/Spacer.js";
18
- import { Container, Line, ModalHeader } from "../../../../components/basic.js";
17
+ import { Container, Line } from "../../../../components/basic.js";
19
18
  import { ButtonLink } from "../../../../components/buttons.js";
20
19
  import { Text } from "../../../../components/text.js";
21
20
  import { WalletRow } from "../swap/WalletRow.js";
22
21
  import { TokenInfoRow } from "./TokenInfoRow.js";
23
22
  import { type StatusMeta, getBuyWithCryptoStatusMeta } from "./statusMeta.js";
24
23
 
25
- export function SwapDetailsScreen(props: {
26
- status: ValidBuyWithCryptoStatus;
27
- onBack: () => void;
28
- client: ThirdwebClient;
29
- }) {
30
- const { status: initialStatus, client } = props;
31
- const statusQuery = useBuyWithCryptoStatus(
32
- initialStatus.source?.transactionHash
33
- ? {
34
- client: client,
35
- transactionHash: initialStatus.source.transactionHash,
36
- chainId: initialStatus.source.token.chainId,
37
- }
38
- : undefined,
39
- );
40
-
41
- const status: ValidBuyWithCryptoStatus =
42
- (statusQuery.data?.status !== "NOT_FOUND" ? statusQuery.data : undefined) ||
43
- initialStatus;
44
-
45
- return (
46
- <Container>
47
- <Container p="lg">
48
- <ModalHeader title="Transaction Details" onBack={props.onBack} />
49
- </Container>
50
-
51
- <Line />
52
-
53
- <Container p="lg">
54
- <SwapTxDetailsTable type="status" status={status} client={client} />
55
- </Container>
56
- </Container>
57
- );
58
- }
59
-
60
24
  type SwapTxDetailsData = {
61
25
  fromToken: {
62
26
  chainId: number;
@@ -1,10 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import type { BuyWithCryptoStatus } from "../../../../../../../pay/buyWithCrypto/getStatus.js";
3
- import type { BuyWithFiatStatus } from "../../../../../../../pay/buyWithFiat/getStatus.js";
4
- import {
5
- getBuyWithCryptoStatusMeta,
6
- getBuyWithFiatStatusMeta,
7
- } from "./statusMeta.js";
3
+ import { getBuyWithCryptoStatusMeta } from "./statusMeta.js";
8
4
 
9
5
  describe("getBuyWithCryptoStatusMeta", () => {
10
6
  it('returns "Unknown" for NOT_FOUND status', () => {
@@ -82,93 +78,3 @@ describe("getBuyWithCryptoStatusMeta", () => {
82
78
  });
83
79
  });
84
80
  });
85
-
86
- describe("getBuyWithFiatStatusMeta", () => {
87
- it('returns "Incomplete" for CRYPTO_SWAP_FALLBACK status', () => {
88
- const result = getBuyWithFiatStatusMeta({
89
- status: "CRYPTO_SWAP_FALLBACK",
90
- } as BuyWithFiatStatus);
91
- expect(result).toEqual({
92
- status: "Incomplete",
93
- color: "danger",
94
- step: 2,
95
- progressStatus: "partialSuccess",
96
- });
97
- });
98
-
99
- it('returns "Pending" for CRYPTO_SWAP_IN_PROGRESS status', () => {
100
- const result = getBuyWithFiatStatusMeta({
101
- status: "CRYPTO_SWAP_IN_PROGRESS",
102
- } as BuyWithFiatStatus);
103
- expect(result).toEqual({
104
- status: "Pending",
105
- color: "accentText",
106
- loading: true,
107
- step: 2,
108
- progressStatus: "pending",
109
- });
110
- });
111
-
112
- it('returns "Pending" for PENDING_ON_RAMP_TRANSFER status', () => {
113
- const result = getBuyWithFiatStatusMeta({
114
- status: "PENDING_ON_RAMP_TRANSFER",
115
- } as BuyWithFiatStatus);
116
- expect(result).toEqual({
117
- status: "Pending",
118
- color: "accentText",
119
- loading: true,
120
- step: 1,
121
- progressStatus: "pending",
122
- });
123
- });
124
-
125
- it('returns "Completed" for ON_RAMP_TRANSFER_COMPLETED status', () => {
126
- const result = getBuyWithFiatStatusMeta({
127
- status: "ON_RAMP_TRANSFER_COMPLETED",
128
- } as BuyWithFiatStatus);
129
- expect(result).toEqual({
130
- status: "Completed",
131
- color: "success",
132
- loading: true,
133
- step: 1,
134
- progressStatus: "completed",
135
- });
136
- });
137
-
138
- it('returns "Action Required" for CRYPTO_SWAP_REQUIRED status', () => {
139
- const result = getBuyWithFiatStatusMeta({
140
- status: "CRYPTO_SWAP_REQUIRED",
141
- } as BuyWithFiatStatus);
142
- expect(result).toEqual({
143
- status: "Action Required",
144
- color: "accentText",
145
- step: 2,
146
- progressStatus: "actionRequired",
147
- });
148
- });
149
-
150
- it('returns "Failed" for PAYMENT_FAILED status', () => {
151
- const result = getBuyWithFiatStatusMeta({
152
- status: "PAYMENT_FAILED",
153
- } as BuyWithFiatStatus);
154
- expect(result).toEqual({
155
- status: "Failed",
156
- color: "danger",
157
- step: 1,
158
- progressStatus: "failed",
159
- });
160
- });
161
-
162
- it('returns "Unknown" for unhandled status', () => {
163
- const result = getBuyWithFiatStatusMeta({
164
- // @ts-ignore
165
- status: "UNKNOWN_STATUS",
166
- });
167
- expect(result).toEqual({
168
- status: "Unknown",
169
- color: "secondaryText",
170
- step: 1,
171
- progressStatus: "unknown",
172
- });
173
- });
174
- });
@@ -1,5 +1,4 @@
1
1
  import type { BuyWithCryptoStatus } from "../../../../../../../pay/buyWithCrypto/getStatus.js";
2
- import type { BuyWithFiatStatus } from "../../../../../../../pay/buyWithFiat/getStatus.js";
3
2
  import type { Theme } from "../../../../../../core/design-system/index.js";
4
3
 
5
4
  export type StatusMeta = {
@@ -74,73 +73,5 @@ export type FiatStatusMeta = {
74
73
  | "completed"
75
74
  | "failed"
76
75
  | "actionRequired"
77
- | "partialSuccess"
78
76
  | "unknown";
79
77
  };
80
- export function getBuyWithFiatStatusMeta(
81
- fiatStatus: BuyWithFiatStatus,
82
- ): FiatStatusMeta {
83
- const status = fiatStatus.status;
84
-
85
- switch (status) {
86
- case "CRYPTO_SWAP_FALLBACK": {
87
- return {
88
- status: "Incomplete",
89
- color: "danger",
90
- step: 2,
91
- progressStatus: "partialSuccess",
92
- };
93
- }
94
-
95
- case "CRYPTO_SWAP_IN_PROGRESS":
96
- case "PENDING_ON_RAMP_TRANSFER":
97
- case "ON_RAMP_TRANSFER_IN_PROGRESS":
98
- case "PENDING_PAYMENT": {
99
- return {
100
- status: "Pending",
101
- color: "accentText",
102
- loading: true,
103
- step: status === "CRYPTO_SWAP_IN_PROGRESS" ? 2 : 1,
104
- progressStatus: "pending",
105
- };
106
- }
107
-
108
- case "ON_RAMP_TRANSFER_COMPLETED":
109
- case "CRYPTO_SWAP_COMPLETED": {
110
- return {
111
- status: "Completed", // Is this actually completed though?
112
- color: "success",
113
- loading: true,
114
- step: status === "CRYPTO_SWAP_COMPLETED" ? 2 : 1,
115
- progressStatus: "completed",
116
- };
117
- }
118
-
119
- case "CRYPTO_SWAP_FAILED":
120
- case "CRYPTO_SWAP_REQUIRED": {
121
- return {
122
- status: "Action Required",
123
- color: "accentText",
124
- step: 2,
125
- progressStatus: "actionRequired",
126
- };
127
- }
128
-
129
- case "PAYMENT_FAILED":
130
- case "ON_RAMP_TRANSFER_FAILED": {
131
- return {
132
- status: "Failed",
133
- color: "danger",
134
- step: 1,
135
- progressStatus: "failed",
136
- };
137
- }
138
- }
139
-
140
- return {
141
- status: "Unknown",
142
- color: "secondaryText",
143
- step: 1,
144
- progressStatus: "unknown",
145
- };
146
- }
@@ -0,0 +1,295 @@
1
+ import { keyframes } from "@emotion/react";
2
+ import type { ThirdwebClient } from "../../../../client/client.js";
3
+ import type { PreparedTransaction } from "../../../../transaction/prepare-transaction.js";
4
+ import { shortenAddress } from "../../../../utils/address.js";
5
+ import { formatNumber } from "../../../../utils/formatNumber.js";
6
+ import { toTokens } from "../../../../utils/units.js";
7
+ import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
8
+ import {
9
+ fontSize,
10
+ iconSize,
11
+ radius,
12
+ spacing,
13
+ } from "../../../core/design-system/index.js";
14
+ import { useActiveAccount } from "../../../core/hooks/wallets/useActiveAccount.js";
15
+ import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js";
16
+ import { hasSponsoredTransactionsEnabled } from "../../../core/utils/wallet.js";
17
+ import { ErrorState } from "../../wallets/shared/ErrorState.js";
18
+ import { LoadingScreen } from "../../wallets/shared/LoadingScreen.js";
19
+ import { CoinsIcon } from "../ConnectWallet/icons/CoinsIcon.js";
20
+ import type { ConnectLocale } from "../ConnectWallet/locale/types.js";
21
+ import { useTransactionCostAndData } from "../ConnectWallet/screens/Buy/main/useBuyTxStates.js";
22
+ import { WalletRow } from "../ConnectWallet/screens/Buy/swap/WalletRow.js";
23
+ import { formatTokenBalance } from "../ConnectWallet/screens/formatTokenBalance.js";
24
+ import { isNativeToken } from "../ConnectWallet/screens/nativeToken.js";
25
+ import { CopyIcon } from "../components/CopyIcon.js";
26
+ import { QRCode } from "../components/QRCode.js";
27
+ import { Skeleton } from "../components/Skeleton.js";
28
+ import { Spacer } from "../components/Spacer.js";
29
+ import { WalletImage } from "../components/WalletImage.js";
30
+ import { Container, ModalHeader } from "../components/basic.js";
31
+ import { Button } from "../components/buttons.js";
32
+ import { Text } from "../components/text.js";
33
+ import { TokenSymbol } from "../components/token/TokenSymbol.js";
34
+ import { StyledButton, StyledDiv } from "../design-system/elements.js";
35
+ import { useClipboard } from "../hooks/useCopyClipboard.js";
36
+
37
+ const pulseAnimation = keyframes`
38
+ 0% {
39
+ opacity: 1;
40
+ transform: scale(0.5);
41
+ }
42
+ 100% {
43
+ opacity: 0;
44
+ transform: scale(1.5);
45
+ }
46
+ `;
47
+
48
+ const WaitingBadge = /* @__PURE__ */ StyledDiv(() => {
49
+ const theme = useCustomTheme();
50
+ return {
51
+ display: "flex",
52
+ alignItems: "center",
53
+ gap: spacing.sm,
54
+ backgroundColor: theme.colors.tertiaryBg,
55
+ border: `1px solid ${theme.colors.borderColor}`,
56
+ padding: `${spacing.md} ${spacing.sm}`,
57
+ borderRadius: radius.lg,
58
+ color: theme.colors.secondaryText,
59
+ fontSize: fontSize.sm,
60
+ fontWeight: 500,
61
+ position: "relative" as const,
62
+ "&::before": {
63
+ content: '""',
64
+ width: "8px",
65
+ height: "8px",
66
+ borderRadius: "50%",
67
+ backgroundColor: theme.colors.accentText,
68
+ animation: `${pulseAnimation} 1s infinite`,
69
+ },
70
+ };
71
+ });
72
+
73
+ /**
74
+ *
75
+ * @internal
76
+ */
77
+ export function DepositScreen(props: {
78
+ onBack: (() => void) | undefined;
79
+ connectLocale: ConnectLocale;
80
+ client: ThirdwebClient;
81
+ tx: PreparedTransaction;
82
+ onDone: () => void;
83
+ }) {
84
+ const activeWallet = useActiveWallet();
85
+ const activeAccount = useActiveAccount();
86
+ const address = activeAccount?.address;
87
+ const { hasCopied, onCopy } = useClipboard(address || "");
88
+ const { connectLocale, client } = props;
89
+ const locale = connectLocale.receiveFundsScreen;
90
+ const isTestnet = props.tx.chain.testnet === true;
91
+ const {
92
+ data: transactionCostAndData,
93
+ error: transactionCostAndDataError,
94
+ isFetching: transactionCostAndDataFetching,
95
+ refetch: transactionCostAndDataRefetch,
96
+ } = useTransactionCostAndData({
97
+ transaction: props.tx,
98
+ account: activeAccount,
99
+ supportedDestinations: [],
100
+ refetchIntervalMs: 10_000,
101
+ });
102
+ const theme = useCustomTheme();
103
+ const sponsoredTransactionsEnabled =
104
+ hasSponsoredTransactionsEnabled(activeWallet);
105
+
106
+ if (transactionCostAndDataError) {
107
+ return (
108
+ <Container
109
+ style={{
110
+ minHeight: "350px",
111
+ }}
112
+ fullHeight
113
+ flex="row"
114
+ center="both"
115
+ >
116
+ <ErrorState
117
+ title={transactionCostAndDataError?.message || "Something went wrong"}
118
+ onTryAgain={transactionCostAndDataRefetch}
119
+ />
120
+ </Container>
121
+ );
122
+ }
123
+
124
+ if (!transactionCostAndData) {
125
+ return <LoadingScreen />;
126
+ }
127
+
128
+ const totalCost =
129
+ isNativeToken(transactionCostAndData.token) && !sponsoredTransactionsEnabled
130
+ ? transactionCostAndData.transactionValueWei +
131
+ transactionCostAndData.gasCostWei
132
+ : transactionCostAndData.transactionValueWei;
133
+ const insufficientFunds =
134
+ transactionCostAndData.walletBalance.value < totalCost;
135
+ const requiredFunds = transactionCostAndData.walletBalance.value
136
+ ? totalCost - transactionCostAndData.walletBalance.value
137
+ : totalCost;
138
+
139
+ const openFaucetLink = () => {
140
+ window.open(
141
+ `https://thirdweb.com/${props.tx.chain.id}?utm_source=ub_deposit`,
142
+ );
143
+ };
144
+
145
+ return (
146
+ <Container p="lg">
147
+ <ModalHeader title={"Insufficient funds"} onBack={props.onBack} />
148
+
149
+ <Spacer y="lg" />
150
+
151
+ <Container flex="column" gap="sm">
152
+ {insufficientFunds && (
153
+ <div>
154
+ <Text size="xs" center color="danger" multiline>
155
+ You need{" "}
156
+ {formatNumber(
157
+ Number.parseFloat(
158
+ toTokens(requiredFunds, transactionCostAndData.decimals),
159
+ ),
160
+ 5,
161
+ )}{" "}
162
+ {transactionCostAndData.token.symbol} to continue
163
+ </Text>
164
+ </div>
165
+ )}
166
+ <Container
167
+ flex="row"
168
+ style={{
169
+ justifyContent: "space-between",
170
+ padding: spacing.sm,
171
+ marginBottom: spacing.sm,
172
+ borderRadius: spacing.md,
173
+ backgroundColor: theme.colors.tertiaryBg,
174
+ border: `1px solid ${theme.colors.borderColor}`,
175
+ }}
176
+ >
177
+ {activeAccount && (
178
+ <WalletRow
179
+ address={activeAccount?.address}
180
+ iconSize="md"
181
+ client={client}
182
+ />
183
+ )}
184
+ {transactionCostAndData.walletBalance.value !== undefined &&
185
+ !transactionCostAndDataFetching ? (
186
+ <Container flex="row" gap="3xs" center="y">
187
+ <Text size="xs" color="secondaryText" weight={500}>
188
+ {formatTokenBalance(
189
+ transactionCostAndData.walletBalance,
190
+ false,
191
+ )}
192
+ </Text>
193
+ <TokenSymbol
194
+ token={transactionCostAndData.token}
195
+ chain={props.tx.chain}
196
+ size="xs"
197
+ color="secondaryText"
198
+ />
199
+ </Container>
200
+ ) : (
201
+ <Container flex="row" gap="3xs" center="y">
202
+ <Skeleton width="70px" height={fontSize.xs} />
203
+ </Container>
204
+ )}
205
+ </Container>
206
+ </Container>
207
+
208
+ <WalletAddressContainer onClick={onCopy}>
209
+ <Container flex="column" gap="md" center="both" expand>
210
+ <Container flex="row" center="x">
211
+ <QRCode
212
+ qrCodeUri={address}
213
+ size={250}
214
+ QRIcon={
215
+ activeWallet && (
216
+ <WalletImage
217
+ id={activeWallet.id}
218
+ size={iconSize.xl}
219
+ client={client}
220
+ />
221
+ )
222
+ }
223
+ />
224
+ </Container>
225
+ <Container flex="row" center="x" gap="xs">
226
+ <Text color="primaryText" size="md">
227
+ {address ? shortenAddress(address) : ""}
228
+ </Text>
229
+ <CopyIcon
230
+ text={address || ""}
231
+ tip="Copy address"
232
+ hasCopied={hasCopied}
233
+ />
234
+ </Container>
235
+ </Container>
236
+ </WalletAddressContainer>
237
+
238
+ <Spacer y="md" />
239
+
240
+ <Text
241
+ multiline
242
+ center
243
+ balance
244
+ size="sm"
245
+ className="receive_fund_screen_instruction"
246
+ >
247
+ {locale.instruction}
248
+ </Text>
249
+
250
+ <Spacer y="md" />
251
+
252
+ {insufficientFunds ? (
253
+ <WaitingBadge>
254
+ Waiting for funds on {transactionCostAndData.chainMetadata.name}...
255
+ </WaitingBadge>
256
+ ) : (
257
+ <Button variant="accent" onClick={props.onDone} fullWidth>
258
+ Continue
259
+ </Button>
260
+ )}
261
+ {insufficientFunds && isTestnet && (
262
+ <>
263
+ <Spacer y="md" />
264
+ <Button variant="link" onClick={openFaucetLink} fullWidth>
265
+ <Container flex="row" center="x" gap="xs" color="accentText">
266
+ <CoinsIcon size={iconSize.sm} />
267
+ <Text size="xs" color="accentText" weight={500} center>
268
+ Get testnet funds
269
+ </Text>
270
+ </Container>
271
+ </Button>
272
+ </>
273
+ )}
274
+ </Container>
275
+ );
276
+ }
277
+
278
+ const WalletAddressContainer = /* @__PURE__ */ StyledButton((_) => {
279
+ const theme = useCustomTheme();
280
+ return {
281
+ all: "unset",
282
+ width: "100%",
283
+ boxSizing: "border-box",
284
+ cursor: "pointer",
285
+ padding: spacing.md,
286
+ display: "flex",
287
+ justifyContent: "space-between",
288
+ border: `1px solid ${theme.colors.borderColor}`,
289
+ borderRadius: radius.lg,
290
+ transition: "border-color 200ms ease",
291
+ "&:hover": {
292
+ borderColor: theme.colors.accentText,
293
+ },
294
+ };
295
+ });
@@ -24,6 +24,7 @@ export function ExecutingTxScreen(props: {
24
24
  payModal: false,
25
25
  });
26
26
  const [txHash, setTxHash] = useState<Hex | undefined>();
27
+ const [txError, setTxError] = useState<Error | undefined>();
27
28
  const chainExplorers = useChainExplorers(props.tx.chain);
28
29
  const [status, setStatus] = useState<"loading" | "failed" | "sent">(
29
30
  "loading",
@@ -31,6 +32,7 @@ export function ExecutingTxScreen(props: {
31
32
 
32
33
  const sendTx = useCallback(async () => {
33
34
  setStatus("loading");
35
+ setTxError(undefined);
34
36
  try {
35
37
  const txData = await sendTxCore.mutateAsync(props.tx);
36
38
  setTxHash(txData.transactionHash);
@@ -40,6 +42,7 @@ export function ExecutingTxScreen(props: {
40
42
  // Do not reject the transaction here, because the user may want to try again
41
43
  // we only reject on modal close
42
44
  console.error(e);
45
+ setTxError(e as Error);
43
46
  setStatus("failed");
44
47
  }
45
48
  }, [sendTxCore, props.tx, props.onTxSent]);
@@ -81,9 +84,7 @@ export function ExecutingTxScreen(props: {
81
84
  </Text>
82
85
  <Spacer y="sm" />
83
86
  <Text color="danger" center size="sm">
84
- {status === "failed" && sendTxCore.error
85
- ? sendTxCore.error.message
86
- : ""}
87
+ {status === "failed" && txError ? txError.message || "" : ""}
87
88
  </Text>
88
89
 
89
90
  <Spacer y="xxl" />
@@ -16,6 +16,7 @@ import { useConnectLocale } from "../ConnectWallet/locale/getConnectLocale.js";
16
16
  import { LazyBuyScreen } from "../ConnectWallet/screens/Buy/LazyBuyScreen.js";
17
17
  import { Modal } from "../components/Modal.js";
18
18
  import type { LocaleId } from "../types.js";
19
+ import { DepositScreen } from "./DepositScreen.js";
19
20
  import { ExecutingTxScreen } from "./ExecutingScreen.js";
20
21
 
21
22
  type ModalProps = {
@@ -30,6 +31,7 @@ type ModalProps = {
30
31
  tx: PreparedTransaction;
31
32
  payOptions: PayUIOptions;
32
33
  onTxSent: (data: WaitForReceiptOptions) => void;
34
+ modalMode: "buy" | "deposit";
33
35
  };
34
36
 
35
37
  export function TransactionModal(props: ModalProps) {
@@ -50,7 +52,10 @@ export function TransactionModal(props: ModalProps) {
50
52
  toToken: props.tx.erc20Value
51
53
  ? (await resolvePromisedValue(props.tx.erc20Value))?.tokenAddress
52
54
  : undefined,
53
- event: "open_pay_transaction_modal",
55
+ event:
56
+ props.modalMode === "buy"
57
+ ? "open_pay_transaction_modal"
58
+ : "open_pay_deposit_modal",
54
59
  });
55
60
 
56
61
  return null;
@@ -93,6 +98,20 @@ function TransactionModalContent(props: ModalProps & { onBack?: () => void }) {
93
98
  );
94
99
  }
95
100
 
101
+ if (props.modalMode === "deposit") {
102
+ return (
103
+ <DepositScreen
104
+ client={props.client}
105
+ onBack={props.onBack}
106
+ tx={props.tx}
107
+ connectLocale={localeQuery.data}
108
+ onDone={() => {
109
+ setScreen("execute-tx");
110
+ }}
111
+ />
112
+ );
113
+ }
114
+
96
115
  return (
97
116
  <LazyBuyScreen
98
117
  title={props.title}
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.100.0-nightly-713ebe0a2d6d8a409e41ce0f0317fc34b1f221bb-20250520000414";
1
+ export const version = "5.100.1";
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OnRampTxDetailsTable = OnRampTxDetailsTable;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_icons_1 = require("@radix-ui/react-icons");
6
- const utils_js_1 = require("../../../../../../../chains/utils.js");
7
- const formatNumber_js_1 = require("../../../../../../../utils/formatNumber.js");
8
- const url_js_1 = require("../../../../../../../utils/url.js");
9
- const index_js_1 = require("../../../../../../core/design-system/index.js");
10
- const useChainQuery_js_1 = require("../../../../../../core/hooks/others/useChainQuery.js");
11
- const Spacer_js_1 = require("../../../../components/Spacer.js");
12
- const basic_js_1 = require("../../../../components/basic.js");
13
- const buttons_js_1 = require("../../../../components/buttons.js");
14
- const text_js_1 = require("../../../../components/text.js");
15
- const TokenInfoRow_js_1 = require("../pay-transactions/TokenInfoRow.js");
16
- const currencies_js_1 = require("./currencies.js");
17
- /**
18
- * Show a table with the details of a "OnRamp" transaction step in the "Buy with Fiat" flow.
19
- * - Show OnRamp token as "Receive"
20
- * - Show fiat amount as "Pay"
21
- */
22
- function OnRampTxDetailsTable(props) {
23
- const onRampExplorers = (0, useChainQuery_js_1.useChainExplorers)((0, utils_js_1.getCachedChain)(props.token.chainId));
24
- const onrampTxHash = props.statusMeta?.txHash;
25
- const currencyMeta = (0, currencies_js_1.getCurrencyMeta)(props.fiat.currencySymbol);
26
- const lineSpacer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(basic_js_1.Line, {}), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" })] }));
27
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", style: {
28
- justifyContent: "space-between",
29
- }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", children: "Pay" }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "column", gap: "xxs", style: {
30
- alignItems: "flex-end",
31
- }, children: (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "xs", center: "y", children: [(0, currencies_js_1.getFiatIcon)(currencyMeta, "sm"), (0, jsx_runtime_1.jsxs)(text_js_1.Text, { color: "primaryText", children: [(0, formatNumber_js_1.formatNumber)(Number(props.fiat.amount), 2), " ", props.fiat.currencySymbol] })] }) })] }), lineSpacer, (0, jsx_runtime_1.jsx)(TokenInfoRow_js_1.TokenInfoRow, { chainId: props.token.chainId, client: props.client, label: "Receive", tokenAmount: props.token.amount, tokenSymbol: props.token.symbol, tokenAddress: props.token.address }), props.statusMeta && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lineSpacer, (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", center: "y", style: {
32
- justifyContent: "space-between",
33
- }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { children: "Status" }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "row", gap: "xs", center: "y", children: (0, jsx_runtime_1.jsx)(text_js_1.Text, { color: props.statusMeta.color, children: props.statusMeta.text }) })] })] })), lineSpacer, onrampTxHash && onRampExplorers.explorers?.[0]?.url && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsxs)(buttons_js_1.ButtonLink, { fullWidth: true, variant: "outline", href: (0, url_js_1.formatExplorerTxUrl)(onRampExplorers.explorers[0]?.url, onrampTxHash), target: "_blank", gap: "xs", style: {
34
- fontSize: index_js_1.fontSize.sm,
35
- }, children: ["View on Explorer", (0, jsx_runtime_1.jsx)(react_icons_1.ExternalLinkIcon, { width: index_js_1.iconSize.sm, height: index_js_1.iconSize.sm })] })] }))] }));
36
- }
37
- //# sourceMappingURL=FiatTxDetailsTable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FiatTxDetailsTable.js","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx"],"names":[],"mappings":"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"}