diff --git a/apps/block_scout_web/assets/css/components/_stakes_table.scss b/apps/block_scout_web/assets/css/components/_stakes_table.scss index 38a46f1618..ded5ae30f0 100644 --- a/apps/block_scout_web/assets/css/components/_stakes_table.scss +++ b/apps/block_scout_web/assets/css/components/_stakes_table.scss @@ -118,6 +118,7 @@ $stakes-link-color: $primary !default; .stakes-th-text { margin-right: 10px; white-space: nowrap; + text-align: center; } .stakes-td { diff --git a/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex index 0b438e88e3..1fb85bea15 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex @@ -13,14 +13,14 @@ <%= render BlockScoutWeb.StakesView, "_stakes_th.html", title: gettext("Staker's Address"), tooltip: gettext("All pool participant addresses. The top address belongs to the validator.") %>
- <%= render BlockScoutWeb.StakesView, "_stakes_th.html", title: gettext("Total Stake Amount"), tooltip: gettext("Amount of STAKE placed by an address") %> + <%= render BlockScoutWeb.StakesView, "_stakes_th.html", title: gettext("Current Stake Amount") <> "
(" <> gettext("Accounted Stake Amount") <> ")", tooltip: gettext("Amount of STAKE placed by an address") %>
<%= - title = if @pool.is_validator do gettext("Reward Percent") else gettext("Potential Reward Percent") end + _title = if @pool.is_validator do gettext("Reward Percent") else gettext("Potential Reward Percent") end render BlockScoutWeb.StakesView, "_stakes_th.html", - title: title, + title: gettext("Potential Reward Percent") <> "
(" <> gettext("Current Reward Percent") <> ")", tooltip: gettext("Reward distribution is based on stake amount. Validator receives a minimum of 30%.") %>
@@ -52,8 +52,15 @@ <% end %> -
<%= format_token_amount(delegator.stake_amount, @token, symbol: false) %>
-
<%= if delegator.reward_ratio do "#{delegator.reward_ratio}%" else "-" end %>
+
<%= format_token_amount(delegator.stake_amount, @token, symbol: false) %> (<%= if delegator.snapshotted_stake_amount do format_token_amount(delegator.snapshotted_stake_amount, @token, symbol: false) else 0 end %>)
+
+ <%= if delegator.reward_ratio do %> + <%= delegator.reward_ratio %>% + (<%= if delegator.snapshotted_reward_ratio do "#{delegator.snapshotted_reward_ratio}%" else "0%" end %>) + <% else %> + - + <% end %> +
<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_th.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_th.html.eex index bb44f76e91..4a703cfe54 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_th.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_th.html.eex @@ -1,6 +1,6 @@
- <%= @title %> + <%= raw(@title) %> <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip.html", text: @tooltip %>
\ No newline at end of file