Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
Contributor sees that a failed Transaction has Failed in its status
Browse files Browse the repository at this point in the history
  • Loading branch information
ohrite committed Feb 15, 2018
1 parent c8e4f6c commit 346e568
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 114 deletions.
4 changes: 2 additions & 2 deletions lib/explorer/forms/transaction_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ defmodule Explorer.TransactionForm do

def status(transaction, receipt) do
%{
0 => %{true => :out_of_gas, false => :failure},
0 => %{true => :out_of_gas, false => :failed},
1 => %{true => :success, false => :success}
}
|> Map.get(receipt.status, %{true: :pending, false: :pending})
Expand All @@ -79,7 +79,7 @@ defmodule Explorer.TransactionForm do
def format_status(status) do
%{
out_of_gas: gettext("Out of Gas"),
failure: gettext("Failure"),
failed: gettext("Failed"),
success: gettext("Success"),
pending: gettext("Pending"),
} |> Map.fetch!(status)
Expand Down
135 changes: 80 additions & 55 deletions priv/gettext/default.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#: lib/explorer_web/templates/block/index.html.eex:12
#: lib/explorer_web/templates/block_transaction/index.html.eex:17
#: lib/explorer_web/templates/chain/show.html.eex:61
#: lib/explorer_web/templates/chain/show.html.eex:89
#: lib/explorer_web/templates/transaction/index.html.eex:17
#: lib/explorer_web/templates/transaction/show.html.eex:34
#: lib/explorer_web/templates/transaction/index.html.eex:18
#: lib/explorer_web/templates/transaction/show.html.eex:39
msgid "Age"
msgstr ""

#: lib/explorer_web/templates/block_transaction/index.html.eex:16
#: lib/explorer_web/templates/chain/show.html.eex:28
#: lib/explorer_web/templates/chain/show.html.eex:88
#: lib/explorer_web/templates/transaction/index.html.eex:16
#: lib/explorer_web/templates/transaction/index.html.eex:17
msgid "Block"
msgstr ""

Expand All @@ -22,15 +24,16 @@ msgid "Copyright %{year} POA"
msgstr ""

#: lib/explorer_web/templates/block/index.html.eex:14
#: lib/explorer_web/templates/block/show.html.eex:53
#: lib/explorer_web/templates/block/show.html.eex:54
#: lib/explorer_web/templates/chain/show.html.eex:63
msgid "Gas Used"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:25
#: lib/explorer_web/templates/block/show.html.eex:26
#: lib/explorer_web/templates/block_transaction/index.html.eex:15
#: lib/explorer_web/templates/chain/show.html.eex:87
#: lib/explorer_web/templates/pending_transaction/index.html.eex:15
#: lib/explorer_web/templates/transaction/index.html.eex:15
#: lib/explorer_web/templates/pending_transaction/index.html.eex:16
#: lib/explorer_web/templates/transaction/index.html.eex:16
msgid "Hash"
msgstr ""

Expand All @@ -45,7 +48,9 @@ msgid "POA Network Explorer"
msgstr ""

#: lib/explorer_web/templates/block/index.html.eex:13
#: lib/explorer_web/templates/block/show.html.eex:21
#: lib/explorer_web/templates/block/show.html.eex:8
#: lib/explorer_web/templates/block/show.html.eex:22
#: lib/explorer_web/templates/block_transaction/index.html.eex:8
#: lib/explorer_web/templates/chain/show.html.eex:43
#: lib/explorer_web/templates/chain/show.html.eex:62
#: lib/explorer_web/templates/chain/show.html.eex:81
Expand All @@ -55,65 +60,67 @@ msgstr ""
msgid "Transactions"
msgstr ""

#: lib/explorer_web/templates/block_transaction/index.html.eex:20
#: lib/explorer_web/templates/chain/show.html.eex:90
#: lib/explorer_web/templates/pending_transaction/index.html.eex:19
#: lib/explorer_web/templates/transaction/index.html.eex:20
#: lib/explorer_web/templates/transaction/show.html.eex:38
#: lib/explorer_web/templates/pending_transaction/index.html.eex:20
#: lib/explorer_web/templates/transaction/index.html.eex:21
#: lib/explorer_web/templates/transaction/show.html.eex:43
msgid "Value"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:3
#: lib/explorer_web/templates/block_transaction/index.html.eex:3
msgid "Block #%{number} Details"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:37
#: lib/explorer_web/templates/block/show.html.eex:38
msgid "Difficulty"
msgstr ""

#: lib/explorer_web/templates/block/index.html.eex:15
#: lib/explorer_web/templates/block/show.html.eex:57
#: lib/explorer_web/templates/transaction/show.html.eex:74
#: lib/explorer_web/templates/block/show.html.eex:58
#: lib/explorer_web/templates/transaction/show.html.eex:79
msgid "Gas Limit"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:33
#: lib/explorer_web/templates/block/show.html.eex:34
msgid "Miner"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:61
#: lib/explorer_web/templates/transaction/show.html.eex:86
#: lib/explorer_web/templates/block/show.html.eex:62
#: lib/explorer_web/templates/transaction/show.html.eex:91
msgid "Nonce"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:13
#: lib/explorer_web/templates/block/show.html.eex:14
msgid "Number"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:29
#: lib/explorer_web/templates/block/show.html.eex:30
msgid "Parent Hash"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:49
#: lib/explorer_web/templates/block/show.html.eex:50
msgid "Size"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:17
#: lib/explorer_web/templates/block/show.html.eex:18
msgid "Timestamp"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:45
#: lib/explorer_web/templates/block/show.html.eex:46
msgid "Total Difficulty"
msgstr ""

#: lib/explorer_web/templates/transaction/show.html.eex:23
#: lib/explorer_web/templates/transaction/show.html.eex:28
msgid "Block Number"
msgstr ""

#: lib/explorer_web/templates/transaction/show.html.eex:3
msgid "Transaction Details"
msgstr ""

#: lib/explorer_web/templates/transaction/show.html.eex:82
#: lib/explorer_web/templates/transaction/show.html.eex:87
msgid "Cumulative Gas Used"
msgstr ""

Expand All @@ -122,19 +129,19 @@ msgid "Gas"
msgstr ""

#: lib/explorer_web/templates/block/index.html.eex:16
#: lib/explorer_web/templates/transaction/show.html.eex:78
#: lib/explorer_web/templates/transaction/show.html.eex:83
msgid "Gas Price"
msgstr ""

#: lib/explorer_web/templates/transaction/show.html.eex:90
#: lib/explorer_web/templates/transaction/show.html.eex:95
msgid "Input"
msgstr ""

#: lib/explorer_web/templates/transaction/show.html.eex:29
#: lib/explorer_web/templates/transaction/show.html.eex:34
msgid "%{confirmations} block confirmations"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:22
#: lib/explorer_web/templates/block/show.html.eex:23
msgid "%{count} transactions in this block"
msgstr ""

Expand All @@ -143,25 +150,28 @@ msgstr ""
msgid "Address"
msgstr ""

#: lib/explorer_web/templates/pending_transaction/index.html.eex:17
#: lib/explorer_web/templates/transaction/index.html.eex:18
#: lib/explorer_web/templates/transaction/show.html.eex:42
#: lib/explorer_web/templates/block_transaction/index.html.eex:18
#: lib/explorer_web/templates/pending_transaction/index.html.eex:18
#: lib/explorer_web/templates/transaction/index.html.eex:19
#: lib/explorer_web/templates/transaction/show.html.eex:47
msgid "From"
msgstr ""

#: lib/explorer_web/templates/block/show.html.eex:7
#: lib/explorer_web/templates/block_transaction/index.html.eex:7
#: lib/explorer_web/templates/transaction/show.html.eex:8
#: lib/explorer_web/templates/transaction_log/index.html.eex:8
msgid "Overview"
msgstr ""

#: lib/explorer/forms/transaction_form.ex:65
#: lib/explorer/forms/transaction_form.ex:83
msgid "Success"
msgstr ""

#: lib/explorer_web/templates/pending_transaction/index.html.eex:18
#: lib/explorer_web/templates/transaction/index.html.eex:19
#: lib/explorer_web/templates/transaction/show.html.eex:52
#: lib/explorer_web/templates/block_transaction/index.html.eex:19
#: lib/explorer_web/templates/pending_transaction/index.html.eex:19
#: lib/explorer_web/templates/transaction/index.html.eex:20
#: lib/explorer_web/templates/transaction/show.html.eex:57
msgid "To"
msgstr ""

Expand All @@ -178,10 +188,11 @@ msgid "Balance"
msgstr ""

#: lib/explorer_web/templates/address/show.html.eex:11
#: lib/explorer_web/templates/block_transaction/index.html.eex:46
#: lib/explorer_web/templates/chain/show.html.eex:103
#: lib/explorer_web/templates/pending_transaction/index.html.eex:43
#: lib/explorer_web/templates/transaction/index.html.eex:41
#: lib/explorer_web/templates/transaction/show.html.eex:39
#: lib/explorer_web/templates/pending_transaction/index.html.eex:49
#: lib/explorer_web/templates/transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction/show.html.eex:44
msgid "POA"
msgstr ""

Expand All @@ -197,29 +208,26 @@ msgstr ""
msgid "Showing %{count} Transactions"
msgstr ""

#: lib/explorer/forms/transaction_form.ex:40
#: lib/explorer/forms/transaction_form.ex:44
#: lib/explorer/forms/transaction_form.ex:48
#: lib/explorer/forms/transaction_form.ex:67
#: lib/explorer/forms/transaction_form.ex:42
#: lib/explorer/forms/transaction_form.ex:46
#: lib/explorer/forms/transaction_form.ex:50
#: lib/explorer/forms/transaction_form.ex:54
#: lib/explorer/forms/transaction_form.ex:84
#: lib/explorer_web/templates/pending_transaction/index.html.eex:9
#: lib/explorer_web/templates/pending_transaction/index.html.eex:33
#: lib/explorer_web/templates/pending_transaction/index.html.eex:40
#: lib/explorer_web/templates/pending_transaction/index.html.eex:39
#: lib/explorer_web/templates/pending_transaction/index.html.eex:46
#: lib/explorer_web/templates/transaction/index.html.eex:9
#: lib/explorer_web/templates/transaction/show.html.eex:47
#: lib/explorer_web/templates/transaction/show.html.eex:57
#: lib/explorer_web/templates/transaction/show.html.eex:52
#: lib/explorer_web/templates/transaction/show.html.eex:62
msgid "Pending"
msgstr ""

#: lib/explorer/forms/transaction_form.ex:65
msgid "Failure"
msgstr ""

#: lib/explorer_web/templates/transaction/show.html.eex:66
#: lib/explorer_web/templates/transaction/show.html.eex:71
msgid "First Seen"
msgstr ""

#: lib/explorer_web/templates/pending_transaction/index.html.eex:16
#: lib/explorer_web/templates/transaction/show.html.eex:70
#: lib/explorer_web/templates/pending_transaction/index.html.eex:17
#: lib/explorer_web/templates/transaction/show.html.eex:75
msgid "Last Seen"
msgstr ""

Expand Down Expand Up @@ -268,7 +276,24 @@ msgstr ""
msgid "TPM"
msgstr ""

#, elixir-format
#: lib/explorer_web/templates/transaction/index.html.eex:46
#: lib/explorer_web/templates/pending_transaction/index.html.eex:54
#: lib/explorer_web/templates/transaction/index.html.eex:52
msgid "Next Page"
msgstr ""

#, elixir-format
#: lib/explorer/forms/transaction_form.ex:82
msgid "Failed"
msgstr ""

#, elixir-format
#: lib/explorer/forms/transaction_form.ex:81
msgid "Out of Gas"
msgstr ""

#, elixir-format
#: lib/explorer_web/templates/block_transaction/index.html.eex:14
#: lib/explorer_web/templates/pending_transaction/index.html.eex:15
#: lib/explorer_web/templates/transaction/index.html.eex:15
msgid "Status"
msgstr ""
Loading

0 comments on commit 346e568

Please sign in to comment.