Fix subpath not added to transaction_controller and holder_controller

- Update current_path to equal Controller.current_full_path(conn)
pull/5801/head
Mo 2 years ago committed by Никита Поздняков
parent 08c77408c0
commit c0f82132ea
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 1
      CHANGELOG.md
  2. 3
      apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/holder_controller.ex
  3. 4
      apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex

@ -3,6 +3,7 @@
### Features
### Fixes
- [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers
### Chore

@ -1,6 +1,7 @@
defmodule BlockScoutWeb.Tokens.Instance.HolderController do
use BlockScoutWeb, :controller
alias BlockScoutWeb.Controller
alias BlockScoutWeb.Tokens.HolderView
alias Explorer.{Chain, Market}
alias Explorer.Chain.Address
@ -61,7 +62,7 @@ defmodule BlockScoutWeb.Tokens.Instance.HolderController do
conn,
"index.html",
token_instance: token_transfer,
current_path: current_path(conn),
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)
)

@ -158,7 +158,7 @@ defmodule BlockScoutWeb.TransactionController do
"show_token_transfers.html",
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(),
block_height: Chain.block_height(),
current_path: current_path(conn),
current_path: Controller.current_full_path(conn),
show_token_transfers: true,
transaction: transaction
)
@ -187,7 +187,7 @@ defmodule BlockScoutWeb.TransactionController do
conn,
"show_internal_transactions.html",
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(),
current_path: current_path(conn),
current_path: Controller.current_full_path(conn),
block_height: Chain.block_height(),
show_token_transfers: Chain.transaction_has_token_transfers?(transaction_hash),
transaction: transaction

Loading…
Cancel
Save