Cleanup pending contract creation to_address logic

Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: katibest <katibest@gaslight.co>
pull/395/head
jimmay5469 6 years ago
parent 0bcce17865
commit a8e8d82bc2
  1. 2
      apps/explorer_web/lib/explorer_web/templates/address/_link.html.eex
  2. 6
      apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex

@ -8,6 +8,4 @@
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash %> <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash %>
<% end %> <% end %>
<% end %> <% end %>
<% else %>
<%= gettext("Contract Creation") %>
<% end %> <% end %>

@ -35,7 +35,11 @@
<span> <span>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %> <%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
&rarr; &rarr;
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(transaction), locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address) %> <%= if transaction.to_address_hash do %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address) %>
<% else %>
<%= gettext("Contract Address Pending") %>
<% end %>
</span> </span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div> </div>

Loading…
Cancel
Save