Use new param

This commit is contained in:
Akim Mamedov
2023-11-15 23:10:33 +07:00
parent 357726a959
commit c14344e054
2 changed files with 5 additions and 1 deletions

View File

@ -99,6 +99,9 @@ export const v5_callFunction = async (
}), }),
); );
const returnTypeVoid =
def.arrow.codomain.tag === "nil" || def.arrow.codomain.items.length === 0;
const params = { const params = {
peer, peer,
args: callArgs, args: callArgs,
@ -108,6 +111,7 @@ export const v5_callFunction = async (
const result = await callAquaFunction({ const result = await callAquaFunction({
script, script,
...params, ...params,
fireAndForget: returnTypeVoid,
}); });
const valueSchema = const valueSchema =

View File

@ -50,7 +50,7 @@ export type CallAquaFunctionArgs = {
config: CallAquaFunctionConfig | undefined; config: CallAquaFunctionConfig | undefined;
peer: FluencePeer; peer: FluencePeer;
args: { [key: string]: JSONValue | ArgCallbackFunction }; args: { [key: string]: JSONValue | ArgCallbackFunction };
fireAndForget?: boolean; fireAndForget: boolean | undefined;
}; };
export type CallAquaFunctionConfig = { export type CallAquaFunctionConfig = {