diff --git a/apps/explorer/lib/explorer/account/notifier/notify.ex b/apps/explorer/lib/explorer/account/notifier/notify.ex index bfbcb6326d..b64b4bd47a 100644 --- a/apps/explorer/lib/explorer/account/notifier/notify.ex +++ b/apps/explorer/lib/explorer/account/notifier/notify.ex @@ -11,6 +11,7 @@ defmodule Explorer.Account.Notifier.Notify do require Logger import Ecto.Query, only: [from: 2] + import Explorer.Chain, only: [hash_to_lower_case_string: 1] def call(nil), do: nil def call([]), do: nil @@ -123,7 +124,11 @@ defmodule Explorer.Account.Notifier.Notify do subject: summary.subject, tx_fee: summary.tx_fee, name: summary.name, - type: summary.type + type: summary.type, + from_address_hash_hash: hash_to_lower_case_string(summary.from_address_hash), + to_address_hash_hash: hash_to_lower_case_string(summary.to_address_hash), + transaction_hash_hash: hash_to_lower_case_string(summary.transaction_hash), + subject_hash: summary.subject } end end diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index d95c915ed8..6c909be3ed 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -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