Merge pull request #324 from gerlofvanek/fixes-13

GUI: Various fixes + Fix bid modal.
This commit is contained in:
Gerlof van Ek
2025-06-20 14:54:10 +02:00
committed by GitHub
6 changed files with 130 additions and 21 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;