Skip to content

Commit 4172618

Browse files
authored
Merge pull request #2269 from oasisprotocol/lw/align-balance
Right-align balances
2 parents 3bfd5f8 + 8e4fcb9 commit 4172618

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

.changelog/2269.trivial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Right-align balances

src/app/components/Account/ConsensusAccountDetailsView.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,27 @@ export const ConsensusAccountDetailsView: FC<ConsensusAccountDetailsViewProps> =
7373
</dd>
7474
<dt>{t('account.totalBalance')}</dt>
7575
<dd>
76-
<RoundedBalance value={account.total} ticker={account.ticker} />
76+
<div className="w-full max-w-[25ex] text-right">
77+
<RoundedBalance value={account.total} ticker={account.ticker} />
78+
</div>
7779
</dd>
7880
<StyledListTitle>{t('account.available')}</StyledListTitle>
7981
<dd>
80-
<RoundedBalance value={account.available} ticker={account.ticker} />
82+
<div className="w-full max-w-[25ex] text-right">
83+
<RoundedBalance value={account.available} ticker={account.ticker} />
84+
</div>
8185
</dd>
8286
<StyledListTitle>{t('common.staked')}</StyledListTitle>
8387
<dd>
84-
<RoundedBalance value={account.delegations_balance} ticker={account.ticker} />
88+
<div className="w-full max-w-[25ex] text-right">
89+
<RoundedBalance value={account.delegations_balance} ticker={account.ticker} />
90+
</div>
8591
</dd>
8692
<StyledListTitle>{t('account.debonding')}</StyledListTitle>
8793
<dd>
88-
<RoundedBalance value={account.debonding_delegations_balance} ticker={account.ticker} />
94+
<div className="w-full max-w-[25ex] text-right">
95+
<RoundedBalance value={account.debonding_delegations_balance} ticker={account.ticker} />
96+
</div>
8997
</dd>
9098
<dt>{t('common.nonce')}</dt>
9199
<dd>{account.nonce}</dd>

src/app/pages/ValidatorDetailsPage/index.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,27 @@ export const ValidatorDetailsView: FC<{
176176
{account && (
177177
<>
178178
<dd>
179-
<RoundedBalance value={account.total} ticker={account.ticker} />
179+
<div className="w-full max-w-[25ex] text-right">
180+
<RoundedBalance value={account.total} ticker={account.ticker} />
181+
</div>
180182
</dd>
181183
<StyledListTitle>{t('account.available')}</StyledListTitle>
182184
<dd>
183-
<RoundedBalance value={account.available} ticker={account.ticker} />
185+
<div className="w-full max-w-[25ex] text-right">
186+
<RoundedBalance value={account.available} ticker={account.ticker} />
187+
</div>
184188
</dd>
185189
<StyledListTitle>{t('common.staked')}</StyledListTitle>
186190
<dd>
187-
<RoundedBalance value={account.delegations_balance} ticker={account.ticker} />
191+
<div className="w-full max-w-[25ex] text-right">
192+
<RoundedBalance value={account.delegations_balance} ticker={account.ticker} />
193+
</div>
188194
</dd>
189195
<StyledListTitle>{t('account.debonding')}</StyledListTitle>
190196
<dd>
191-
<RoundedBalance value={account.debonding_delegations_balance} ticker={account.ticker} />
197+
<div className="w-full max-w-[25ex] text-right">
198+
<RoundedBalance value={account.debonding_delegations_balance} ticker={account.ticker} />
199+
</div>
192200
</dd>
193201
</>
194202
)}

src/locales/en/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"sizeTooltip": "This account is indicated as an {{size}} account based on sum of assets they own.",
2626
"startStaking": "Start staking now",
2727
"title": "Account",
28-
"totalBalance": "Total Balance",
28+
"totalBalance": "Total balance",
2929
"totalValue": "Total {{value}}"
3030
},
3131
"activeAccounts": {

0 commit comments

Comments
 (0)