Current section
Files
Jump to
Current section
Files
lib/utils/helper.ex
defmodule Forge.Helper do
@moduledoc """
Helper functions
"""
alias Forge.TransactionMessage
@spec decode_tx(binary()) :: any()
def decode_tx(data) do
data =
try do
Base.url_decode64!(data, padding: false)
rescue
_ -> data
end
TransactionMessage.decode(data)
end
def get_key_store_path, do: Path.join(File.cwd!(), Application.get_env(:forge, :key_store_path))
end