This commit is contained in:
Akim Mamedov 2023-11-17 22:39:32 +07:00
parent 17962dee2d
commit 22a0cc27d6
4 changed files with 4 additions and 6 deletions

View File

@ -14,8 +14,7 @@ import type { IFluenceClient as IFluenceClient$$, ParticleContext as ParticleCon
// Making aliases to reduce chance of accidental name collision
import {
v5_callFunction as callFunction$$,
v5_registerService as registerService$$,
FluencePeer as FluencePeer$$
v5_registerService as registerService$$
} from '@fluencelabs/js-client';
// Services

View File

@ -14,8 +14,7 @@
// Making aliases to reduce chance of accidental name collision
import {
v5_callFunction as callFunction$$,
v5_registerService as registerService$$,
FluencePeer as FluencePeer$$
v5_registerService as registerService$$
} from '@fluencelabs/js-client';
// Services

View File

@ -14,8 +14,7 @@ import type { IFluenceClient as IFluenceClient$$, ParticleContext as ParticleCon
// Making aliases to reduce chance of accidental name collision
import {
v5_callFunction as callFunction$$,
v5_registerService as registerService$$,
FluencePeer as FluencePeer$$
v5_registerService as registerService$$
} from '@fluencelabs/js-client';
// Services

View File

@ -209,6 +209,7 @@ export const wrapFunction = (
| ArrowType<LabeledProductType<SimpleTypes> | UnlabeledProductType>,
): ServiceImpl[string] => {
return async (...args) => {
// These assertions used to correctly destructure tuple. It's impossible to do without asserts due to ts limitations.
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const jsonArgs = args.slice(0, args.length - 1) as JSONValue[];
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions