make liquidation history label for usd perp position clearer

This commit is contained in:
Tyler Shipe 2021-11-24 12:49:06 -05:00
parent 75226f3f3c
commit 7eef75cfdd
1 changed files with 5 additions and 3 deletions

View File

@ -110,17 +110,19 @@ const parseActivityDetails = (activity_details, activity_type, perpMarket) => {
const assetSymbol = const assetSymbol =
activity_type === 'liquidate_perp_market' activity_type === 'liquidate_perp_market'
? 'USDC-PERP' ? 'USD (PERP)'
: activity_details.asset_symbol : activity_details.asset_symbol
const liabSymbol = const liabSymbol =
activity_type === 'liquidate_perp_market' || activity_type === 'liquidate_perp_market' ||
activity_details.liab_type === 'Perp' activity_details.liab_type === 'Perp'
? `${activity_details.liab_symbol}-PERP` ? activity_details.liab_symbol.includes('USDC')
? 'USD (PERP)'
: `${activity_details.liab_symbol}-PERP`
: activity_details.liab_symbol : activity_details.liab_symbol
const liabAmount = const liabAmount =
perpMarket && liabSymbol !== 'USDC-PERP' perpMarket && liabSymbol !== 'USD (PERP)'
? perpMarket.baseLotsToNumber(activity_details.liab_amount) ? perpMarket.baseLotsToNumber(activity_details.liab_amount)
: activity_details.liab_amount : activity_details.liab_amount