find index of the comment instead of item

pull/2588/head
Ayrat Badykov 5 years ago
parent d02247d551
commit 327b762528
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/explorer/lib/explorer/chain/smart_contract.ex

@ -280,12 +280,12 @@ defmodule Explorer.Chain.SmartContract do
def add_submitted_comment(contract_lines, inserted_at) when is_list(contract_lines) do
etherscan_index =
Enum.find(contract_lines, fn line ->
Enum.find_index(contract_lines, fn line ->
String.contains?(line, "Submitted for verification at Etherscan.io")
end)
blockscout_index =
Enum.find(contract_lines, fn line ->
Enum.find_index(contract_lines, fn line ->
String.contains?(line, "Submitted for verification at blockscout.com")
end)

Loading…
Cancel
Save