You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: explorer/lib/explorer/contract_managers/strategy_interface_manager.ex
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,12 @@ defmodule StrategyInterfaceManager do
25
25
caseERC20InterfaceManager.name(token_address)do
26
26
{:ok,name}->%{strategy|name: name}
27
27
error->
28
-
"Error fetching token name for #{token_address}: #{inspect(error)}"|>Logger.error()
29
-
error
28
+
caseerrordo
29
+
{:error,%{"code"=>3,"data"=>"0x","message"=>"execution reverted"}}->%{strategy|name: ""}# token has no Name (empty char), not a common practice but still an ERC20
30
+
_->
31
+
"Error fetching token name for #{token_address}: #{inspect(error)}"|>Logger.error()
32
+
error
33
+
end
30
34
end
31
35
end
32
36
deffetch_token_name({:error,error})do
@@ -37,8 +41,12 @@ defmodule StrategyInterfaceManager do
37
41
caseERC20InterfaceManager.symbol(token_address)do
38
42
{:ok,symbol}->%{strategy|symbol: symbol}
39
43
error->
40
-
"Error fetching token symbol for #{token_address}: #{inspect(error)}"|>Logger.error()
41
-
error
44
+
caseerrordo
45
+
{:error,%{"code"=>3,"data"=>"0x","message"=>"execution reverted"}}->%{strategy|symbol: ""}# token has no Symbol (empty char), not a common practice but still an ERC20
46
+
_->
47
+
"Error fetching token symbol for #{token_address}: #{inspect(error)}"|>Logger.error()
0 commit comments