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.
- package/dist/cjs/contract/deployment/utils/create-2-factory.js +4 -0
- package/dist/cjs/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getQuote.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js +44 -0
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/cjs/pay/convert/type.js +30 -1
- package/dist/cjs/pay/convert/type.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSendToken.js +18 -2
- package/dist/cjs/react/core/hooks/wallets/useSendToken.js.map +1 -1
- package/dist/cjs/react/core/providers/invalidateWalletBalance.js +6 -1
- package/dist/cjs/react/core/providers/invalidateWalletBalance.js.map +1 -1
- package/dist/cjs/react/core/utils/account.js +2 -7
- package/dist/cjs/react/core/utils/account.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +5 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js +2 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +0 -13
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +6 -26
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +541 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +23 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +8 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js +21 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +4 -9
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +2 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
- package/dist/cjs/rpc/rpc.js +1 -1
- package/dist/cjs/storage/upload/mobile.js +1 -1
- package/dist/cjs/storage/upload/mobile.js.map +1 -1
- package/dist/cjs/storage/upload/web-node.js +1 -0
- package/dist/cjs/storage/upload/web-node.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/ecosystem.js +1 -1
- package/dist/cjs/wallets/in-app/web/lib/iframe-wallet.js +1 -1
- package/dist/cjs/wallets/in-app/web/lib/iframe-wallet.js.map +1 -1
- package/dist/esm/contract/deployment/utils/create-2-factory.js +4 -0
- package/dist/esm/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getQuote.js +1 -0
- package/dist/esm/pay/buyWithFiat/getQuote.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js +43 -0
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/esm/pay/convert/type.js +29 -2
- package/dist/esm/pay/convert/type.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useSendToken.js +19 -3
- package/dist/esm/react/core/hooks/wallets/useSendToken.js.map +1 -1
- package/dist/esm/react/core/providers/invalidateWalletBalance.js +6 -1
- package/dist/esm/react/core/providers/invalidateWalletBalance.js.map +1 -1
- package/dist/esm/react/core/utils/account.js +1 -6
- package/dist/esm/react/core/utils/account.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +5 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js +2 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +0 -13
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +7 -27
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +538 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +22 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +8 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js +18 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +5 -10
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +2 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
- package/dist/esm/rpc/rpc.js +1 -1
- package/dist/esm/storage/upload/mobile.js +1 -1
- package/dist/esm/storage/upload/mobile.js.map +1 -1
- package/dist/esm/storage/upload/web-node.js +1 -0
- package/dist/esm/storage/upload/web-node.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/in-app/web/ecosystem.js +1 -1
- package/dist/esm/wallets/in-app/web/lib/iframe-wallet.js +1 -1
- package/dist/esm/wallets/in-app/web/lib/iframe-wallet.js.map +1 -1
- package/dist/types/pay/buyWithFiat/getQuote.d.ts +8 -32
- package/dist/types/pay/buyWithFiat/getQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts +7 -0
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts.map +1 -1
- package/dist/types/pay/convert/type.d.ts +2 -1
- package/dist/types/pay/convert/type.d.ts.map +1 -1
- package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts +2 -1
- package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts +2 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useSendToken.d.ts +6 -1
- package/dist/types/react/core/hooks/wallets/useSendToken.d.ts.map +1 -1
- package/dist/types/react/core/providers/invalidateWalletBalance.d.ts +1 -1
- package/dist/types/react/core/providers/invalidateWalletBalance.d.ts.map +1 -1
- package/dist/types/react/core/utils/account.d.ts +1 -1
- package/dist/types/react/core/utils/account.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts +7 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/{FiatFlow.d.ts → OnRampScreen.d.ts} +4 -4
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts +6 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts +4 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/MediaRenderer/MediaRenderer.d.ts +2 -2
- package/dist/types/react/web/ui/MediaRenderer/ModelViewer.d.ts +1 -1
- package/dist/types/storage/upload/web-node.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/ecosystem.d.ts +1 -1
- package/package.json +1 -1
- package/src/contract/deployment/utils/create-2-factory.ts +4 -0
- package/src/pay/buyWithFiat/getQuote.ts +9 -33
- package/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts +56 -0
- package/src/pay/convert/type.ts +30 -1
- package/src/react/core/hooks/connection/ConnectButtonProps.ts +2 -1
- package/src/react/core/hooks/pay/useBuyWithFiatStatus.ts +3 -1
- package/src/react/core/hooks/wallets/useSendToken.ts +19 -3
- package/src/react/core/providers/invalidateWalletBalance.ts +6 -1
- package/src/react/core/utils/account.ts +4 -8
- package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/icons/currencies/JPYIcon.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +7 -3
- package/src/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.tsx +3 -6
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx +0 -19
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +9 -32
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx +790 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx +38 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts +0 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +10 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsx +55 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.tsx +18 -41
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +10 -1
- package/src/rpc/rpc.ts +1 -1
- package/src/storage/upload/mobile.ts +1 -1
- package/src/storage/upload/web-node.ts +1 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/ecosystem.ts +1 -1
- package/src/wallets/in-app/web/lib/iframe-wallet.ts +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +0 -63
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +0 -116
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +0 -60
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +0 -113
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.d.ts +0 -24
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.d.ts.map +0 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.tsx +0 -152
- 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 =
|
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.
|
586
|
-
top: spacing.
|
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="
|
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
|
-
|
74
|
+
{getFiatIcon(currencyMeta, "sm")}
|
75
75
|
<Text color="primaryText">
|
76
76
|
{formatNumber(Number(props.fiat.amount), 2)}{" "}
|
77
77
|
{props.fiat.currencySymbol}
|