From ed9e566e8e98fc253720a730ee092888c5c25d1e Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 10:57:09 +0300 Subject: [PATCH 1/9] fix rsk total supply for empty exchang rate --- apps/explorer/lib/explorer/chain/supply/rsk.ex | 8 ++++++-- .../explorer/test/explorer/chain/supply/rsk_test.exs | 12 +++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/supply/rsk.ex b/apps/explorer/lib/explorer/chain/supply/rsk.ex index cdb043418b..27a13bfdd2 100644 --- a/apps/explorer/lib/explorer/chain/supply/rsk.ex +++ b/apps/explorer/lib/explorer/chain/supply/rsk.ex @@ -17,12 +17,16 @@ defmodule Explorer.Chain.Supply.RSK do @cache_name :rsk_balance @balance_key :balance - def market_cap(exchange_rate) do + def market_cap(%{usd_value: nil}), do: Decimal.new(0) + + def market_cap(%{usd_value: usd_value}) do btc = circulating() - Decimal.mult(btc, exchange_rate.usd_value) + Decimal.mult(btc, usd_value) end + def market_cap(_), do: Decimal.new(0) + @doc "Equivalent to getting the circulating value " def supply_for_days(days) do now = Timex.now() diff --git a/apps/explorer/test/explorer/chain/supply/rsk_test.exs b/apps/explorer/test/explorer/chain/supply/rsk_test.exs index 71d3a530bb..6efc2bb844 100644 --- a/apps/explorer/test/explorer/chain/supply/rsk_test.exs +++ b/apps/explorer/test/explorer/chain/supply/rsk_test.exs @@ -24,7 +24,17 @@ defmodule Explorer.Chain.Supply.RSKTest do exchange_rate = %{Token.null() | usd_value: Decimal.new(1_000_000)} - assert Decimal.equal?(RSK.market_cap(exchange_rate), Decimal.new(100.0000)) + assert Decimal.equal?(RSK.market_cap(exchange_rate), Decimal.from_float(100.0000)) + end + + test "returns zero when exchange_rate is empty" do + assert RSK.market_cap(nil) == Decimal.new(0) + end + + test "returns zero when usd_value is nil" do + exchange_rate = %{Token.null() | usd_value: nil} + + assert RSK.market_cap(exchange_rate) == Decimal.new(0) end end From a9c5982e0e5ce07a97e190513d148556cf81e818 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 11:18:44 +0300 Subject: [PATCH 2/9] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ade434a9d7..5ae09463b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - [#2403](https://github.com/poanetwork/blockscout/pull/2403) - Return gasPrice field at the result of gettxinfo method ### Fixes +- [#2559](https://github.com/poanetwork/blockscout/pull/2559) - fix rsk total supply for empty exchange rate - [#2553](https://github.com/poanetwork/blockscout/pull/2553) - Dark theme import to the end of sass - [#2550](https://github.com/poanetwork/blockscout/pull/2550) - correctly encode decimal values for frontend - [#2549](https://github.com/poanetwork/blockscout/pull/2549) - Fix wrong colour of tooltip From 37794384fb2e681fe8c7c8b8e51a4479d955c2ac Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 11:21:12 +0300 Subject: [PATCH 3/9] move change entry to new release section --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae09463b2..3b3a02e7e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#2559](https://github.com/poanetwork/blockscout/pull/2559) - fix rsk total supply for empty exchange rate ### Chore @@ -19,7 +20,6 @@ - [#2403](https://github.com/poanetwork/blockscout/pull/2403) - Return gasPrice field at the result of gettxinfo method ### Fixes -- [#2559](https://github.com/poanetwork/blockscout/pull/2559) - fix rsk total supply for empty exchange rate - [#2553](https://github.com/poanetwork/blockscout/pull/2553) - Dark theme import to the end of sass - [#2550](https://github.com/poanetwork/blockscout/pull/2550) - correctly encode decimal values for frontend - [#2549](https://github.com/poanetwork/blockscout/pull/2549) - Fix wrong colour of tooltip From 45a8a48495c13b638dc05ebb8b111ec44becb356 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 11:52:40 +0300 Subject: [PATCH 4/9] move CHANGELOG entry to old release --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b3a02e7e6..5ae09463b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ ### Features ### Fixes -- [#2559](https://github.com/poanetwork/blockscout/pull/2559) - fix rsk total supply for empty exchange rate ### Chore @@ -20,6 +19,7 @@ - [#2403](https://github.com/poanetwork/blockscout/pull/2403) - Return gasPrice field at the result of gettxinfo method ### Fixes +- [#2559](https://github.com/poanetwork/blockscout/pull/2559) - fix rsk total supply for empty exchange rate - [#2553](https://github.com/poanetwork/blockscout/pull/2553) - Dark theme import to the end of sass - [#2550](https://github.com/poanetwork/blockscout/pull/2550) - correctly encode decimal values for frontend - [#2549](https://github.com/poanetwork/blockscout/pull/2549) - Fix wrong colour of tooltip From 4bc4d1412837e31c34c7a84471ab7d697d751d15 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 12:21:08 +0300 Subject: [PATCH 5/9] fix slash before not empty path --- .../templates/api_docs/eth_rpc.html.eex | 2 +- .../templates/api_docs/index.html.eex | 2 +- .../block_scout_web/views/api_docs_view.ex | 18 ++++++++++ .../views/api_docs_view_test.exs | 36 +++++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex index 0b44781e1e..7b8a9a98de 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex @@ -2,7 +2,7 @@

<%= gettext("ETH RPC API Documentation") %>

-

[ <%= gettext "Base URL:" %> <%= blockscout_url() %>api/eth_rpc ]

+

[ <%= gettext "Base URL:" %> <%= eth_rpc_api_url()%> ]

<%= gettext "This API is provided to support some rpc methods in the exact format specified for ethereum nodes, which can be found " %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex index 8f24a9cace..59dae38cdb 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex @@ -2,7 +2,7 @@

<%= gettext("API Documentation") %>

-

[ <%= gettext "Base URL:" %> <%= blockscout_url() %>api ]

+

[ <%= gettext "Base URL:" %> <%= api_url()%> ]

<%= gettext "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests." %>

diff --git a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex index f71ebc240b..13381f5faf 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex @@ -46,4 +46,22 @@ defmodule BlockScoutWeb.APIDocsView do Endpoint.url() end end + + def api_url do + handle_slash("api") + end + + def eth_rpc_api_url do + handle_slash("api/eth_rpc") + end + + defp handle_slash(path) do + base_url = blockscout_url() + + if String.ends_with?(base_url, "/") do + base_url <> path + else + base_url <> "/" <> path + end + end end diff --git a/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs b/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs index da43a33ad0..434f43d31b 100644 --- a/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs +++ b/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs @@ -28,4 +28,40 @@ defmodule BlockScoutWeb.ApiDocsViewTest do assert APIDocsView.blockscout_url() == "https://blockscout.com/chain/dog" end end + + describe "api_url/1" do + test "adds slash before path" do + Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, + url: [scheme: "https", host: "blockscout.com", port: 9999, path: "/chain/dog"] + ) + + assert APIDocsView.api_url() == "https://blockscout.com/chain/dog/api" + end + + test "does not add slash to empty path" do + Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, + url: [scheme: "https", host: "blockscout.com", port: 9999, path: ""] + ) + + assert APIDocsView.api_url() == "https://blockscout.com/api" + end + end + + describe "eth_rpc_api_url/1" do + test "adds slash before path" do + Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, + url: [scheme: "https", host: "blockscout.com", port: 9999, path: "/chain/dog"] + ) + + assert APIDocsView.eth_rpc_api_url() == "https://blockscout.com/chain/dog/api/eth_rpc" + end + + test "does not add slash to empty path" do + Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, + url: [scheme: "https", host: "blockscout.com", port: 9999, path: ""] + ) + + assert APIDocsView.eth_rpc_api_url() == "https://blockscout.com/api/eth_rpc" + end + end end From daef1aff5880f72b051a30ebe9ce55d3c5400b18 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 12:24:19 +0300 Subject: [PATCH 6/9] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ade434a9d7..473a0f4e20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - [#2403](https://github.com/poanetwork/blockscout/pull/2403) - Return gasPrice field at the result of gettxinfo method ### Fixes +- [#2560](https://github.com/poanetwork/blockscout/pull/2560) - fix slash before not empty path in docs - [#2553](https://github.com/poanetwork/blockscout/pull/2553) - Dark theme import to the end of sass - [#2550](https://github.com/poanetwork/blockscout/pull/2550) - correctly encode decimal values for frontend - [#2549](https://github.com/poanetwork/blockscout/pull/2549) - Fix wrong colour of tooltip From 95da8e1a0cb1168de6819be905a74a4f85551e9f Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 15:04:41 +0300 Subject: [PATCH 7/9] fix CR issues --- apps/explorer/lib/explorer/chain/supply/rsk.ex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/supply/rsk.ex b/apps/explorer/lib/explorer/chain/supply/rsk.ex index 27a13bfdd2..eb7c4571cd 100644 --- a/apps/explorer/lib/explorer/chain/supply/rsk.ex +++ b/apps/explorer/lib/explorer/chain/supply/rsk.ex @@ -17,9 +17,7 @@ defmodule Explorer.Chain.Supply.RSK do @cache_name :rsk_balance @balance_key :balance - def market_cap(%{usd_value: nil}), do: Decimal.new(0) - - def market_cap(%{usd_value: usd_value}) do + def market_cap(%{usd_value: usd_value}) when not is_nil(usd_value) do btc = circulating() Decimal.mult(btc, usd_value) From e7f88a2b2e146ff5a7761474acb0b439548a3027 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 13 Aug 2019 14:58:26 +0300 Subject: [PATCH 8/9] Fix dark theme flickering --- CHANGELOG.md | 1 + .../templates/layout/_topnav.html.eex | 1 - .../templates/layout/app.html.eex | 8 ++- apps/block_scout_web/priv/gettext/default.pot | 16 ++--- .../priv/gettext/en/LC_MESSAGES/default.po | 64 +++++++++---------- 5 files changed, 47 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ade434a9d7..c4381426e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - [#2403](https://github.com/poanetwork/blockscout/pull/2403) - Return gasPrice field at the result of gettxinfo method ### Fixes +- [#2562](https://github.com/poanetwork/blockscout/pull/2562) - Fix dark theme flickering - [#2553](https://github.com/poanetwork/blockscout/pull/2553) - Dark theme import to the end of sass - [#2550](https://github.com/poanetwork/blockscout/pull/2550) - correctly encode decimal values for frontend - [#2549](https://github.com/poanetwork/blockscout/pull/2549) - Fix wrong colour of tooltip diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index b628e1245d..970206636c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -159,6 +159,5 @@ if (localStorage.getItem("current-color-mode") === "dark") { var modeChanger = document.getElementById("dark-mode-changer"); modeChanger.className += " " + "dark-mode-changer--dark"; - document.body.className += " " + "dark-theme-applied"; } \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index d8ecb167f1..d14657cc6d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -23,9 +23,13 @@
<%= if not Explorer.Chain.finished_indexing?() do %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 1a99ada8ad..886a88e4c0 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -62,7 +62,7 @@ msgid "(query)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:38 +#: lib/block_scout_web/templates/layout/app.html.eex:42 msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -157,7 +157,7 @@ msgid "Block Height: %{height}" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:53 +#: lib/block_scout_web/templates/layout/app.html.eex:57 msgid "Block Mined, awaiting import..." msgstr "" @@ -184,7 +184,7 @@ msgid "Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:52 +#: lib/block_scout_web/templates/layout/app.html.eex:56 msgid "Blocks Indexed" msgstr "" @@ -376,7 +376,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_balance_card.html.eex:15 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:20 -#: lib/block_scout_web/templates/layout/app.html.eex:58 +#: lib/block_scout_web/templates/layout/app.html.eex:62 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:29 #: lib/block_scout_web/templates/transaction/overview.html.eex:179 @@ -457,7 +457,7 @@ msgid "IN" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:54 +#: lib/block_scout_web/templates/layout/app.html.eex:58 msgid "Indexing Tokens" msgstr "" @@ -489,7 +489,7 @@ msgid "Inventory" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:55 +#: lib/block_scout_web/templates/layout/app.html.eex:59 msgid "Less than" msgstr "" @@ -510,7 +510,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:31 -#: lib/block_scout_web/templates/layout/app.html.eex:56 +#: lib/block_scout_web/templates/layout/app.html.eex:60 #: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121 msgid "Market Cap" @@ -629,7 +629,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:24 -#: lib/block_scout_web/templates/layout/app.html.eex:57 +#: lib/block_scout_web/templates/layout/app.html.eex:61 msgid "Price" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 735b716ec4..8fd1e1ff2e 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -62,7 +62,7 @@ msgid "(query)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:38 +#: lib/block_scout_web/templates/layout/app.html.eex:42 msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -136,8 +136,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_link.html.eex:2 -#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:29 -#: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:40 +#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:28 +#: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:39 msgid "Block #%{number}" msgstr "" @@ -157,7 +157,7 @@ msgid "Block Height: %{height}" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:53 +#: lib/block_scout_web/templates/layout/app.html.eex:57 msgid "Block Mined, awaiting import..." msgstr "" @@ -184,7 +184,7 @@ msgid "Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:52 +#: lib/block_scout_web/templates/layout/app.html.eex:56 msgid "Blocks Indexed" msgstr "" @@ -211,10 +211,10 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:37 -#: lib/block_scout_web/templates/address/overview.html.eex:146 -#: lib/block_scout_web/templates/address/overview.html.eex:154 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:115 +#: lib/block_scout_web/templates/address/overview.html.eex:145 +#: lib/block_scout_web/templates/address/overview.html.eex:153 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:106 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:114 msgid "Close" msgstr "" @@ -375,12 +375,12 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_balance_card.html.eex:15 -#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21 -#: lib/block_scout_web/templates/layout/app.html.eex:58 +#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:20 +#: lib/block_scout_web/templates/layout/app.html.eex:62 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:30 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:29 #: lib/block_scout_web/templates/transaction/overview.html.eex:179 -#: lib/block_scout_web/templates/transaction/overview.html.eex:211 +#: lib/block_scout_web/templates/transaction/overview.html.eex:209 #: lib/block_scout_web/views/wei_helpers.ex:78 msgid "Ether" msgstr "POA" @@ -451,13 +451,13 @@ msgid "Hash" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:39 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:74 +#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:38 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:72 msgid "IN" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:54 +#: lib/block_scout_web/templates/layout/app.html.eex:58 msgid "Indexing Tokens" msgstr "" @@ -489,12 +489,12 @@ msgid "Inventory" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/app.html.eex:55 +#: lib/block_scout_web/templates/layout/app.html.eex:59 msgid "Less than" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:239 +#: lib/block_scout_web/templates/transaction/overview.html.eex:237 msgid "Limit" msgstr "" @@ -510,7 +510,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:31 -#: lib/block_scout_web/templates/layout/app.html.eex:56 +#: lib/block_scout_web/templates/layout/app.html.eex:60 #: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121 msgid "Market Cap" @@ -578,8 +578,8 @@ msgid "Nonce" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:37 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:70 +#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:36 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:68 msgid "OUT" msgstr "" @@ -629,15 +629,15 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:24 -#: lib/block_scout_web/templates/layout/app.html.eex:57 +#: lib/block_scout_web/templates/layout/app.html.eex:61 msgid "Price" msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/overview.html.eex:33 -#: lib/block_scout_web/templates/address/overview.html.eex:145 +#: lib/block_scout_web/templates/address/overview.html.eex:144 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:36 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:106 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:105 msgid "QR Code" msgstr "" @@ -709,7 +709,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:34 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:32 #: lib/block_scout_web/templates/transaction/overview.html.eex:84 msgid "TX Fee" msgstr "" @@ -915,7 +915,7 @@ msgid "Unique Token" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:233 +#: lib/block_scout_web/templates/transaction/overview.html.eex:231 msgid "Used" msgstr "" @@ -936,7 +936,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/overview.html.eex:179 -#: lib/block_scout_web/templates/transaction/overview.html.eex:211 +#: lib/block_scout_web/templates/transaction/overview.html.eex:209 msgid "Value" msgstr "" @@ -957,12 +957,12 @@ msgid "View Contract" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/_tile.html.eex:55 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:53 msgid "View Less Transfers" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/_tile.html.eex:54 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:52 msgid "View More Transfers" msgstr "" @@ -1002,7 +1002,7 @@ msgid "Yes" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:113 +#: lib/block_scout_web/templates/address/overview.html.eex:112 msgid "at" msgstr "" @@ -1450,7 +1450,7 @@ msgid "Incoming Transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:121 +#: lib/block_scout_web/templates/address/overview.html.eex:120 msgid "Error: Could not determine contract creator." msgstr "" @@ -1513,7 +1513,7 @@ msgid "View All Transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:229 +#: lib/block_scout_web/templates/transaction/overview.html.eex:227 msgid "Gas" msgstr "" From afc54d4d273f7ee5850fc3a3b6eb3aace4584ab2 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 13 Aug 2019 15:55:56 +0300 Subject: [PATCH 9/9] fix CR issue --- .../lib/block_scout_web/views/api_docs_view.ex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex index 13381f5faf..ac7d4d55ee 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex @@ -58,10 +58,6 @@ defmodule BlockScoutWeb.APIDocsView do defp handle_slash(path) do base_url = blockscout_url() - if String.ends_with?(base_url, "/") do - base_url <> path - else - base_url <> "/" <> path - end + Path.join(base_url, path) end end