Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 547cbc319d | |||
| 8335e326bd | |||
| 7a65a8c50f | |||
| c3888d1c2f | |||
| cf4a3856b9 |
+9
-3
@@ -447,7 +447,8 @@ do_dry_run(State = #s{action = #w{wx = ActionB}}, ConID, TX) ->
|
||||
end.
|
||||
|
||||
|
||||
dry_run2(State = #s{funret = ReturnType,
|
||||
dry_run2(State = #s{j = J,
|
||||
funret = ReturnType,
|
||||
return = #w{wx = ReturnT},
|
||||
copy = #w{wx = CopyB},
|
||||
tx_data = TXData,
|
||||
@@ -458,16 +459,21 @@ dry_run2(State = #s{funret = ReturnType,
|
||||
case TXInfo of
|
||||
#{"results" :=
|
||||
[#{"call_obj" :=
|
||||
#{"return_type" := "revert",
|
||||
#{"return_type" := "revert",
|
||||
"return_value" := ReturnCB},
|
||||
"result" := "ok","type" := "contract_call"}]} ->
|
||||
io_lib:format("Revert: ~ts", [hz:decode_bytearray(ReturnCB, sophia)]);
|
||||
#{"results" :=
|
||||
[#{"call_obj" :=
|
||||
#{"return_type" := "ok",
|
||||
#{"return_type" := "ok",
|
||||
"return_value" := ReturnCB},
|
||||
"result" := "ok","type" := "contract_call"}]} ->
|
||||
hz:decode_bytearray(ReturnCB, {sophia, ReturnType});
|
||||
#{"results" :=
|
||||
[#{"reason" := "Internal error:\n account_not_found\n",
|
||||
"result" := "error",
|
||||
"type" := "contract_call"}]} ->
|
||||
["[", J("The calling account requires funds"), "]"];
|
||||
Other ->
|
||||
io_lib:format("???: ~tp", [Other])
|
||||
end,
|
||||
|
||||
@@ -498,7 +498,7 @@ check_quote2(State = #s{path = PathP}, PubKey) ->
|
||||
end.
|
||||
|
||||
check_quote3(State = #s{ttl = TTL_T}, PubKey, Path) ->
|
||||
TTL_S = wxTextCtrl:getValue(TTL_T),
|
||||
TTL_S = wxTextCtrl:getValue(TTL_T),
|
||||
case string_to_int(TTL_S) of
|
||||
{ok, TTL} ->
|
||||
check_quote4(State, PubKey, Path, TTL);
|
||||
|
||||
@@ -128,7 +128,7 @@ init({Prefs, Manifest}) ->
|
||||
Trans = gd_jt:read_translations(?MODULE),
|
||||
J = gd_jt:j(Lang, Trans),
|
||||
Wx = wx:new(),
|
||||
Frame = wxFrame:new(Wx, ?wxID_ANY, J("Contracts")),
|
||||
Frame = wxFrame:new(Wx, ?wxID_ANY, "FateWeaver"),
|
||||
|
||||
MainSz = wxBoxSizer:new(?wxVERTICAL),
|
||||
TopBook = wxNotebook:new(Frame, ?wxID_ANY, [{style, ?wxBK_DEFAULT}]),
|
||||
|
||||
Reference in New Issue
Block a user