Skip to content

Commit a94fa26

Browse files
committed
Merge branch 'frontend-fix-transactions' into release-v4.47.0
2 parents bd96f86 + c7f9b29 commit a94fa26

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
.amount {
2+
flex-shrink: 1;
3+
overflow: hidden;
4+
text-overflow: ellipsis;
5+
}
6+
17
.space {
28
margin-left: 0.33ch;
39
}

frontends/web/src/components/amount/amount.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const Amount = ({
110110
};
111111

112112
return (
113-
<span onClick={handleClick}>
113+
<span className={style.amount} onClick={handleClick}>
114114
<FormattedAmount
115115
amount={amount}
116116
unit={unit}

frontends/web/src/components/amount/conversion-amount.module.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88
display: flex;
99
font-variant: tabular-nums;
1010
margin-left: auto;
11-
gap: var(--space-eight);
11+
gap: 3px;
1212
}
1313

1414
.txPrefix,
1515
.txUnit {
1616
color: var(--color-secondary);
1717
font-size: 14px;
1818
line-height: 1.285714;
19+
white-space: nowrap;
1920
}
2021

2122
.txConversionAmount .txUnit {
2223
font-size: 12px;
24+
flex-shrink: 0;
2325
}
2426

2527
.txSmallInlineIcon img {

frontends/web/src/components/transactions/transaction.module.css

+15-1
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@
6363
line-height: 1.285714;
6464
padding: 0 var(--space-quarter) 0 48px;
6565
text-align: right;
66+
white-space: nowrap;
6667
}
6768
@media (max-width: 560px) {
6869
.txAmountsColumn {
70+
flex-shrink: 1;
71+
flex-basis: 60%;
72+
max-width: 60%;
6973
padding-left: 24px;
7074
}
7175
}
@@ -76,15 +80,19 @@
7680
}
7781

7882
.txAmount {
83+
align-items: baseline;
7984
font-size: 16px;
8085
font-variant: tabular-nums;
86+
gap: 3px;
87+
justify-content: flex-end;
8188
line-height: 1.25;
82-
display: block;
89+
display: flex;
8390
padding: 3px 0 3px 0;
8491
}
8592
@media (max-width: 560px) {
8693
.txAmount {
8794
padding-bottom: 4px;
95+
flex-shrink: 1;
8896
}
8997
}
9098

@@ -95,6 +103,12 @@
95103
color: var(--color-green);
96104
}
97105

106+
.txUnit {
107+
color: var(--color-secondary);
108+
font-size: 14px;
109+
line-height: 1.285714;
110+
}
111+
98112
.txNote {
99113
color: var(--color-secondary);
100114
display: block;

frontends/web/src/components/transactions/transaction.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,17 @@ const Amounts = ({
160160
type,
161161
}: TAmountsProps) => {
162162
const txTypeClass = `txAmount-${type}`;
163-
const sign = getTxSign(type);
164163
const recv = type === 'receive';
164+
const displayAmount = recv ? amount.amount : deductedAmount.amount;
165+
const sign = displayAmount ? getTxSign(type) : '';
165166

166167
return (
167168
<span className={`${styles.txAmountsColumn} ${styles[txTypeClass]}`}>
168169
{/* <data value={amount.amount}> */}
169170
<span className={styles.txAmount}>
170171
{sign}
171172
<Amount
172-
amount={recv ? amount.amount : deductedAmount.amount}
173+
amount={displayAmount}
173174
unit={recv ? amount.unit : deductedAmount.unit}
174175
/>
175176
<span className={styles.txUnit}>

0 commit comments

Comments
 (0)