split coerce/3 into two functions
Also renamed coerce_bindings to erlang_args_to_fate, to match.
This commit is contained in:
+2
-2
@@ -716,7 +716,7 @@ decode_bytearray_fate(EncodedStr) ->
|
||||
decode_bytearray(Type, EncodedStr) ->
|
||||
case decode_bytearray_fate(EncodedStr) of
|
||||
{ok, none} -> {ok, none};
|
||||
{ok, Object} -> hz_aaci:coerce(Type, Object, from_fate);
|
||||
{ok, Object} -> hz_aaci:fate_to_erlang(Type, Object);
|
||||
{error, Reason} -> {error, Reason}
|
||||
end.
|
||||
|
||||
@@ -1518,7 +1518,7 @@ encode_call_data({aaci, Label}, Fun, Args) ->
|
||||
end.
|
||||
|
||||
encode_call_data2(ArgDef, Fun, Args) ->
|
||||
case hz_aaci:coerce_bindings(ArgDef, Args, to_fate) of
|
||||
case hz_aaci:erlang_args_to_fate(ArgDef, Args) of
|
||||
{ok, Coerced} -> gmb_fate_abi:create_calldata(Fun, Coerced);
|
||||
Errors -> Errors
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user