mirror of
https://github.com/fluencelabs/aquavm
synced 2024-12-04 15:20:16 +00:00
Fix issue when undefined data in AVM client caused FJS to fail (#313)
This commit is contained in:
parent
b4195175db
commit
a2f996dde2
@ -154,14 +154,7 @@ export async function callAvm(
|
||||
data: Uint8Array,
|
||||
callResults: CallResultsArray,
|
||||
): Promise<InterpreterResult> {
|
||||
try {
|
||||
const avmArg = serializeAvmArgs(runParams, air, prevData, data, callResults);
|
||||
const rawResult = await fn(avmArg);
|
||||
return deserializeAvmResult(rawResult);
|
||||
} catch (e) {
|
||||
return {
|
||||
retCode: -1,
|
||||
errorMessage: 'marine-js call failed, ' + e,
|
||||
} as any;
|
||||
}
|
||||
const avmArg = serializeAvmArgs(runParams, air, prevData, data, callResults);
|
||||
const rawResult = await fn(avmArg);
|
||||
return deserializeAvmResult(rawResult);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user