From 920cfe45bbe4cffa22472c60769cbe027a46415f Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Thu, 27 Jun 2019 12:10:42 +0200 Subject: [PATCH 01/12] Reduce BlocksTransactionsMismatch memory footprint --- .../temporary/blocks_transactions_mismatch.ex | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex b/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex index 486789f675..ec1bb7f7b9 100644 --- a/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex +++ b/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex @@ -54,7 +54,7 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do left_join: transactions in assoc(block, :transactions), where: block.consensus and block.refetch_needed, group_by: block.hash, - select: {block, count(transactions.hash)} + select: {block.hash, count(transactions.hash)} ) {:ok, final} = Repo.stream_reduce(query, initial, &reducer.(&1, &2)) @@ -64,7 +64,7 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do @impl BufferedTask def run(blocks_data, json_rpc_named_arguments) do - hashes = Enum.map(blocks_data, fn {block, _trans_num} -> block.hash end) + hashes = Enum.map(blocks_data, fn {hash, _trans_num} -> hash end) Logger.debug("fetching") @@ -95,17 +95,17 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do |> Map.merge(blocks_with_transactions_map) {found_blocks_data, missing_blocks_data} = - Enum.split_with(blocks_data, fn {block, _trans_num} -> - Map.has_key?(found_blocks_map, to_string(block.hash)) + Enum.split_with(blocks_data, fn {hash, _trans_num} -> + Map.has_key?(found_blocks_map, to_string(hash)) end) {matching_blocks_data, unmatching_blocks_data} = - Enum.split_with(found_blocks_data, fn {block, trans_num} -> - found_blocks_map[to_string(block.hash)] == trans_num + Enum.split_with(found_blocks_data, fn {hash, trans_num} -> + found_blocks_map[to_string(hash)] == trans_num end) unless Enum.empty?(matching_blocks_data) do - hashes = Enum.map(matching_blocks_data, fn {block, _trans_num} -> block.hash end) + hashes = Enum.map(matching_blocks_data, fn {hash, _trans_num} -> hash end) Block |> where([block], block.hash in ^hashes) @@ -113,7 +113,7 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do end unless Enum.empty?(unmatching_blocks_data) do - hashes = Enum.map(unmatching_blocks_data, fn {block, _trans_num} -> block.hash end) + hashes = Enum.map(unmatching_blocks_data, fn {hash, _trans_num} -> hash end) Block |> where([block], block.hash in ^hashes) From 9024d6e3fe06b9112ef7a8f88011a747da2c4229 Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Thu, 27 Jun 2019 12:16:21 +0200 Subject: [PATCH 02/12] update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a578eab389..32d13eec99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ - [#2167](https://github.com/poanetwork/blockscout/pull/2167) - feat: document eth rpc api mimicking endpoints - [#2225](https://github.com/poanetwork/blockscout/pull/2225) - fix metadata decoding in Solidity 0.5.9 smart contract verification - [#2204](https://github.com/poanetwork/blockscout/pull/2204) - fix large contract verification +- [#2258](https://github.com/poanetwork/blockscout/pull/2258) - reduce BlocksTransactionsMismatch memory footprint ### Chore - [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version From 453d04244ef57a46d1824cdea75d0aec95e3ae20 Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Fri, 28 Jun 2019 13:56:54 +0200 Subject: [PATCH 03/12] Modify the implementation of `Explorer.Chain.where_transaction_has_multiple_internal_transactions` Problem: the implementation of that `WHERE` filter is too inefficient. In particular this was brought to attention because it causes `Explorer.Etherscan.list_internal_transactions/2` to timeout for some addresses. (For example: address `0x1B3858E01CCE5d0491f3c96A9996a65607f3493b`) Solution: while keeping the same result the previous check for siblings (SELECT/LIMIT 2/COUNT/(> 1)) has been replaced by a less expensive one that better uses the existing indexes (EXISTS/index comparison). --- CHANGELOG.md | 1 + apps/explorer/lib/explorer/chain.ex | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5466e53feb..90b064fc92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ - [#2204](https://github.com/poanetwork/blockscout/pull/2204) - fix large contract verification - [#2247](https://github.com/poanetwork/blockscout/pull/2247) - hide logs search if there are no logs - [#2248](https://github.com/poanetwork/blockscout/pull/2248) - sort block after query execution for average block time +- [#2267](https://github.com/poanetwork/blockscout/pull/2267) - Modify implementation of `where_transaction_has_multiple_internal_transactions` ### Chore - [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index e4416030b0..e3db14b2a1 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -2580,14 +2580,14 @@ defmodule Explorer.Chain do internal_transaction.type != ^:call or fragment( """ - (SELECT COUNT(sibling.*) + EXISTS (SELECT sibling.* FROM internal_transactions AS sibling - WHERE sibling.transaction_hash = ? - LIMIT 2 + WHERE sibling.transaction_hash = ? AND sibling.index != ? ) """, - transaction.hash - ) > 1 + transaction.hash, + internal_transaction.index + ) ) end From cccbf129cc64370c675b470538d84faeda9d5a4e Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Wed, 26 Jun 2019 14:15:41 +0200 Subject: [PATCH 04/12] More transaction controllers improvements --- CHANGELOG.md | 1 + .../block_transaction_controller.ex | 2 +- .../controllers/transaction_controller.ex | 23 ++++++++----------- ...saction_internal_transaction_controller.ex | 3 ++- .../transaction_raw_trace_controller.ex | 10 +------- apps/explorer/lib/explorer/chain.ex | 9 ++++---- apps/explorer/test/explorer/chain_test.exs | 17 ++++++++------ 7 files changed, 28 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5466e53feb..e98a8f6302 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ - [#2204](https://github.com/poanetwork/blockscout/pull/2204) - fix large contract verification - [#2247](https://github.com/poanetwork/blockscout/pull/2247) - hide logs search if there are no logs - [#2248](https://github.com/poanetwork/blockscout/pull/2248) - sort block after query execution for average block time +- [#2249](https://github.com/poanetwork/blockscout/pull/2249) - More transaction controllers improvements ### Chore - [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex index f54671e795..15b06f1edd 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/block_transaction_controller.ex @@ -17,7 +17,7 @@ defmodule BlockScoutWeb.BlockTransactionController do Keyword.merge( [ necessity_by_association: %{ - :block => :required, + :block => :optional, [created_contract_address: :names] => :optional, [from_address: :names] => :required, [to_address: :names] => :optional diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex index b40e6988e0..1bedf97c1d 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex @@ -61,21 +61,16 @@ defmodule BlockScoutWeb.TransactionController do end def show(conn, %{"id" => id}) do - case Chain.string_to_transaction_hash(id) do - {:ok, transaction_hash} -> show_transaction(conn, id, Chain.hash_to_transaction(transaction_hash)) - :error -> conn |> put_status(422) |> render("invalid.html", transaction_hash: id) - end - end - - defp show_transaction(conn, id, {:error, :not_found}) do - conn |> put_status(404) |> render("not_found.html", transaction_hash: id) - end - - defp show_transaction(conn, id, {:ok, %Chain.Transaction{} = transaction}) do - if Chain.transaction_has_token_transfers?(transaction.hash) do - redirect(conn, to: transaction_token_transfer_path(conn, :index, id)) + with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(id), + {:ok, %Chain.Transaction{} = transaction} <- Chain.hash_to_transaction(transaction_hash) do + if Chain.transaction_has_token_transfers?(transaction.hash) do + redirect(conn, to: transaction_token_transfer_path(conn, :index, id)) + else + redirect(conn, to: transaction_internal_transaction_path(conn, :index, id)) + end else - redirect(conn, to: transaction_internal_transaction_path(conn, :index, id)) + :error -> conn |> put_status(422) |> render("invalid.html", transaction_hash: id) + {:error, :not_found} -> conn |> put_status(404) |> render("not_found.html", transaction_hash: id) end end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex index 7c24b8d3b9..159d144cdd 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex @@ -17,7 +17,8 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do necessity_by_association: %{ [created_contract_address: :names] => :optional, [from_address: :names] => :optional, - [to_address: :names] => :optional + [to_address: :names] => :optional, + [transaction: :block] => :optional } ], paging_options(params) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex index a73290faab..3d090e8a9b 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex @@ -19,15 +19,7 @@ defmodule BlockScoutWeb.TransactionRawTraceController do :token_transfers => :optional } ) do - options = [ - necessity_by_association: %{ - [created_contract_address: :names] => :optional, - [from_address: :names] => :optional, - [to_address: :names] => :optional - } - ] - - internal_transactions = Chain.transaction_to_internal_transactions(transaction, options) + internal_transactions = Chain.transaction_to_internal_transactions(transaction) render( conn, diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index e4416030b0..673cec78e7 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -1052,7 +1052,7 @@ defmodule Explorer.Chain do when is_list(options) do necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) - fetch_transactions() + Transaction |> where(hash: ^hash) |> join_associations(necessity_by_association) |> Repo.one() @@ -1953,7 +1953,6 @@ defmodule Explorer.Chain do |> Keyword.get(:paging_options, @default_paging_options) |> fetch_transactions() |> where([transaction], not is_nil(transaction.block_number) and not is_nil(transaction.index)) - |> order_by([transaction], desc: transaction.block_number, desc: transaction.index) |> join_associations(necessity_by_association) |> preload([{:token_transfers, [:token, :from_address, :to_address]}]) |> Repo.all() @@ -2146,7 +2145,7 @@ defmodule Explorer.Chain do |> page_internal_transaction(paging_options) |> limit(^paging_options.page_size) |> order_by([internal_transaction], asc: internal_transaction.index) - |> preload(transaction: :block) + |> preload(:transaction) |> Repo.all() end @@ -2702,9 +2701,9 @@ defmodule Explorer.Chain do @spec transaction_has_token_transfers?(Hash.t()) :: boolean() def transaction_has_token_transfers?(transaction_hash) do - query = from(tt in TokenTransfer, where: tt.transaction_hash == ^transaction_hash, limit: 1, select: 1) + query = from(tt in TokenTransfer, where: tt.transaction_hash == ^transaction_hash) - Repo.one(query) != nil + Repo.exists?(query) end @spec address_tokens_with_balance(Hash.Address.t(), [any()]) :: [] diff --git a/apps/explorer/test/explorer/chain_test.exs b/apps/explorer/test/explorer/chain_test.exs index f789a883ea..6f43543a70 100644 --- a/apps/explorer/test/explorer/chain_test.exs +++ b/apps/explorer/test/explorer/chain_test.exs @@ -2110,11 +2110,14 @@ defmodule Explorer.ChainTest do ]) ) - assert internal_transaction.transaction.block.number == block.number + assert internal_transaction.transaction.block_number == block.number end test "with transaction with internal transactions loads associations with in necessity_by_association" do - transaction = insert(:transaction) + transaction = + :transaction + |> insert() + |> with_block() insert(:internal_transaction_create, transaction: transaction, @@ -2127,7 +2130,7 @@ defmodule Explorer.ChainTest do %InternalTransaction{ from_address: %Ecto.Association.NotLoaded{}, to_address: %Ecto.Association.NotLoaded{}, - transaction: %Transaction{} + transaction: %Transaction{block: %Ecto.Association.NotLoaded{}} } ] = Chain.transaction_to_internal_transactions(transaction) @@ -2135,15 +2138,15 @@ defmodule Explorer.ChainTest do %InternalTransaction{ from_address: %Address{}, to_address: nil, - transaction: %Transaction{} + transaction: %Transaction{block: %Block{}} } ] = Chain.transaction_to_internal_transactions( transaction, necessity_by_association: %{ - from_address: :optional, - to_address: :optional, - transaction: :optional + :from_address => :optional, + :to_address => :optional, + [transaction: :block] => :optional } ) end From 53e0579a34cddf3b6dac739a15caa6073e46eb2b Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 2 Jul 2019 11:00:41 +0300 Subject: [PATCH 05/12] increase threshold for scientific notation --- apps/block_scout_web/assets/js/lib/currency.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/js/lib/currency.js b/apps/block_scout_web/assets/js/lib/currency.js index 9b7493f1ad..f0491661c2 100644 --- a/apps/block_scout_web/assets/js/lib/currency.js +++ b/apps/block_scout_web/assets/js/lib/currency.js @@ -18,7 +18,7 @@ function formatCurrencyValue (value, symbol) { if (value < 0.000001) return `${window.localized['Less than']} ${symbol}0.000001` if (value < 1) return `${symbol}${numeral(value).format('0.000000')}` if (value < 100000) return `${symbol}${numeral(value).format('0,0.00')}` - if (value > 1000000000) return `${symbol}${numeral(value).format('0.000e+0')}` + if (value > 1000000000000) return `${symbol}${numeral(value).format('0.000e+0')}` return `${symbol}${numeral(value).format('0,0')}` } From 4d9868a71958ecad39a87820ae1e710f88213df6 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 2 Jul 2019 11:02:54 +0300 Subject: [PATCH 06/12] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aae96be3a8..ab6ae37cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ - [#2248](https://github.com/poanetwork/blockscout/pull/2248) - sort block after query execution for average block time - [#2270](https://github.com/poanetwork/blockscout/pull/2270) - Remove duplicate params in `Indexer.Fetcher.TokenBalance` - [#2268](https://github.com/poanetwork/blockscout/pull/2268) - remove not existing assigns in html code +- [#2278](https://github.com/poanetwork/blockscout/pull/2278) - increase threshold for scientific notation ### Chore - [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version From 24ce6c8478d8a04edc01d1bd55cab48ee88a20fe Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 2 Jul 2019 12:04:26 +0300 Subject: [PATCH 07/12] move CHANGELOG entry to the top of the list --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab6ae37cad..bc2e01a43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - [#2266](https://github.com/poanetwork/blockscout/pull/2266) - allow excluding uncles from average block time calculation ### Fixes +- [#2278](https://github.com/poanetwork/blockscout/pull/2278) - increase threshold for scientific notation - [#2275](https://github.com/poanetwork/blockscout/pull/2275) - Description for networks selector - [#2263](https://github.com/poanetwork/blockscout/pull/2263) - added an ability to close network selector on outside click - [#2257](https://github.com/poanetwork/blockscout/pull/2257) - 'download csv' button added to different tabs @@ -64,7 +65,6 @@ - [#2248](https://github.com/poanetwork/blockscout/pull/2248) - sort block after query execution for average block time - [#2270](https://github.com/poanetwork/blockscout/pull/2270) - Remove duplicate params in `Indexer.Fetcher.TokenBalance` - [#2268](https://github.com/poanetwork/blockscout/pull/2268) - remove not existing assigns in html code -- [#2278](https://github.com/poanetwork/blockscout/pull/2278) - increase threshold for scientific notation ### Chore - [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version From 09d9fe26a03be722256b05f424661475626d1e2c Mon Sep 17 00:00:00 2001 From: maxgrapps Date: Tue, 2 Jul 2019 13:25:25 +0300 Subject: [PATCH 08/12] typo issues, dropdown issues --- .../assets/css/_typography.scss | 6 +- .../css/components/_network-selector.scss | 11 +++- .../assets/css/components/_tile.scss | 5 ++ .../components/_token-balance-dropdown.scss | 60 +++++++++++++++---- .../assets/css/components/_transaction.scss | 7 ++- .../assets/css/theme/_neutral_variables.scss | 9 ++- .../assets/css/theme/_poa_variables.scss | 9 ++- .../_token_balances.html.eex | 6 +- .../transaction/_token_transfer.html.eex | 4 +- apps/block_scout_web/priv/gettext/default.pot | 2 +- 10 files changed, 95 insertions(+), 24 deletions(-) diff --git a/apps/block_scout_web/assets/css/_typography.scss b/apps/block_scout_web/assets/css/_typography.scss index 963b02e978..1d0a9403c0 100644 --- a/apps/block_scout_web/assets/css/_typography.scss +++ b/apps/block_scout_web/assets/css/_typography.scss @@ -73,8 +73,12 @@ textarea.form-control { } .contract-address { - border-bottom: 1px dashed currentColor; display: inline-block; + text-decoration: underline; + text-decoration-style: dashed; + &:hover { + text-decoration-style: none; + } } .text { diff --git a/apps/block_scout_web/assets/css/components/_network-selector.scss b/apps/block_scout_web/assets/css/components/_network-selector.scss index ad0864bf61..8c433f28c3 100644 --- a/apps/block_scout_web/assets/css/components/_network-selector.scss +++ b/apps/block_scout_web/assets/css/components/_network-selector.scss @@ -1,6 +1,7 @@ $network-selector-overlay-background: $modal-overlay-color !default; $network-selector-close-color: $primary !default; $network-selector-horizontal-padding: 28px; +$network-selector-horizontal-mobile-padding: 14px; $btn-network-selector-load-more-background: #fff !default; $btn-network-selector-load-more-color: $primary !default; $network-selector-search-input-color: #a3a9b5 !default; @@ -143,7 +144,10 @@ $network-selector-item-icon-dimensions: 30px !default; border-bottom: 1px solid $base-border-color; display: flex; flex-shrink: 0; - margin: 0 $network-selector-horizontal-padding; + margin: 0 $network-selector-horizontal-mobile-padding; + @media (min-width: 375px) { + margin: 0 $network-selector-horizontal-padding; + } } .network-selector-tab { @@ -277,7 +281,10 @@ $network-selector-item-icon-dimensions: 30px !default; flex-shrink: 1; min-height: 100px; overflow: auto; - padding: 0 $network-selector-horizontal-padding; + padding: 0 $network-selector-horizontal-mobile-padding; + @media (min-width: 375px) { + padding: 0 $network-selector-horizontal-padding; + } } .network-selector-load-more-container { diff --git a/apps/block_scout_web/assets/css/components/_tile.scss b/apps/block_scout_web/assets/css/components/_tile.scss index c10fa2f9b6..68b873334c 100644 --- a/apps/block_scout_web/assets/css/components/_tile.scss +++ b/apps/block_scout_web/assets/css/components/_tile.scss @@ -174,6 +174,11 @@ $tile-body-a-color: #5959d8 !default; .tile-body { a { color: $tile-body-a-color; + &:hover { + span { + text-decoration: underline; + } + } } } diff --git a/apps/block_scout_web/assets/css/components/_token-balance-dropdown.scss b/apps/block_scout_web/assets/css/components/_token-balance-dropdown.scss index 14c42a5ebb..0a458a7ba4 100644 --- a/apps/block_scout_web/assets/css/components/_token-balance-dropdown.scss +++ b/apps/block_scout_web/assets/css/components/_token-balance-dropdown.scss @@ -1,21 +1,61 @@ .token-balance-dropdown { - min-width: 14.375rem; + min-width: 10rem; margin-top: 1rem; - background-color: $gray-100; - box-shadow: 0 2px 3px 2px $gray-200; - border: none; + background-color: #fff; + + &.dropdown-menu { + border-radius: 4px !important; + box-shadow: 0 0.5rem 1rem rgba(202, 199, 226, .3) !important; + border: 1px solid #e2e5ec !important; + } .dropdown-items { overflow-y: auto; max-height: 18.5rem; - .dropdown-item:hover { - color: $white; + .dropdown-item { + &:hover { + color: $secondary; + } + .row:nth-child(2) { + p { + font-size: 12px; + opacity: .65; + } + } } } - &:after, - &:before { + .dropdown-header { + padding: 1.1rem 20px .9rem 20px; + font-size: 14px; + font-weight: 400; + } + + .dropdown-search-field { + height: 50px; + border: 1px solid #f5f6fa; + background-color: #f5f6fa; + outline: none !important; + font-size: 14px; + color: #828ba0; + font-weight: 300; + padding-left: 52px; + &::placeholder { + color: rgba(#828ba0, .5); + } + } + + .dropdown-search-icon { + left: 20px; + top: 50%; + margin-top: -8.5px; + path { + fill: #828ba0; + } + } + + &:after { bottom: 100%; right: 14%; border: solid transparent; @@ -26,8 +66,6 @@ } &:before { - border-bottom-color: $gray-100; - border-width: 0.5rem; - margin-left: -0.5rem; + display: none; } } diff --git a/apps/block_scout_web/assets/css/components/_transaction.scss b/apps/block_scout_web/assets/css/components/_transaction.scss index ae0fbf5c17..b8d7b82e39 100644 --- a/apps/block_scout_web/assets/css/components/_transaction.scss +++ b/apps/block_scout_web/assets/css/components/_transaction.scss @@ -27,19 +27,20 @@ margin-top: 30px; } .download-all-transactions-link { + display: inline-flex; + align-items: center; text-decoration: none; svg { position: relative; margin-left: 2px; top: -3px; + left: 3px; path { fill: $primary; } } &:hover { - span { - text-decoration: underline; - } + text-decoration: underline; } } } \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/theme/_neutral_variables.scss b/apps/block_scout_web/assets/css/theme/_neutral_variables.scss index 8a0a62d26e..4033934dd6 100644 --- a/apps/block_scout_web/assets/css/theme/_neutral_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_neutral_variables.scss @@ -64,4 +64,11 @@ $card-tab-active: $primary; // Badges $badge-neutral-color: $primary; $badge-neutral-background-color: rgba($primary, .1); -$api-text-monospace-color: $primary; \ No newline at end of file +$api-text-monospace-color: $primary; + +// Tokens dropdown +.token-balance-dropdown[aria-labelledby="dropdown-tokens"] { + .dropdown-items .dropdown-item:hover { + color: $primary !important; + } +} \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/theme/_poa_variables.scss b/apps/block_scout_web/assets/css/theme/_poa_variables.scss index 8a0a62d26e..4033934dd6 100644 --- a/apps/block_scout_web/assets/css/theme/_poa_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_poa_variables.scss @@ -64,4 +64,11 @@ $card-tab-active: $primary; // Badges $badge-neutral-color: $primary; $badge-neutral-background-color: rgba($primary, .1); -$api-text-monospace-color: $primary; \ No newline at end of file +$api-text-monospace-color: $primary; + +// Tokens dropdown +.token-balance-dropdown[aria-labelledby="dropdown-tokens"] { + .dropdown-items .dropdown-item:hover { + color: $primary !important; + } +} \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex index de0215727c..100d4f0262 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex @@ -18,8 +18,10 @@