diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex index 8fa9a76d506d..75fc0a670806 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex @@ -129,7 +129,7 @@ defmodule BlockScoutWeb.API.RPC.AddressView do "confirmations" => "#{transaction.confirmations}", "gatewayFeeRecipient" => "#{transaction.gas_fee_recipient_hash}", "gatewayFee" => "#{transaction.gateway_fee}", - "feeCurrency" => Util.contract_name_to_symbol(transaction.fee_currency, true) + "feeCurrency" => Util.fee_currency_token_symbol(transaction.fee_currency) } end diff --git a/apps/explorer/lib/explorer/celo/util.ex b/apps/explorer/lib/explorer/celo/util.ex index 6dd221aa5efe..ea7721968166 100644 --- a/apps/explorer/lib/explorer/celo/util.ex +++ b/apps/explorer/lib/explorer/celo/util.ex @@ -79,13 +79,10 @@ defmodule Explorer.Celo.Util do Map.values(@celo_token_contract_symbols) end - def contract_name_to_symbol(name, use_celo_instead_cgld?) do + def fee_currency_token_symbol(name) do case name do - n when n in [nil, "goldToken"] -> - if(use_celo_instead_cgld?, do: "CELO", else: "cGLD") - - _ -> - @celo_token_contract_symbols[name] + n when n in [nil, "cGLD"] -> "CELO" + _ -> name end end end