mirror of
https://github.com/basicswap/basicswap.git
synced 2025-01-18 16:44:34 +00:00
This commit is contained in:
parent
264f4d209f
commit
0a5680da13
1 changed files with 2 additions and 2 deletions
|
@ -1434,7 +1434,7 @@ function createTooltipContent(isSentOffers, coinFrom, coinTo, fromAmount, toAmou
|
|||
const percentDiffDisplay = formattedPercentDiff === "0.00" ? "0.00" :
|
||||
(percentDiff > 0 ? `+${formattedPercentDiff}` : formattedPercentDiff);
|
||||
|
||||
const profitLabel = (isSentOffers || isOwnOffer) ? "Profit" : "Savings";
|
||||
const profitLabel = (isSentOffers || isOwnOffer) ? "Max Profit" : "Max Loss";
|
||||
const actionLabel = (isSentOffers || isOwnOffer) ? "selling" : "buying";
|
||||
const directionLabel = (isSentOffers || isOwnOffer) ? "receiving" : "paying";
|
||||
|
||||
|
@ -1442,7 +1442,7 @@ function createTooltipContent(isSentOffers, coinFrom, coinTo, fromAmount, toAmou
|
|||
<p class="font-bold mb-1">Profit/Loss Calculation:</p>
|
||||
<p>You are ${actionLabel} ${fromAmount.toFixed(8)} ${coinFrom} ($${fromValueUSD.toFixed(2)} USD) <br/> and ${directionLabel} ${toAmount.toFixed(8)} ${coinTo} ($${toValueUSD.toFixed(2)} USD).</p>
|
||||
<p class="mt-1">Percentage difference: ${percentDiffDisplay}%</p>
|
||||
<p>USD ${profitLabel}: ${profitUSD > 0 ? '+' : ''}$${profitUSD.toFixed(2)} USD</p>
|
||||
<p>USD ${profitLabel}: ${profitUSD > 0 ? '' : '-'}$${profitUSD.toFixed(2)} USD</p>
|
||||
<p class="font-bold mt-2">Calculation:</p>
|
||||
<p>Percentage = ${(isSentOffers || isOwnOffer) ?
|
||||
"((To Amount in USD / From Amount in USD) - 1) * 100" :
|
||||
|
|
Loading…
Reference in a new issue