|
|
@ -8,40 +8,42 @@ |
|
|
|
<div class="card-section col-md-12 col-lg-8 pr-0-md js-ad-dependant-mb-2"> |
|
|
|
<div class="card-section col-md-12 col-lg-8 pr-0-md js-ad-dependant-mb-2"> |
|
|
|
<div class="card"> |
|
|
|
<div class="card"> |
|
|
|
<div class="card-body" token-page data-async-counters="<%= @counters_path %>"> |
|
|
|
<div class="card-body" token-page data-async-counters="<%= @counters_path %>"> |
|
|
|
<h1 class="card-title"> |
|
|
|
<h1 class="card-title d-flex" style="justify-content: space-between; margin-bottom: 0.75rem"> |
|
|
|
<%= cond do %> |
|
|
|
<div style="line-height: 30px;"> |
|
|
|
<% Enum.member?(circles_addresses_list, address_hash_str) -> %> |
|
|
|
<%= cond do %> |
|
|
|
<div class="custom-dapp-header-container"> |
|
|
|
<% Enum.member?(circles_addresses_list, address_hash_str) -> %> |
|
|
|
<img class="custom-address-icon"/> |
|
|
|
<div class="custom-dapp-header-container"> |
|
|
|
</div> |
|
|
|
<img class="custom-address-icon"/> |
|
|
|
<% Enum.member?(circles_addresses_list, created_from_address_hash) -> %> |
|
|
|
</div> |
|
|
|
<div class="custom-dapp-header-container"> |
|
|
|
<% Enum.member?(circles_addresses_list, created_from_address_hash) -> %> |
|
|
|
<img class="custom-address-icon"/> |
|
|
|
<div class="custom-dapp-header-container"> |
|
|
|
</div> |
|
|
|
<img class="custom-address-icon"/> |
|
|
|
<% true -> %> |
|
|
|
</div> |
|
|
|
<%= nil %> |
|
|
|
<% true -> %> |
|
|
|
<% end %> |
|
|
|
<%= nil %> |
|
|
|
<% foreign_chain_id = if Map.has_key?(@token, :foreign_chain_id), do: @token.foreign_chain_id, else: nil %> |
|
|
|
<% end %> |
|
|
|
<% tag = Chain.chain_id_display_name(foreign_chain_id) %> |
|
|
|
<% foreign_chain_id = if Map.has_key?(@token, :foreign_chain_id), do: @token.foreign_chain_id, else: nil %> |
|
|
|
<%= if token_name?(@token) do %> |
|
|
|
<% tag = Chain.chain_id_display_name(foreign_chain_id) %> |
|
|
|
<span |
|
|
|
<%= if token_name?(@token) do %> |
|
|
|
id="token-icon" |
|
|
|
<span |
|
|
|
data-chain-id="<%= System.get_env("CHAIN_ID") %>" |
|
|
|
id="token-icon" |
|
|
|
data-address-hash="<%= Address.checksum(@token.contract_address_hash) %>" |
|
|
|
data-chain-id="<%= System.get_env("CHAIN_ID") %>" |
|
|
|
data-foreign-chain-id="<%= foreign_chain_id %>" |
|
|
|
data-address-hash="<%= Address.checksum(@token.contract_address_hash) %>" |
|
|
|
data-foreign-address-hash="<%= if Map.has_key?(@token, :foreign_token_contract_address_hash), do: Address.checksum(@token.foreign_token_contract_address_hash), else: "" %>" |
|
|
|
data-foreign-chain-id="<%= foreign_chain_id %>" |
|
|
|
data-display-token-icons="<%= System.get_env("DISPLAY_TOKEN_ICONS") %>"> |
|
|
|
data-foreign-address-hash="<%= if Map.has_key?(@token, :foreign_token_contract_address_hash), do: Address.checksum(@token.foreign_token_contract_address_hash), else: "" %>" |
|
|
|
</span> |
|
|
|
data-display-token-icons="<%= System.get_env("DISPLAY_TOKEN_ICONS") %>"> |
|
|
|
<div class="title-with-label"><%= @token.name %></div> |
|
|
|
</span> |
|
|
|
<%= if tag !== "" do %> |
|
|
|
<div class="title-with-label"><%= @token.name %></div> |
|
|
|
<%= render BlockScoutWeb.FormView, "_tag.html", text: "bridged", additional_classes: ["bridged", "ml-1"] %> |
|
|
|
<%= if tag !== "" do %> |
|
|
|
<%= render BlockScoutWeb.FormView, "_tag.html", text: String.upcase(tag), additional_classes: ["destination-#{tag}", "ml-1"] %> |
|
|
|
<%= render BlockScoutWeb.FormView, "_tag.html", text: "bridged", additional_classes: ["bridged", "ml-1"] %> |
|
|
|
<% end %> |
|
|
|
<%= render BlockScoutWeb.FormView, "_tag.html", text: String.upcase(tag), additional_classes: ["destination-#{tag}", "ml-1"] %> |
|
|
|
<% else %> |
|
|
|
<% end %> |
|
|
|
<%= gettext("Token Details") %> |
|
|
|
<% else %> |
|
|
|
<% end %> |
|
|
|
<%= gettext("Token Details") %> |
|
|
|
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- buttons --> |
|
|
|
<!-- buttons --> |
|
|
|
<span class="overview-title-buttons token float-right <%= if @token.bridged, do: "bridged-tokens-buttons-mobile", else: "" %>"> |
|
|
|
<span class="overview-title-buttons token float-right"> |
|
|
|
<%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", |
|
|
|
<%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", |
|
|
|
additional_classes: ["overview-title-item"], |
|
|
|
additional_classes: ["overview-title-item"], |
|
|
|
clipboard_text: Address.checksum(@token.contract_address_hash), |
|
|
|
clipboard_text: Address.checksum(@token.contract_address_hash), |
|
|
@ -49,20 +51,20 @@ |
|
|
|
title: gettext("Copy Address") %> |
|
|
|
title: gettext("Copy Address") %> |
|
|
|
<%= render BlockScoutWeb.CommonComponentsView, "_btn_qr_code.html" %> |
|
|
|
<%= render BlockScoutWeb.CommonComponentsView, "_btn_qr_code.html" %> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<!-- bridged token --> |
|
|
|
</h1> |
|
|
|
<%= if @token.bridged do %> |
|
|
|
<!-- bridged token --> |
|
|
|
<div class="view-original-token-container"> |
|
|
|
<%= if @token.bridged do %> |
|
|
|
<%= if Map.has_key?(@token, :foreign_token_contract_address_hash) do %> |
|
|
|
<div class="view-original-token-container"> |
|
|
|
<a data-test="original_token_contract_address" href=<%= foreign_bridged_token_explorer_link(@token) %> target="_blank">View Original Token <span class="external-token-icon"><%= render BlockScoutWeb.IconsView, "_external_link.html" %></span></a> |
|
|
|
<%= if Map.has_key?(@token, :foreign_token_contract_address_hash) do %> |
|
|
|
<% end %> |
|
|
|
<a data-test="original_token_contract_address" href=<%= foreign_bridged_token_explorer_link(@token) %> target="_blank">View Original Token <span class="external-token-icon"><%= render BlockScoutWeb.IconsView, "_external_link.html" %></span></a> |
|
|
|
</div> |
|
|
|
|
|
|
|
<%= if Map.has_key?(@token, :custom_metadata) do %> |
|
|
|
|
|
|
|
<div style="margin-top: 15px; font-size: 12px;"> |
|
|
|
|
|
|
|
<%= @token.custom_metadata %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<%= if Map.has_key?(@token, :custom_metadata) do %> |
|
|
|
|
|
|
|
<div style="margin-top: 15px; font-size: 12px;"> |
|
|
|
|
|
|
|
<%= @token.custom_metadata %> |
|
|
|
|
|
|
|
</div> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
</h1> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
|
|
<h3 class="token-address-mobile"><%= Address.checksum(@token.contract_address_hash) %></h3> |
|
|
|
<h3 class="token-address-mobile"><%= Address.checksum(@token.contract_address_hash) %></h3> |
|
|
|
|
|
|
|
|
|
|
|