Merge branch 'master' into ag-README-fix

pull/1489/head
Andrew Cravenho 6 years ago committed by GitHub
commit 8e76f3950e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/block_scout_web/assets/js/app.js
  2. 10
      apps/block_scout_web/assets/js/lib/transaction_input_dropdown.js
  3. 30
      apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
  4. 3
      apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex
  5. 49
      apps/block_scout_web/priv/gettext/default.pot
  6. 51
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -46,6 +46,7 @@ import './lib/stop_propagation'
import './lib/token_balance_dropdown' import './lib/token_balance_dropdown'
import './lib/token_balance_dropdown_search' import './lib/token_balance_dropdown_search'
import './lib/token_transfers_toggle' import './lib/token_transfers_toggle'
import './lib/transaction_input_dropdown'
import './lib/async_listing_load' import './lib/async_listing_load'
import './lib/tooltip' import './lib/tooltip'
import './lib/try_api' import './lib/try_api'

@ -0,0 +1,10 @@
import $ from 'jquery'
$('.tx-input-dropdown').click(function (e) {
var el = $(e.currentTarget)
var target = $(el.attr('data-target'))
target.show()
target.siblings('.transaction-input').hide()
$('#tx-input-decoding-button').text(el.text())
})

@ -93,15 +93,37 @@
<dl class="row"> <dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Raw Input" %></dt> <dt class="col-sm-3 text-muted"><%= gettext "Raw Input" %></dt>
<dd class="col-sm-9"> <dd class="col-sm-9">
<div class="raw-transaction-input"> <div class="transaction-input" id="tx-raw-input">
<button type="button" class="copy icon-link mb-1" data-toggle="tooltip" data-placement="top" data-clipboard-text="<%= @transaction.input %>" aria-label="Copy Value"> <button type="button" class="copy icon-link mb-1" data-toggle="tooltip" data-placement="top" data-clipboard-text="<%= @transaction.input %>" aria-label="Copy Value">
<i class="fas fa-clone"></i> <i class="fas fa-clone"></i>
</button> </button>
<div class="tile tile-muted">
<pre class="pre-scrollable pre-scrollable-shorty pre-wrap mb-0"><code><%= @transaction.input %></code></pre>
</div>
</div>
<div class="transaction-input" id="tx-utf8-input" style="display: none;">
<button type="button" class="copy icon-link mb-1" data-toggle="tooltip" data-placement="top" data-clipboard-text="<%= @transaction.input %>" aria-label="Copy Value">
<i class="fas fa-clone"></i>
</button>
<div class="tile tile-muted"> <div class="tile tile-muted">
<pre class="pre-scrollable pre-scrollable-shorty pre-wrap mb-0"> <pre class="pre-scrollable pre-scrollable-shorty pre-wrap mb-0"><code><%= @transaction.input.bytes %></code></pre>
<code><%= @transaction.input %></code> </div>
</pre> </div>
<div class="dropdown pt-1">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="tx-input-decoding-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= gettext("Hex (Default)") %>
</button>
<div class="dropdown-menu" aria-labelledby="transaction-input-decoding-button">
<a class="dropdown-item tx-input-dropdown" data-target="#tx-raw-input" id="tx-dropdown-raw">
<%= gettext("Hex (Default)") %>
</a>
<a class="dropdown-item tx-input-dropdown" data-target="#tx-utf8-input" id="tx-dropdown-utf8">
<%= gettext("UTF-8") %>
</a>
</div> </div>
</div> </div>
</dd> </dd>

@ -91,6 +91,9 @@ defmodule BlockScoutWeb.TransactionView do
def contract_creation?(_), do: false def contract_creation?(_), do: false
# def utf8_encode() do
# end
def fee(%Transaction{} = transaction) do def fee(%Transaction{} = transaction) do
{_, value} = Chain.fee(transaction, :wei) {_, value} = Chain.fee(transaction, :wei)
value value

@ -49,7 +49,7 @@ msgid "%{subnetwork} Explorer - BlockScout"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:118 #: lib/block_scout_web/views/transaction_view.ex:121
msgid "(Awaiting internal transactions for status)" msgid "(Awaiting internal transactions for status)"
msgstr "" msgstr ""
@ -278,12 +278,12 @@ msgid "Contract Address Pending"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:195 #: lib/block_scout_web/views/transaction_view.ex:198
msgid "Contract Call" msgid "Contract Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:194 #: lib/block_scout_web/views/transaction_view.ex:197
msgid "Contract Creation" msgid "Contract Creation"
msgstr "" msgstr ""
@ -377,12 +377,12 @@ msgid "Error trying to fetch balances."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:122 #: lib/block_scout_web/views/transaction_view.ex:125
msgid "Error: %{reason}" msgid "Error: %{reason}"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:120 #: lib/block_scout_web/views/transaction_view.ex:123
msgid "Error: (Awaiting internal transactions for reason)" msgid "Error: (Awaiting internal transactions for reason)"
msgstr "" msgstr ""
@ -392,7 +392,7 @@ msgstr ""
#: lib/block_scout_web/templates/layout/app.html.eex:51 #: lib/block_scout_web/templates/layout/app.html.eex:51
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:19 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:19
#: lib/block_scout_web/templates/transaction/_tile.html.eex:26 #: lib/block_scout_web/templates/transaction/_tile.html.eex:26
#: lib/block_scout_web/templates/transaction/overview.html.eex:118 #: lib/block_scout_web/templates/transaction/overview.html.eex:140
#: lib/block_scout_web/views/wei_helpers.ex:72 #: lib/block_scout_web/views/wei_helpers.ex:72
msgid "Ether" msgid "Ether"
msgstr "" msgstr ""
@ -431,7 +431,7 @@ msgid "GET"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:131 #: lib/block_scout_web/templates/transaction/overview.html.eex:153
msgid "Gas" msgid "Gas"
msgstr "" msgstr ""
@ -495,7 +495,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:43 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:43
#: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10
#: lib/block_scout_web/views/address_view.ex:270 #: lib/block_scout_web/views/address_view.ex:270
#: lib/block_scout_web/views/transaction_view.ex:248 #: lib/block_scout_web/views/transaction_view.ex:251
msgid "Internal Transactions" msgid "Internal Transactions"
msgstr "" msgstr ""
@ -513,7 +513,7 @@ msgid "Less than"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:143 #: lib/block_scout_web/templates/transaction/overview.html.eex:165
msgid "Limit" msgid "Limit"
msgstr "" msgstr ""
@ -521,7 +521,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:21 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:21
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:48 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:48
#: lib/block_scout_web/templates/transaction_log/index.html.eex:10 #: lib/block_scout_web/templates/transaction_log/index.html.eex:10
#: lib/block_scout_web/views/transaction_view.ex:249 #: lib/block_scout_web/views/transaction_view.ex:252
msgid "Logs" msgid "Logs"
msgstr "" msgstr ""
@ -533,7 +533,7 @@ msgid "Market Cap"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:109 #: lib/block_scout_web/views/transaction_view.ex:112
msgid "Max of" msgid "Max of"
msgstr "" msgstr ""
@ -662,8 +662,8 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:44 #: lib/block_scout_web/templates/layout/_topnav.html.eex:44
#: lib/block_scout_web/templates/transaction/overview.html.eex:55 #: lib/block_scout_web/templates/transaction/overview.html.eex:55
#: lib/block_scout_web/views/transaction_view.ex:117 #: lib/block_scout_web/views/transaction_view.ex:120
#: lib/block_scout_web/views/transaction_view.ex:151 #: lib/block_scout_web/views/transaction_view.ex:154
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
@ -768,7 +768,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8
#: lib/block_scout_web/views/transaction_view.ex:119 #: lib/block_scout_web/views/transaction_view.ex:122
msgid "Success" msgid "Success"
msgstr "" msgstr ""
@ -879,7 +879,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:4 #: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:4
#: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4
#: lib/block_scout_web/views/transaction_view.ex:193 #: lib/block_scout_web/views/transaction_view.ex:196
msgid "Token Transfer" msgid "Token Transfer"
msgstr "" msgstr ""
@ -891,7 +891,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:36 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:36
#: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:10 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:10
#: lib/block_scout_web/views/tokens/overview_view.ex:35 #: lib/block_scout_web/views/tokens/overview_view.ex:35
#: lib/block_scout_web/views/transaction_view.ex:247 #: lib/block_scout_web/views/transaction_view.ex:250
msgid "Token Transfers" msgid "Token Transfers"
msgstr "" msgstr ""
@ -932,7 +932,7 @@ msgid "Total transactions"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:196 #: lib/block_scout_web/views/transaction_view.ex:199
msgid "Transaction" msgid "Transaction"
msgstr "" msgstr ""
@ -999,7 +999,7 @@ msgid "Unique Token"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:136 #: lib/block_scout_web/templates/transaction/overview.html.eex:158
msgid "Used" msgid "Used"
msgstr "" msgstr ""
@ -1020,7 +1020,7 @@ msgid "Validations"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:118 #: lib/block_scout_web/templates/transaction/overview.html.eex:140
msgid "Value" msgid "Value"
msgstr "" msgstr ""
@ -1642,3 +1642,14 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/overview.html.eex:85 #: lib/block_scout_web/templates/transaction/overview.html.eex:85
msgid "Transaction Speed" msgid "Transaction Speed"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:116
#: lib/block_scout_web/templates/transaction/overview.html.eex:121
msgid "Hex (Default)"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:125
msgid "UTF-8"
msgstr ""

@ -49,7 +49,7 @@ msgid "%{subnetwork} Explorer - BlockScout"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:118 #: lib/block_scout_web/views/transaction_view.ex:121
msgid "(Awaiting internal transactions for status)" msgid "(Awaiting internal transactions for status)"
msgstr "" msgstr ""
@ -278,12 +278,12 @@ msgid "Contract Address Pending"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:195 #: lib/block_scout_web/views/transaction_view.ex:198
msgid "Contract Call" msgid "Contract Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:194 #: lib/block_scout_web/views/transaction_view.ex:197
msgid "Contract Creation" msgid "Contract Creation"
msgstr "" msgstr ""
@ -377,12 +377,12 @@ msgid "Error trying to fetch balances."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:122 #: lib/block_scout_web/views/transaction_view.ex:125
msgid "Error: %{reason}" msgid "Error: %{reason}"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:120 #: lib/block_scout_web/views/transaction_view.ex:123
msgid "Error: (Awaiting internal transactions for reason)" msgid "Error: (Awaiting internal transactions for reason)"
msgstr "" msgstr ""
@ -392,7 +392,7 @@ msgstr ""
#: lib/block_scout_web/templates/layout/app.html.eex:51 #: lib/block_scout_web/templates/layout/app.html.eex:51
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:19 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:19
#: lib/block_scout_web/templates/transaction/_tile.html.eex:26 #: lib/block_scout_web/templates/transaction/_tile.html.eex:26
#: lib/block_scout_web/templates/transaction/overview.html.eex:118 #: lib/block_scout_web/templates/transaction/overview.html.eex:140
#: lib/block_scout_web/views/wei_helpers.ex:72 #: lib/block_scout_web/views/wei_helpers.ex:72
msgid "Ether" msgid "Ether"
msgstr "POA" msgstr "POA"
@ -431,7 +431,7 @@ msgid "GET"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:131 #: lib/block_scout_web/templates/transaction/overview.html.eex:153
msgid "Gas" msgid "Gas"
msgstr "" msgstr ""
@ -495,7 +495,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:43 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:43
#: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10
#: lib/block_scout_web/views/address_view.ex:270 #: lib/block_scout_web/views/address_view.ex:270
#: lib/block_scout_web/views/transaction_view.ex:248 #: lib/block_scout_web/views/transaction_view.ex:251
msgid "Internal Transactions" msgid "Internal Transactions"
msgstr "" msgstr ""
@ -513,7 +513,7 @@ msgid "Less than"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:143 #: lib/block_scout_web/templates/transaction/overview.html.eex:165
msgid "Limit" msgid "Limit"
msgstr "" msgstr ""
@ -521,7 +521,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:21 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:21
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:48 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:48
#: lib/block_scout_web/templates/transaction_log/index.html.eex:10 #: lib/block_scout_web/templates/transaction_log/index.html.eex:10
#: lib/block_scout_web/views/transaction_view.ex:249 #: lib/block_scout_web/views/transaction_view.ex:252
msgid "Logs" msgid "Logs"
msgstr "" msgstr ""
@ -533,7 +533,7 @@ msgid "Market Cap"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:109 #: lib/block_scout_web/views/transaction_view.ex:112
msgid "Max of" msgid "Max of"
msgstr "" msgstr ""
@ -662,8 +662,8 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:44 #: lib/block_scout_web/templates/layout/_topnav.html.eex:44
#: lib/block_scout_web/templates/transaction/overview.html.eex:55 #: lib/block_scout_web/templates/transaction/overview.html.eex:55
#: lib/block_scout_web/views/transaction_view.ex:117 #: lib/block_scout_web/views/transaction_view.ex:120
#: lib/block_scout_web/views/transaction_view.ex:151 #: lib/block_scout_web/views/transaction_view.ex:154
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
@ -768,7 +768,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8
#: lib/block_scout_web/views/transaction_view.ex:119 #: lib/block_scout_web/views/transaction_view.ex:122
msgid "Success" msgid "Success"
msgstr "" msgstr ""
@ -879,7 +879,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:4 #: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:4
#: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4
#: lib/block_scout_web/views/transaction_view.ex:193 #: lib/block_scout_web/views/transaction_view.ex:196
msgid "Token Transfer" msgid "Token Transfer"
msgstr "" msgstr ""
@ -891,7 +891,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:36 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:36
#: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:10 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:10
#: lib/block_scout_web/views/tokens/overview_view.ex:35 #: lib/block_scout_web/views/tokens/overview_view.ex:35
#: lib/block_scout_web/views/transaction_view.ex:247 #: lib/block_scout_web/views/transaction_view.ex:250
msgid "Token Transfers" msgid "Token Transfers"
msgstr "" msgstr ""
@ -932,7 +932,7 @@ msgid "Total transactions"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:196 #: lib/block_scout_web/views/transaction_view.ex:199
msgid "Transaction" msgid "Transaction"
msgstr "" msgstr ""
@ -999,7 +999,7 @@ msgid "Unique Token"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:136 #: lib/block_scout_web/templates/transaction/overview.html.eex:158
msgid "Used" msgid "Used"
msgstr "" msgstr ""
@ -1020,7 +1020,7 @@ msgid "Validations"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:118 #: lib/block_scout_web/templates/transaction/overview.html.eex:140
msgid "Value" msgid "Value"
msgstr "" msgstr ""
@ -1638,7 +1638,18 @@ msgstr ""
msgid "Transactions Sent" msgid "Transactions Sent"
msgstr "" msgstr ""
#, elixir-format, fuzzy #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:85 #: lib/block_scout_web/templates/transaction/overview.html.eex:85
msgid "Transaction Speed" msgid "Transaction Speed"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:116
#: lib/block_scout_web/templates/transaction/overview.html.eex:121
msgid "Hex (Default)"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:125
msgid "UTF-8"
msgstr ""

Loading…
Cancel
Save