fix typespec

pull/2432/head
Ayrat Badykov 5 years ago
parent 38b050cb80
commit 0d991e563e
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 2
      apps/explorer/lib/explorer/chain/hash/address.ex

@ -166,7 +166,7 @@ defmodule Explorer.Chain.Hash.Address do
iex> Explorer.Chain.Hash.Address.validate("0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232H")
{:error, :invalid_characters}
"""
@spec validate(String.t()) :: {:ok, String.t()} | {:error, :invalid_length | :invalid_characters, :invalid_checksum}
@spec validate(String.t()) :: {:ok, String.t()} | {:error, :invalid_length | :invalid_characters | :invalid_checksum}
def validate("0x" <> hash) do
with {:length, true} <- {:length, String.length(hash) == 40},
{:hex, true} <- {:hex, is_hex?(hash)},

Loading…
Cancel
Save