mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-03-15 07:20:49 +00:00
rename, update version
This commit is contained in:
parent
6e7d1a93fa
commit
63281bbdfd
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fluence",
|
||||
"version": "0.7.107",
|
||||
"version": "0.7.108",
|
||||
"description": "the browser js-libp2p client for the Fluence network",
|
||||
"main": "./dist/fluence.js",
|
||||
"typings": "./dist/fluence.d.ts",
|
||||
|
@ -39,11 +39,11 @@ export class FluenceConnection {
|
||||
private readonly address: Multiaddr;
|
||||
readonly nodePeerId: PeerId;
|
||||
private readonly selfPeerIdStr: string;
|
||||
private readonly handleCall: (call: Particle) => void;
|
||||
private readonly handleParticle: (call: Particle) => void;
|
||||
|
||||
constructor(multiaddr: Multiaddr, hostPeerId: PeerId, selfPeerId: PeerId, handleCall: (call: Particle) => void) {
|
||||
constructor(multiaddr: Multiaddr, hostPeerId: PeerId, selfPeerId: PeerId, handleParticle: (call: Particle) => void) {
|
||||
this.selfPeerId = selfPeerId;
|
||||
this.handleCall = handleCall;
|
||||
this.handleParticle = handleParticle;
|
||||
this.selfPeerIdStr = selfPeerId.toB58String();
|
||||
this.address = multiaddr;
|
||||
this.nodePeerId = hostPeerId;
|
||||
@ -89,7 +89,7 @@ export class FluenceConnection {
|
||||
let particle = parseParticle(msg);
|
||||
log.debug('Particle is received:');
|
||||
log.debug(JSON.stringify(particle, undefined, 2));
|
||||
_this.handleCall(particle);
|
||||
_this.handleParticle(particle);
|
||||
} catch (e) {
|
||||
log.error('error on handling a new incoming message: ' + e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user