@ -103,7 +103,7 @@ defmodule Explorer.Chain.Token do
@doc """
Builds an `Ecto.Query` to fetch the cataloged tokens.
These are tokens with cataloged field set to true.
These are tokens with cataloged field set to true and updated_at is earlier or equal than an hour ago.
"""
def cataloged_tokens(hours \\ 48) do
date_now = DateTime.utc_now()
@ -16,7 +16,7 @@ defmodule Explorer.Chain.TokenTest do
assert Repo.all(Token.cataloged_tokens()) == [token.contract_address_hash]
end
test "filter tokens by updated_at filed" do
test "filter tokens by updated_at field" do
{:ok, date} = DateTime.now("Etc/UTC")
hours_ago_date = DateTime.add(date, -:timer.hours(60), :millisecond)