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

Commit

Permalink
Resolved conflicts 923a473
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Rodygin committed Dec 9, 2022
2 parents 6b3323f + 923a473 commit 5b71015
Show file tree
Hide file tree
Showing 17 changed files with 432 additions and 241 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Fixes

- [#6038](https://github.com/blockscout/blockscout/pull/6038) - Extend token name from string to text type
- [#6037](https://github.com/blockscout/blockscout/pull/6037) - Fix order of results in txlistinternal API endpoint
- [#6036](https://github.com/blockscout/blockscout/pull/6036) - Fix address checksum on transaction page
- [#6032](https://github.com/blockscout/blockscout/pull/6032) - Sort by address.hash column in accountlist API endpoint
Expand All @@ -27,9 +28,12 @@
- [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build
- [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers
- [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand`
- [#6013](https://github.com/blockscout/blockscout/pull/6013) - Fix ERC-1155 tokens fetching
- [#6043](https://github.com/blockscout/blockscout/pull/6043) - Fix token instance fetching

### Chore

- [#6045](https://github.com/blockscout/blockscout/pull/6045) - Re-use _btn_copy.html for raw trace page
- [#6035](https://github.com/blockscout/blockscout/pull/6035) - Hide copy btn if no raw trace
- [#6034](https://github.com/blockscout/blockscout/pull/6034) - Suppress empty sections in supported chain dropdown
- [#5939](https://github.com/blockscout/blockscout/pull/5939) - Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets
Expand Down
1 change: 1 addition & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Node JS version (`node -v`):
* Operating System:
* Blockscout Version/branch/commit:
* Archive node type && version (Erigon/Geth/Nethermind/Ganache/?):

### Steps to reproduce

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ defmodule BlockScoutWeb.Tokens.Instance.HolderController do

with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash),
{:ok, token} <- Chain.token_from_address_hash(hash, options),
{:ok, token_transfer} <-
Chain.erc721_token_instance_from_token_id_and_token_address(token_id, hash) do
{:ok, token_instance} <-
Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do
render(
conn,
"index.html",
token_instance: token_transfer,
token_instance: %{instance: token_instance, token_id: Decimal.new(token_id)},
current_path: Controller.current_full_path(conn),
token: Market.add_price(token),
total_token_transfers: Chain.count_token_transfers_from_token_hash_and_token_id(hash, token_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ defmodule BlockScoutWeb.Tokens.Instance.MetadataController do

with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash),
{:ok, token} <- Chain.token_from_address_hash(hash, options),
{:ok, token_transfer} <-
Chain.erc721_token_instance_from_token_id_and_token_address(token_id, hash) do
if token_transfer.instance && token_transfer.instance.metadata do
{:ok, token_instance} <-
Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do
if token_instance.metadata do
render(
conn,
"index.html",
token_instance: token_transfer,
token_instance: %{instance: token_instance, token_id: Decimal.new(token_id)},
current_path: Controller.current_full_path(conn),
token: Market.add_price(token),
total_token_transfers: Chain.count_token_transfers_from_token_hash_and_token_id(hash, token_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ defmodule BlockScoutWeb.Tokens.Instance.TransferController do

with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash),
{:ok, token} <- Chain.token_from_address_hash(hash, options),
{:ok, token_transfer} <-
Chain.erc721_token_instance_from_token_id_and_token_address(token_id, hash) do
{:ok, token_instance} <-
Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do
render(
conn,
"index.html",
token_instance: token_transfer,
token_instance: %{instance: token_instance, token_id: Decimal.new(token_id)},
current_path: Controller.current_full_path(conn),
token: Market.add_price(token),
total_token_transfers: Chain.count_token_transfers_from_token_hash_and_token_id(hash, token_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule BlockScoutWeb.Tokens.InstanceController do
def show(conn, %{"token_id" => token_address_hash, "id" => token_id}) do
with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash),
:ok <- Chain.check_token_exists(hash),
:ok <- Chain.check_erc721_token_instance_exists(token_id, hash) do
:ok <- Chain.check_erc721_or_erc1155_token_instance_exists(token_id, hash) do
token_instance_transfer_path =
conn
|> token_instance_transfer_path(:index, token_address_hash, token_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@
<div class="card-body">
<h2 class="card-title"><%= gettext "Raw Trace" %>
<%= if Enum.count(@internal_transactions) > 0 do %>
<span
aria-label="Copy Value"
class="btn-copy-icon tx-raw-input transaction-input"
id="tx-raw-input"
data-clipboard-text="<%= for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %>"
data-placement="top"
data-toggle="tooltip"
title='<%= gettext("Copy Raw Trace") %>'
style="float: right;"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 32.5" width="32" height="32">
<path fill-rule="evenodd" d="M23.5 20.5a1 1 0 0 1-1-1v-9h-9a1 1 0 0 1 0-2h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zm-3-7v10a1 1 0 0 1-1 1h-10a1 1 0 0 1-1-1v-10a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1zm-2 1h-8v8h8v-8z"/>
</svg>
</span>
<% raw_trace_text = for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %>
<%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html",
id: "tx-raw-trace-input",
additional_classes: ["tx-raw-input", "transaction-input"],
clipboard_text: raw_trace_text,
aria_label: gettext("Copy Value"),
title: gettext("Copy Raw Trace"),
style: "float: right;" %>
<% end %>
</h2>
<%= if Enum.count(@internal_transactions) > 0 do %>
Expand Down
Loading

0 comments on commit 5b71015

Please sign in to comment.