Skip to content

Commit

Permalink
fix: [lw-12001, lw-12005] fix token input symbol (#1605)
Browse files Browse the repository at this point in the history
  • Loading branch information
vetalcore authored and mchappell committed Dec 18, 2024
1 parent 9694f96 commit 6a80d9e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ describe('useSelectedCoin', () => {
const { result } = renderUseSelectedCoins(props);

expect(result.current.selectedCoins).toHaveLength(1);
expect(result.current.selectedCoins[0].fiatValue).toEqual('= 2000000.00 usd');
expect(result.current.selectedCoins[0].formattedFiatValue).toEqual('= 2.00M usd');
expect(result.current.selectedCoins[0].fiatValue).toEqual(' 2000000.00 usd');
expect(result.current.selectedCoins[0].formattedFiatValue).toEqual(' 2.00M usd');
expect(result.current.selectedCoins[0].maxDecimals).toEqual(6);
expect(result.current.selectedCoins[0].allowFloat).toEqual(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ export const useSelectedCoins = ({
})
})
},
formattedFiatValue: `= ${compactNumberWithUnit(fiatValue)} ${fiatCurrency?.code}`,
fiatValue: `= ${fiatValue} ${fiatCurrency?.code}`,
formattedFiatValue: ` ${compactNumberWithUnit(fiatValue)} ${fiatCurrency?.code}`,
fiatValue: ` ${fiatValue} ${fiatCurrency?.code}`,
maxDecimals: cardanoCoin.decimals
} as AssetInputListProps['rows'][number];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
padding: 0 size_unit(2);
}
}

.colContent {
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
}

.suffix {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ export const StakingInfo = ({
text={t('browserView.staking.stakingInfo.stats.stakeKey')}
value={
<Tooltip content={rewardAccount.address}>
{popupView ? addEllipsis(rewardAccount.address, 14, 9) : rewardAccount.address}
<div className={styles.colContent}>
{popupView ? addEllipsis(rewardAccount.address, 14, 9) : rewardAccount.address}
</div>
</Tooltip>
}
dataTestid="stats-stake-key"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.stat {
display: flex;
flex-direction: column;
max-width: 100%;

.title {
color: var(--text-color-secondary);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
padding: 0 size_unit(2);
}
}

.colContent {
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
}

.marker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ export const StakingInfoCard = ({
<Stats
text={t('overview.stakingInfoCard.stakeKey')}
value={
<Tooltip content={stakeAddress}>{popupView ? addEllipsis(stakeAddress, 14, 9) : stakeAddress}</Tooltip>
<Tooltip content={stakeAddress}>
<div className={styles.colContent}>{popupView ? addEllipsis(stakeAddress, 14, 9) : stakeAddress}</div>
</Tooltip>
}
dataTestid="stats-stake-key"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
display: flex;
flex-direction: column;
white-space: nowrap;
max-width: 100%;

.title {
color: var(--text-color-secondary);
Expand Down

0 comments on commit 6a80d9e

Please sign in to comment.