Fix non-existance account dry run problem
This commit is contained in:
+7
-1
@@ -447,7 +447,8 @@ do_dry_run(State = #s{action = #w{wx = ActionB}}, ConID, TX) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
dry_run2(State = #s{funret = ReturnType,
|
dry_run2(State = #s{j = J,
|
||||||
|
funret = ReturnType,
|
||||||
return = #w{wx = ReturnT},
|
return = #w{wx = ReturnT},
|
||||||
copy = #w{wx = CopyB},
|
copy = #w{wx = CopyB},
|
||||||
tx_data = TXData,
|
tx_data = TXData,
|
||||||
@@ -468,6 +469,11 @@ dry_run2(State = #s{funret = ReturnType,
|
|||||||
"return_value" := ReturnCB},
|
"return_value" := ReturnCB},
|
||||||
"result" := "ok","type" := "contract_call"}]} ->
|
"result" := "ok","type" := "contract_call"}]} ->
|
||||||
hz:decode_bytearray(ReturnCB, {sophia, ReturnType});
|
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 ->
|
Other ->
|
||||||
io_lib:format("???: ~tp", [Other])
|
io_lib:format("???: ~tp", [Other])
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user