diff --git a/src/gd_v_call.erl b/src/gd_v_call.erl index 586ffec..11d19a2 100644 --- a/src/gd_v_call.erl +++ b/src/gd_v_call.erl @@ -87,7 +87,7 @@ tx_info(Win) -> %%% Startup Functions start_link(Args) -> - wx_object:start_link({local, ?MODULE}, ?MODULE, Args, []). + wx_object:start_link(?MODULE, Args, []). init({Prefs, FunDef = {FunName, FunIlk}, ConID, Build, Selected, Keys}) -> @@ -472,8 +472,7 @@ dry_run2(State = #s{funret = ReturnType, State. -check_tx(State = #s{frame = Frame, - j = J, +check_tx(State = #s{j = J, fundef = {_, init}, tx_data = #{"tx_hash" := TXHash}, tx_info = none, @@ -485,7 +484,6 @@ check_tx(State = #s{frame = Frame, ok = tell(info, "Contract deployed: ~p", [Info]), _ = wxButton:disable(ActionB), ok = gd_con:open_contract(ConID), - ok = wxWindow:destroy(Frame), self() ! retire, State; {error, "Tx not mined"} -> @@ -502,7 +500,6 @@ check_tx(State = #s{frame = Frame, end; check_tx(State = #s{j = J, funret = ReturnType, - con_id = ConID, tx_data = #{"tx_hash" := TXHash}, tx_info = none, status = submitted, @@ -512,7 +509,6 @@ check_tx(State = #s{j = J, info = #w{wx = InfoT}}) -> case hz:tx_info(TXHash) of {ok, Info = #{"call_info" := #{"return_type" := "ok", - "contract_id" := ConID, "return_value" := ReturnCB}}} -> FormattedInfo = io_lib:format("~tp", [Info]), _ = wxButton:enable(CopyB), @@ -520,7 +516,6 @@ check_tx(State = #s{j = J, ReturnV = hz:decode_bytearray(ReturnCB, {sophia, ReturnType}), ok = wxTextCtrl:setValue(ReturnT, ReturnV), ok = wxTextCtrl:setValue(InfoT, FormattedInfo), - ok = gd_con:show_call(ConID, Info, false), State#s{status = included, tx_info = Info}; {ok, Reason = #{"call_info" := #{"return_type" := "revert", "return_value" := ReturnCB}}} -> _ = wxButton:enable(CopyB), @@ -529,7 +524,6 @@ check_tx(State = #s{j = J, ok = wxTextCtrl:setValue(ReturnT, ReturnV), FormattedInfo = io_lib:format("~tp", [Reason]), ok = wxTextCtrl:setValue(InfoT, FormattedInfo), - ok = gd_con:show_call(ConID, Reason, false), State#s{status = rejected, tx_info = Reason}; {error, "Tx not mined"} -> ok = wxTextCtrl:setValue(InfoT, J("[Transaction not yet mined.]")),