Add links to addresses in Delegators window

staking
Vadim 5 years ago committed by Victor Baranov
parent e96a7848b0
commit 23874e088a
  1. 5
      apps/block_scout_web/assets/css/components/stakes/_stakes.scss
  2. 1
      apps/block_scout_web/lib/block_scout_web/channels/stakes_channel.ex
  3. 6
      apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex

@ -93,6 +93,11 @@ $stakes-stats-item-border-color: #fff !default;
.stakes-tr-banned & {
color: $stakes-banned-color;
}
a {
text-decoration: none;
color: $stakes-address-color;
}
}
.stakes-address-active {

@ -75,6 +75,7 @@ defmodule BlockScoutWeb.StakesChannel do
View.render_to_string(StakesView, "_stakes_modal_delegators_list.html",
account: socket.assigns[:account],
pool: pool,
conn: socket,
delegators: delegators,
token: token,
show_snapshotted_data: show_snapshotted_data

@ -47,7 +47,11 @@
<div class="col-4 stakes-td stakes-cell">
<div class="stakes-address-container">
<span class="stakes-address">
<%= BlockScoutWeb.AddressView.trimmed_hash(delegator.delegator_address_hash) %>
<%= link(
BlockScoutWeb.AddressView.trimmed_hash(delegator.delegator_address_hash),
to: address_path(@conn, :show, delegator.delegator_address_hash),
target: "_blank"
) %>
</span>
<%= if delegator.delegator_address_hash == @pool.staking_address_hash and @pool.is_validator do %>
<%= render BlockScoutWeb.CommonComponentsView, "_check_tooltip.html", text: gettext("This is a validator") %>

Loading…
Cancel
Save