From a8e8d82bc2dd6ad48580ffb91701781185333eb5 Mon Sep 17 00:00:00 2001 From: jimmay5469 Date: Thu, 12 Jul 2018 09:08:45 -0400 Subject: [PATCH] Cleanup pending contract creation to_address logic Co-authored-by: Stamates Co-authored-by: katibest --- .../lib/explorer_web/templates/address/_link.html.eex | 2 -- .../templates/pending_transaction/index.html.eex | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/explorer_web/lib/explorer_web/templates/address/_link.html.eex b/apps/explorer_web/lib/explorer_web/templates/address/_link.html.eex index ac8d6f8b8f..31c6f8abe8 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address/_link.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address/_link.html.eex @@ -8,6 +8,4 @@ <%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash %> <% end %> <% end %> -<% else %> - <%= gettext("Contract Creation") %> <% end %> diff --git a/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex index 4c045018f6..6ff6e42254 100644 --- a/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex @@ -35,7 +35,11 @@ <%= 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", 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 %> <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA