Removed conditional contract create code

pull/346/head
katibest 7 years ago committed by jimmay5469
parent 75057bc40f
commit 2196450faa
  1. 36
      apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex

@ -18,20 +18,13 @@
<div> <div>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> <%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %>
&rarr; &rarr;
<%= cond do %> <%= link(
<% transaction.to_address_hash != nil -> %> transaction.created_contract_address_hash,
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %> class: "tile-label",
<% transaction.created_contract_address_hash != nil -> %> "data-address-hash": transaction.created_contract_address_hash,
<i class="fas fa-plus-square"></i> to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash),
<%= link( title: transaction.created_contract_address_hash
"Contract Creation", ) %>
class: "transaction__link",
"data-address-hash": transaction.created_contract_address_hash,
to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash),
title: transaction.created_contract_address_hash
) %>
<% true -> %>
<% end %>
</div> </div>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div> </div>
@ -59,20 +52,7 @@
<div> <div>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> <%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %>
&rarr; &rarr;
<%= cond do %> <%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %>
<% transaction.to_address_hash != nil -> %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %>
<% transaction.created_contract_address_hash != nil -> %>
<i class="fas fa-plus-square"></i>
<%= link(
"Contract Creation",
class: "transaction__link",
"data-address-hash": transaction.created_contract_address_hash,
to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash),
title: transaction.created_contract_address_hash
) %>
<% true -> %>
<% end %>
</div> </div>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div> </div>

Loading…
Cancel
Save