|
|
|
@ -7,6 +7,7 @@ defmodule Explorer.Account.WatchlistNotification do |
|
|
|
|
use Explorer.Schema |
|
|
|
|
|
|
|
|
|
import Ecto.Changeset |
|
|
|
|
import Explorer.Chain, only: [hash_to_lower_case_string: 1] |
|
|
|
|
|
|
|
|
|
alias Explorer.Account.WatchlistAddress |
|
|
|
|
|
|
|
|
@ -56,9 +57,9 @@ defmodule Explorer.Account.WatchlistNotification do |
|
|
|
|
|
|
|
|
|
defp put_hashed_fields(changeset) do |
|
|
|
|
changeset |
|
|
|
|
|> put_change(:from_address_hash_hash, get_field(changeset, :from_address_hash)) |
|
|
|
|
|> put_change(:to_address_hash_hash, get_field(changeset, :to_address_hash)) |
|
|
|
|
|> put_change(:transaction_hash_hash, get_field(changeset, :transaction_hash)) |
|
|
|
|
|> put_change(:from_address_hash_hash, hash_to_lower_case_string(get_field(changeset, :from_address_hash))) |
|
|
|
|
|> put_change(:to_address_hash_hash, hash_to_lower_case_string(get_field(changeset, :to_address_hash))) |
|
|
|
|
|> put_change(:transaction_hash_hash, hash_to_lower_case_string(get_field(changeset, :transaction_hash))) |
|
|
|
|
|> put_change(:subject_hash, get_field(changeset, :subject)) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|