thirdweb 5.88.7 → 5.88.8-nightly-1fa36c1d56758788a8f9053f8929497bacb2b115-20250224233959

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 (191) hide show
  1. package/dist/cjs/contract/deployment/utils/create-2-factory.js +4 -0
  2. package/dist/cjs/contract/deployment/utils/create-2-factory.js.map +1 -1
  3. package/dist/cjs/pay/buyWithFiat/getQuote.js +1 -0
  4. package/dist/cjs/pay/buyWithFiat/getQuote.js.map +1 -1
  5. package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js +44 -0
  6. package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
  7. package/dist/cjs/pay/convert/type.js +30 -1
  8. package/dist/cjs/pay/convert/type.js.map +1 -1
  9. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
  10. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
  11. package/dist/cjs/react/core/hooks/wallets/useSendToken.js +18 -2
  12. package/dist/cjs/react/core/hooks/wallets/useSendToken.js.map +1 -1
  13. package/dist/cjs/react/core/providers/invalidateWalletBalance.js +6 -1
  14. package/dist/cjs/react/core/providers/invalidateWalletBalance.js.map +1 -1
  15. package/dist/cjs/react/core/utils/account.js +2 -7
  16. package/dist/cjs/react/core/utils/account.js.map +1 -1
  17. package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +1 -1
  18. package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
  19. package/dist/cjs/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js +1 -1
  20. package/dist/cjs/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js.map +1 -1
  21. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +5 -3
  22. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  23. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js +2 -1
  24. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js.map +1 -1
  25. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +1 -1
  26. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +1 -1
  27. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +0 -13
  28. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
  29. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +6 -26
  30. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  31. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +1 -1
  32. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
  33. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +541 -0
  34. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -0
  35. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +23 -0
  36. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
  37. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +8 -0
  38. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
  39. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js +21 -0
  40. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js.map +1 -0
  41. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +4 -9
  42. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +1 -1
  43. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +2 -1
  44. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
  45. package/dist/cjs/rpc/rpc.js +1 -1
  46. package/dist/cjs/storage/upload/mobile.js +1 -1
  47. package/dist/cjs/storage/upload/mobile.js.map +1 -1
  48. package/dist/cjs/storage/upload/web-node.js +1 -0
  49. package/dist/cjs/storage/upload/web-node.js.map +1 -1
  50. package/dist/cjs/version.js +1 -1
  51. package/dist/cjs/version.js.map +1 -1
  52. package/dist/cjs/wallets/in-app/web/ecosystem.js +1 -1
  53. package/dist/cjs/wallets/in-app/web/lib/iframe-wallet.js +1 -1
  54. package/dist/cjs/wallets/in-app/web/lib/iframe-wallet.js.map +1 -1
  55. package/dist/esm/contract/deployment/utils/create-2-factory.js +4 -0
  56. package/dist/esm/contract/deployment/utils/create-2-factory.js.map +1 -1
  57. package/dist/esm/pay/buyWithFiat/getQuote.js +1 -0
  58. package/dist/esm/pay/buyWithFiat/getQuote.js.map +1 -1
  59. package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js +43 -0
  60. package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
  61. package/dist/esm/pay/convert/type.js +29 -2
  62. package/dist/esm/pay/convert/type.js.map +1 -1
  63. package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
  64. package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
  65. package/dist/esm/react/core/hooks/wallets/useSendToken.js +19 -3
  66. package/dist/esm/react/core/hooks/wallets/useSendToken.js.map +1 -1
  67. package/dist/esm/react/core/providers/invalidateWalletBalance.js +6 -1
  68. package/dist/esm/react/core/providers/invalidateWalletBalance.js.map +1 -1
  69. package/dist/esm/react/core/utils/account.js +1 -6
  70. package/dist/esm/react/core/utils/account.js.map +1 -1
  71. package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +1 -1
  72. package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
  73. package/dist/esm/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js +1 -1
  74. package/dist/esm/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js.map +1 -1
  75. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +5 -3
  76. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  77. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js +2 -1
  78. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js.map +1 -1
  79. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +3 -3
  80. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +1 -1
  81. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +0 -13
  82. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
  83. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +7 -27
  84. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  85. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -2
  86. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
  87. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +538 -0
  88. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -0
  89. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +22 -0
  90. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
  91. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +8 -0
  92. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
  93. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js +18 -0
  94. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js.map +1 -0
  95. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +5 -10
  96. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +1 -1
  97. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +2 -1
  98. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
  99. package/dist/esm/rpc/rpc.js +1 -1
  100. package/dist/esm/storage/upload/mobile.js +1 -1
  101. package/dist/esm/storage/upload/mobile.js.map +1 -1
  102. package/dist/esm/storage/upload/web-node.js +1 -0
  103. package/dist/esm/storage/upload/web-node.js.map +1 -1
  104. package/dist/esm/version.js +1 -1
  105. package/dist/esm/version.js.map +1 -1
  106. package/dist/esm/wallets/in-app/web/ecosystem.js +1 -1
  107. package/dist/esm/wallets/in-app/web/lib/iframe-wallet.js +1 -1
  108. package/dist/esm/wallets/in-app/web/lib/iframe-wallet.js.map +1 -1
  109. package/dist/types/pay/buyWithFiat/getQuote.d.ts +8 -32
  110. package/dist/types/pay/buyWithFiat/getQuote.d.ts.map +1 -1
  111. package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts +7 -0
  112. package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts.map +1 -1
  113. package/dist/types/pay/convert/type.d.ts +2 -1
  114. package/dist/types/pay/convert/type.d.ts.map +1 -1
  115. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts +2 -1
  116. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -1
  117. package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts +2 -1
  118. package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts.map +1 -1
  119. package/dist/types/react/core/hooks/wallets/useSendToken.d.ts +6 -1
  120. package/dist/types/react/core/hooks/wallets/useSendToken.d.ts.map +1 -1
  121. package/dist/types/react/core/providers/invalidateWalletBalance.d.ts +1 -1
  122. package/dist/types/react/core/providers/invalidateWalletBalance.d.ts.map +1 -1
  123. package/dist/types/react/core/utils/account.d.ts +1 -1
  124. package/dist/types/react/core/utils/account.d.ts.map +1 -1
  125. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts +1 -1
  126. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts.map +1 -1
  127. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts.map +1 -1
  128. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +1 -1
  129. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts +7 -2
  130. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
  131. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/{FiatFlow.d.ts → OnRampScreen.d.ts} +4 -4
  132. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts.map +1 -0
  133. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts +6 -2
  134. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts.map +1 -1
  135. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts +0 -1
  136. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts.map +1 -1
  137. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts +4 -0
  138. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts.map +1 -0
  139. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts.map +1 -1
  140. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts +1 -0
  141. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
  142. package/dist/types/react/web/ui/MediaRenderer/MediaRenderer.d.ts +2 -2
  143. package/dist/types/react/web/ui/MediaRenderer/ModelViewer.d.ts +1 -1
  144. package/dist/types/storage/upload/web-node.d.ts.map +1 -1
  145. package/dist/types/version.d.ts +1 -1
  146. package/dist/types/version.d.ts.map +1 -1
  147. package/dist/types/wallets/in-app/web/ecosystem.d.ts +1 -1
  148. package/package.json +1 -1
  149. package/src/contract/deployment/utils/create-2-factory.ts +4 -0
  150. package/src/pay/buyWithFiat/getQuote.ts +9 -33
  151. package/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts +56 -0
  152. package/src/pay/convert/type.ts +30 -1
  153. package/src/react/core/hooks/connection/ConnectButtonProps.ts +2 -1
  154. package/src/react/core/hooks/pay/useBuyWithFiatStatus.ts +3 -1
  155. package/src/react/core/hooks/wallets/useSendToken.ts +19 -3
  156. package/src/react/core/providers/invalidateWalletBalance.ts +6 -1
  157. package/src/react/core/utils/account.ts +4 -8
  158. package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +1 -1
  159. package/src/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.tsx +1 -1
  160. package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +7 -3
  161. package/src/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.tsx +2 -2
  162. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.tsx +3 -6
  163. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx +0 -19
  164. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +9 -32
  165. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +2 -2
  166. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx +790 -0
  167. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx +38 -2
  168. package/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts +0 -1
  169. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +10 -0
  170. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsx +55 -0
  171. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.tsx +18 -41
  172. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +10 -1
  173. package/src/rpc/rpc.ts +1 -1
  174. package/src/storage/upload/mobile.ts +1 -1
  175. package/src/storage/upload/web-node.ts +1 -0
  176. package/src/version.ts +1 -1
  177. package/src/wallets/in-app/web/ecosystem.ts +1 -1
  178. package/src/wallets/in-app/web/lib/iframe-wallet.ts +1 -1
  179. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +0 -63
  180. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +0 -1
  181. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +0 -116
  182. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +0 -1
  183. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +0 -60
  184. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +0 -1
  185. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +0 -113
  186. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +0 -1
  187. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.d.ts.map +0 -1
  188. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.d.ts +0 -24
  189. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.d.ts.map +0 -1
  190. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.tsx +0 -152
  191. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.tsx +0 -258
@@ -3,7 +3,6 @@ import { useState } from "react";
3
3
  import type { Chain } from "../../../../../../../chains/types.js";
4
4
  import type { ThirdwebClient } from "../../../../../../../client/client.js";
5
5
  import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.js";
6
- import { isSwapRequiredPostOnramp } from "../../../../../../../pay/buyWithFiat/isSwapRequiredPostOnramp.js";
7
6
  import type { FiatProvider } from "../../../../../../../pay/utils/commonTypes.js";
8
7
  import { formatNumber } from "../../../../../../../utils/formatNumber.js";
9
8
  import {
@@ -33,9 +32,7 @@ import { type ERC20OrNativeToken, isNativeToken } from "../../nativeToken.js";
33
32
  import { EstimatedTimeAndFees } from "../EstimatedTimeAndFees.js";
34
33
  import { PayWithCreditCard } from "../PayWIthCreditCard.js";
35
34
  import type { SelectedScreen } from "../main/types.js";
36
- import { openOnrampPopup } from "../openOnRamppopup.js";
37
35
  import { FiatFees } from "../swap/Fees.js";
38
- import { addPendingTx } from "../swap/pendingSwapTx.js";
39
36
  import type { PayerInfo } from "../types.js";
40
37
  import { Providers } from "./Providers.js";
41
38
  import type { CurrencyMeta } from "./currencies.js";
@@ -113,25 +110,9 @@ export function FiatScreenContent(props: {
113
110
  return;
114
111
  }
115
112
 
116
- const hasTwoSteps = isSwapRequiredPostOnramp(fiatQuoteQuery.data);
117
- let openedWindow: Window | null = null;
118
-
119
- if (!hasTwoSteps) {
120
- openedWindow = openOnrampPopup(
121
- fiatQuoteQuery.data.onRampLink,
122
- typeof props.theme === "string" ? props.theme : props.theme.type,
123
- );
124
-
125
- addPendingTx({
126
- type: "fiat",
127
- intentId: fiatQuoteQuery.data.intentId,
128
- });
129
- }
130
-
131
113
  setScreen({
132
114
  id: "fiat-flow",
133
115
  quote: fiatQuoteQuery.data,
134
- openedWindow,
135
116
  });
136
117
  }
137
118
 
@@ -7,7 +7,6 @@ import { useMemo } from "react";
7
7
  import { getCachedChain } from "../../../../../../../chains/utils.js";
8
8
  import type { ThirdwebClient } from "../../../../../../../client/client.js";
9
9
  import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.js";
10
- import type { BuyWithFiatQuote } from "../../../../../../../pay/buyWithFiat/getQuote.js";
11
10
  import type { BuyWithFiatStatus } from "../../../../../../../pay/buyWithFiat/getStatus.js";
12
11
  import { formatNumber } from "../../../../../../../utils/formatNumber.js";
13
12
  import { formatExplorerTxUrl } from "../../../../../../../utils/url.js";
@@ -36,7 +35,7 @@ import {
36
35
  type FiatStatusMeta,
37
36
  getBuyWithFiatStatusMeta,
38
37
  } from "../pay-transactions/statusMeta.js";
39
- import { getCurrencyMeta } from "./currencies.js";
38
+ import { getCurrencyMeta, getFiatIcon } from "./currencies.js";
40
39
 
41
40
  export type BuyWithFiatPartialQuote = {
42
41
  fromCurrencySymbol: string;
@@ -58,31 +57,6 @@ export type BuyWithFiatPartialQuote = {
58
57
  };
59
58
  };
60
59
 
61
- export function fiatQuoteToPartialQuote(
62
- quote: BuyWithFiatQuote,
63
- ): BuyWithFiatPartialQuote {
64
- const data: BuyWithFiatPartialQuote = {
65
- fromCurrencyAmount: quote.fromCurrencyWithFees.amount,
66
- fromCurrencySymbol: quote.fromCurrencyWithFees.currencySymbol,
67
- onRampTokenAmount: quote.onRampToken.amount,
68
- toTokenAmount: quote.estimatedToAmountMin,
69
- onRampToken: {
70
- chainId: quote.onRampToken.token.chainId,
71
- tokenAddress: quote.onRampToken.token.tokenAddress,
72
- name: quote.onRampToken.token.name,
73
- symbol: quote.onRampToken.token.symbol,
74
- },
75
- toToken: {
76
- chainId: quote.toToken.chainId,
77
- tokenAddress: quote.toToken.tokenAddress,
78
- name: quote.toToken.name,
79
- symbol: quote.toToken.symbol,
80
- },
81
- };
82
-
83
- return data;
84
- }
85
-
86
60
  export function FiatSteps(props: {
87
61
  title: string;
88
62
  partialQuote: BuyWithFiatPartialQuote;
@@ -171,7 +145,7 @@ export function FiatSteps(props: {
171
145
  </div>
172
146
  );
173
147
 
174
- const fiatIcon = <currency.icon size={iconSize.sm} />;
148
+ const fiatIcon = getFiatIcon(currency, "sm");
175
149
 
176
150
  const onRampTokenIcon = (
177
151
  <PayTokenIcon
@@ -541,9 +515,11 @@ function PaymentSubStep(props: {
541
515
  );
542
516
  }
543
517
 
544
- function StepContainer(props: {
518
+ export function StepContainer(props: {
545
519
  state?: FiatStatusMeta["progressStatus"];
546
520
  children: React.ReactNode;
521
+ style?: React.CSSProperties;
522
+ index?: number;
547
523
  }) {
548
524
  let color: keyof Theme["colors"] = "borderColor";
549
525
  let text: string | undefined;
@@ -576,21 +552,22 @@ function StepContainer(props: {
576
552
  borderWidth: "1px",
577
553
  borderStyle: "solid",
578
554
  position: "relative",
555
+ ...props.style,
579
556
  }}
580
557
  >
581
558
  {props.children}
582
559
  <div
583
560
  style={{
584
561
  position: "absolute",
585
- right: spacing.sm,
586
- top: spacing.sm,
562
+ right: spacing.xs,
563
+ top: spacing.xs,
587
564
  display: "flex",
588
565
  gap: spacing.xs,
589
566
  alignItems: "center",
590
567
  }}
591
568
  >
592
569
  {props.state && text && (
593
- <Text size="sm" color={color}>
570
+ <Text size="xs" color={color}>
594
571
  {text}
595
572
  </Text>
596
573
  )}
@@ -14,7 +14,7 @@ import { ButtonLink } from "../../../../components/buttons.js";
14
14
  import { Text } from "../../../../components/text.js";
15
15
  import { TokenInfoRow } from "../pay-transactions/TokenInfoRow.js";
16
16
  import type { FiatStatusMeta } from "../pay-transactions/statusMeta.js";
17
- import { getCurrencyMeta } from "./currencies.js";
17
+ import { getCurrencyMeta, getFiatIcon } from "./currencies.js";
18
18
 
19
19
  /**
20
20
  * Show a table with the details of a "OnRamp" transaction step in the "Buy with Fiat" flow.
@@ -71,7 +71,7 @@ export function OnRampTxDetailsTable(props: {
71
71
  }}
72
72
  >
73
73
  <Container flex="row" gap="xs" center="y">
74
- <currencyMeta.icon size={iconSize.sm} />
74
+ {getFiatIcon(currencyMeta, "sm")}
75
75
  <Text color="primaryText">
76
76
  {formatNumber(Number(props.fiat.amount), 2)}{" "}
77
77
  {props.fiat.currencySymbol}