From 83cca0aa283dfaa44feca3bebb9fafc87173d24a Mon Sep 17 00:00:00 2001 From: saneery Date: Mon, 27 May 2019 14:19:20 +0300 Subject: [PATCH] remove cast! and dump! functions from Wei module --- apps/explorer/lib/explorer/chain/wei.ex | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/wei.ex b/apps/explorer/lib/explorer/chain/wei.ex index 8b557b4ed5..4b12d3deb0 100644 --- a/apps/explorer/lib/explorer/chain/wei.ex +++ b/apps/explorer/lib/explorer/chain/wei.ex @@ -68,11 +68,6 @@ defmodule Explorer.Chain.Wei do @impl Ecto.Type def cast(_), do: :error - def cast!(arg) do - {:ok, wei} = cast(arg) - wei - end - @impl Ecto.Type def dump(%__MODULE__{value: %Decimal{} = decimal}) do {:ok, decimal} @@ -81,11 +76,6 @@ defmodule Explorer.Chain.Wei do @impl Ecto.Type def dump(_), do: :error - def dump!(arg) do - {:ok, decimal} = dump(arg) - decimal - end - @impl Ecto.Type def load(%Decimal{} = decimal) do {:ok, %__MODULE__{value: decimal}} @@ -248,11 +238,6 @@ defmodule Explorer.Chain.Wei do @spec to(t(), :wei) :: wei() def to(%__MODULE__{value: wei}, :wei), do: wei - - @spec to(t(), :integer) :: integer() - def to(%__MODULE__{value: wei}, :integer) do - Decimal.to_integer(wei) - end end defimpl Inspect, for: Explorer.Chain.Wei do