Misc minor fixes

pull/3687/head
Victor Baranov 4 years ago
parent 3784df7362
commit cda0f9acf4
  1. 1
      CHANGELOG.md
  2. 7
      apps/block_scout_web/assets/css/theme/_dark-theme.scss
  3. 6
      apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex
  4. 8
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  5. 2
      apps/block_scout_web/lib/block_scout_web/templates/stakes/_stakes_top.html.eex
  6. 16
      apps/block_scout_web/lib/block_scout_web/views/address_view.ex

@ -27,6 +27,7 @@
- [#3577](https://github.com/poanetwork/blockscout/pull/3577) - Eliminate GraphiQL page XSS attack
### Chore
- [#3687](https://github.com/poanetwork/blockscout/pull/3687) - Miscellaneous minor fixes
- [#3667](https://github.com/poanetwork/blockscout/pull/3667) - Store bridged token price in the DB
- [#3662](https://github.com/poanetwork/blockscout/pull/3662) - Order bridged tokens in descending order by tokens holder for Omni bridge cap calculation
- [#3659](https://github.com/poanetwork/blockscout/pull/3659) - Staking Dapp new buttons: swap, bridge

@ -1033,9 +1033,10 @@ $dark-stakes-banned-background: #3e314c;
background: #6ca1e2
}
.bs-label.destination-eth {
background-color: $labels-dark;
}
.bs-label.validator,
.bs-label.destination-eth {
background-color: $labels-dark;
}
.dropdown-item {
.external-link-icon {

@ -47,7 +47,7 @@
<h3><%= gettext("Main Networks") %></h3>
<ul>
<%= for %{title: title, url: url} <- main_nets do %>
<li><a href="<%= url%>" rel="norefferer" class="footer-link"> <%= title %> </a></li>
<li><a href="<%= url %>" rel="norefferer" class="footer-link"> <%= title %> </a></li>
<% end %>
</ul>
</div>
@ -60,7 +60,7 @@
<h3><%= gettext("Test Networks") %></h3>
<ul>
<%= for %{title: title, url: url} <- test_nets do %>
<li><a href="<%= url%>" rel="noreferrer" class="footer-link"> <%= title %> </a></li>
<li><a href="<%= url %>" rel="noreferrer" class="footer-link"> <%= title %> </a></li>
<% end %>
</ul>
</div>
@ -71,7 +71,7 @@
<h3><%= gettext("Other Explorers") %></h3>
<ul>
<%= for {name, url} <- other_explorers do %>
<li><a href="<%= url%>" rel="noreferrer" class="footer-link"> <%= name %> </a></li>
<li><a href="<%= url %>" rel="noreferrer" class="footer-link"> <%= name %> </a></li>
<% end %>
</ul>
</div>

@ -163,7 +163,7 @@
<% end %>
<%= if Application.get_env(:block_scout_web, :apps_menu) == true do %>
<%= for %{url: url, title: title} <- external_apps_list() do %>
<a href="<%= url%>" class="dropdown-item" target="_blank"><%= title %>
<a href="<%= url %>" class="dropdown-item" target="_blank"><%= title %>
<span class="external-link-icon">
<%= render BlockScoutWeb.IconsView, "_external_link.html" %>
</span>
@ -183,15 +183,15 @@
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item header division">Mainnets</a>
<%= for %{url: url, title: title} <- dropdown_head_main_nets() do %>
<a class="dropdown-item" href="<%= url%>"><%= title %></a>
<a class="dropdown-item" href="<%= url %>"><%= title %></a>
<% end %>
<a class="dropdown-item header division">Testnets</a>
<%= for %{url: url, title: title} <- test_nets(dropdown_nets()) do %>
<a class="dropdown-item" href="<%= url%>"><%= title %></a>
<a class="dropdown-item" href="<%= url %>"><%= title %></a>
<% end %>
<a class="dropdown-item header division">Other Networks</a>
<%= for %{url: url, title: title} <- dropdown_other_nets() do %>
<a class="dropdown-item" href="<%= url%>"><%= title %></a>
<a class="dropdown-item" href="<%= url %>"><%= title %></a>
<% end %>
</div>
</li>

@ -31,7 +31,7 @@
</div>
<div class="stakes-top-buttons right">
<%= render BlockScoutWeb.CommonComponentsView, "_btn_external_link.html", text: gettext("Swap STAKE"), link: "https://app.honeyswap.org/#/swap?outputCurrency=0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d&inputCurrency=0xb7D311E2Eb55F2f68a9440da38e7989210b9A05e&exactField=input", extra_class: "full-width btn-add-full" %>
<%= render BlockScoutWeb.CommonComponentsView, "_btn_external_link.html", text: gettext("Bridge to Ethereum"), link: "https://bridge.xdaichain.com/", extra_class: "full-width" %>
<%= render BlockScoutWeb.CommonComponentsView, "_btn_external_link.html", text: gettext("Bridge to Ethereum"), link: "https://omni.xdaichain.com/", extra_class: "full-width" %>
</div>
</div>
</div>

@ -427,4 +427,20 @@ defmodule BlockScoutWeb.AddressView do
end
def smart_contract_is_gnosis_safe_proxy?(_address), do: false
def is_omni_bridge?(nil), do: false
def is_omni_bridge?(address_hash) do
address_hash_str = "0x" <> Base.encode16(address_hash.bytes, case: :lower)
address_hash_str == String.downcase(System.get_env("ETH_OMNI_BRIDGE_MEDIATOR", "")) ||
address_hash_str == String.downcase(System.get_env("BSC_OMNI_BRIDGE_MEDIATOR", ""))
end
def is_amb_bridge?(nil), do: false
def is_amb_bridge?(address_hash) do
address_hash_str = "0x" <> Base.encode16(address_hash.bytes, case: :lower)
String.downcase(System.get_env("AMB_BRIDGE_MEDIATORS", "")) =~ address_hash_str
end
end

Loading…
Cancel
Save