mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-29 07:41:35 +00:00
fluence-js: fix particle data merging (#998)
This commit is contained in:
@ -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",
|
||||
|
@ -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}`)
|
||||
});
|
||||
|
Reference in New Issue
Block a user