diff --git a/package.json b/package.json index 2c624b3c..9db3f640 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fluence", - "version": "0.7.100", + "version": "0.7.101", "description": "the browser js-libp2p client for the Fluence network", "main": "./dist/fluence.js", "typings": "./dist/fluence.d.ts", diff --git a/src/fluenceClient.ts b/src/fluenceClient.ts index c0100c4d..218adfe1 100644 --- a/src/fluenceClient.ts +++ b/src/fluenceClient.ts @@ -87,11 +87,13 @@ export class FluenceClient { log.info("inner interpreter outcome:"); log.info(stepperOutcome); + // update data after aquamarine execution + let newParticle: Particle = {...particle}; + newParticle.data = JSON.parse(stepperOutcome.call_path) + this.subscriptions.update(newParticle) + // do nothing if there is no `next_peer_pks` or if client isn't connected to the network if (stepperOutcome.next_peer_pks.length > 0 && this.connection) { - let newParticle: Particle = {...particle}; - newParticle.data = JSON.parse(stepperOutcome.call_path); - await this.connection.sendParticle(newParticle).catch((reason) => { console.error(`Error on sending particle with id ${particle.id}: ${reason}`) });