@@ -25,7 +25,7 @@ import { AquaCallHandler, errorHandler, fnHandler } from './AquaHandler';
2525import { loadRelayFn , loadVariablesService } from './RequestFlowBuilder' ;
2626import { logParticle , Particle } from './particle' ;
2727import log from 'loglevel' ;
28- import { AquamarineInterpreter } from './aqua/ interpreter' ;
28+ import { AirInterpreter } from '@fluencelabs/air- interpreter' ;
2929
3030const makeDefaultClientHandler = ( ) : AquaCallHandler => {
3131 const res = new AquaCallHandler ( ) ;
@@ -54,7 +54,7 @@ export class ClientImpl implements FluenceClient {
5454 }
5555
5656 private connection : FluenceConnection ;
57- private interpreter : AquamarineInterpreter ;
57+ private interpreter : AirInterpreter ;
5858
5959 constructor ( selfPeerIdFull : PeerId ) {
6060 this . selfPeerIdFull = selfPeerIdFull ;
@@ -68,13 +68,18 @@ export class ClientImpl implements FluenceClient {
6868 await this . connection . disconnect ( ) ;
6969 }
7070 this . clearWathcDog ( ) ;
71+ this . requests . forEach ( ( r ) => {
72+ r . cancel ( ) ;
73+ } ) ;
7174 }
7275
7376 async initAquamarineRuntime ( ) : Promise < void > {
74- this . interpreter = await AquamarineInterpreter . create ( {
75- particleHandler : this . interpreterCallback . bind ( this ) ,
76- peerId : this . selfPeerIdFull ,
77- } ) ;
77+ this . interpreter = await AirInterpreter . create (
78+ this . interpreterCallback . bind ( this ) ,
79+ this . selfPeerId ,
80+ 'trace' ,
81+ log . log ,
82+ ) ;
7883 }
7984
8085 async connect ( multiaddr : string | Multiaddr , options ?: FluenceConnectionOptions ) : Promise < void > {
0 commit comments