From a6907464f1d1d82138c6f39cb065dd86bf62f5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=BBelazko?= Date: Thu, 30 Aug 2018 09:38:33 +0200 Subject: [PATCH] Shorten lines with replies so it reads better --- lib/exw3.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/exw3.ex b/lib/exw3.ex index 37c041f..1e949c3 100644 --- a/lib/exw3.ex +++ b/lib/exw3.ex @@ -580,7 +580,8 @@ defmodule ExW3 do {:ok,_} <- check_option(args[:options][:gas], :missing_gas), {:ok, bin} <- check_option([state[:bin], args[:bin]], :missing_binary) do - {:reply, {:ok, deploy_helper(bin, state[:abi], args)}, state} + result = {:ok, deploy_helper(bin, state[:abi], args)} + {:reply, result , state} else err -> {:reply, err, state} end @@ -593,7 +594,8 @@ defmodule ExW3 do def handle_call({:call, {method_name, args}}, _from, state) do with {:ok, address} <- check_option(state[:address], :missing_address) do - {:reply, eth_call_helper(address, state[:abi], Atom.to_string(method_name), args), state} + result = eth_call_helper(address, state[:abi], Atom.to_string(method_name), args) + {:reply, result, state} else err -> {:reply, err, state} end @@ -604,7 +606,8 @@ defmodule ExW3 do {:ok, _} <- check_option(options[:from], :missing_sender), {:ok, _} <- check_option(options[:gas], :missing_gas) do - {:reply, eth_send_helper(address, state[:abi], Atom.to_string(method_name), args, options), state} + result = eth_send_helper(address, state[:abi], Atom.to_string(method_name), args, options) + {:reply, result, state} else err -> {:reply, err, state} end