small details
This commit is contained in:
parent
61ae2807de
commit
86c92a7c65
11 changed files with 328 additions and 184 deletions
|
|
@ -345,36 +345,43 @@ export function ExchangeDetailsStep({
|
|||
</div>
|
||||
|
||||
{/* Trade Summary */}
|
||||
<div style={styles.tradeSummary}>
|
||||
<div style={styles.tradeSummary} data-testid="trade-summary">
|
||||
{direction === "buy" ? (
|
||||
<p style={styles.summaryText}>
|
||||
{t("detailsStep.summaryBuy", { sats: "", eur: "" }).split("{sats}")[0].trim()}{" "}
|
||||
<strong style={styles.satsValue}>
|
||||
<SatsDisplay sats={satsAmount} />
|
||||
</strong>
|
||||
{", "}
|
||||
{t("detailsStep.summaryBuy", { sats: "", eur: "" })
|
||||
.split("{sats}")[1]
|
||||
?.split("{eur}")[0]
|
||||
?.trim()}{" "}
|
||||
<strong>{formatEur(eurAmount)}</strong>
|
||||
{t("detailsStep.summaryBuy", {
|
||||
eur: formatEur(eurAmount),
|
||||
sats: "",
|
||||
})
|
||||
.replace("{eur}", formatEur(eurAmount))
|
||||
.split("{sats}")
|
||||
.map((part, i) => (
|
||||
<span key={i}>
|
||||
{part}
|
||||
{i === 0 && (
|
||||
<strong style={styles.satsValue}>
|
||||
<SatsDisplay sats={satsAmount} />
|
||||
</strong>
|
||||
)}
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
) : (
|
||||
<p style={styles.summaryText}>
|
||||
{t("detailsStep.summarySell", { sats: "", eur: "" })
|
||||
.split("{sats}")[0]
|
||||
?.split("{eur}")[0]
|
||||
?.trim()}{" "}
|
||||
<strong>{formatEur(eurAmount)}</strong>
|
||||
{", "}
|
||||
{t("detailsStep.summarySell", { sats: "", eur: "" })
|
||||
.split("{sats}")[0]
|
||||
?.split("{eur}")[1]
|
||||
?.trim()}{" "}
|
||||
<strong style={styles.satsValue}>
|
||||
<SatsDisplay sats={satsAmount} />
|
||||
</strong>
|
||||
{t("detailsStep.summarySell", { sats: "", eur: "" }).split("{sats}")[1]?.trim()}
|
||||
{t("detailsStep.summarySell", {
|
||||
sats: "",
|
||||
eur: formatEur(eurAmount),
|
||||
})
|
||||
.split("{sats}")
|
||||
.map((part, i) => (
|
||||
<span key={i}>
|
||||
{i === 0 && (
|
||||
<strong style={styles.satsValue}>
|
||||
<SatsDisplay sats={satsAmount} />
|
||||
</strong>
|
||||
)}
|
||||
{part.replace("{eur}", formatEur(eurAmount))}
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue