Update cataloged_tokens method documentation

pull/2748/head
Victor Baranov 5 years ago
parent 0a168dec6d
commit 6ff74e4f9f
  1. 2
      apps/explorer/lib/explorer/chain/token.ex
  2. 2
      apps/explorer/test/explorer/chain/token_test.exs

@ -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)

Loading…
Cancel
Save