GUI: Various fixes.

This commit is contained in:
gerlofvanek
2025-06-18 14:43:11 +02:00
parent 0e6f37a479
commit 6ad9cb24fe
3 changed files with 16 additions and 3 deletions

View File

@@ -203,6 +203,19 @@ const CoinManager = (function() {
return coin ? coin.symbol : null;
},
getDisplayName: function(identifier) {
if (!identifier) return null;
const normalizedId = identifier.toString().toLowerCase().trim();
if (normalizedId === 'particl anon' || normalizedId === 'part_anon' || normalizedId === 'particl_anon') {
return 'Particl Anon';
}
if (normalizedId === 'particl blind' || normalizedId === 'part_blind' || normalizedId === 'particl_blind') {
return 'Particl Blind';
}
if (normalizedId === 'litecoin mweb' || normalizedId === 'ltc_mweb' || normalizedId === 'litecoin_mweb') {
return 'Litecoin MWEB';
}
const coin = getCoinByAnyIdentifier(identifier);
return coin ? coin.displayName : null;
},

View File

@@ -293,8 +293,8 @@ const createSwapTableRow = async (swap) => {
const identity = await IdentityManager.getIdentityData(swap.addr_from);
const uniqueId = `${swap.bid_id}_${swap.created_at}`;
const fromSymbol = window.CoinManager.getSymbol(swap.coin_from) || swap.coin_from;
const toSymbol = window.CoinManager.getSymbol(swap.coin_to) || swap.coin_to;
const fromSymbol = window.CoinManager.getDisplayName(swap.coin_from) || swap.coin_from;
const toSymbol = window.CoinManager.getDisplayName(swap.coin_to) || swap.coin_to;
const timeColor = getTimeStrokeColor(swap.expire_at);
const fromAmount = parseFloat(swap.amount_from) || 0;
const toAmount = parseFloat(swap.amount_to) || 0;

View File

@@ -54,7 +54,7 @@
</th>
<th class="p-0">
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-right">
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">You Get</span>
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">You Receive</span>
</div>
</th>
<th class="p-0">