Comparing version 0.2.1 to 0.2.2
@@ -14,2 +14,3 @@ const crypto = require('crypto'); | ||
const bbWallet = require('ocore/wallet'); | ||
const bbLWallet = require('ocore/light_wallet'); | ||
const db = require('ocore/db'); | ||
@@ -91,2 +92,6 @@ const mutex = require('ocore/mutex'); | ||
this.events.emit('start'); | ||
core.sendTechMessageToDevice(this.peerDeviceAddress, { | ||
id: this.id, | ||
step: 'im_start_channel' | ||
}); | ||
if (this.unlockStartChannel) { | ||
@@ -121,2 +126,4 @@ this.unlockStartChannel(); | ||
await this.updateInDb(); | ||
} else if(objMessage.step === 'im_start_channel'){ | ||
this.events.emit('peer_start_channel'); | ||
} else if (objMessage.step === 'addressesAndContract') { | ||
@@ -162,9 +169,11 @@ let check = ChannelUtils.check1Contract(this, objMessage.contract.shared_address, objMessage.contract.arrDefinition); | ||
let objJoint = await this.createChannel(objMessage); | ||
this.step = 'waiting_transfers'; | ||
this.events.emit('start'); | ||
if (this.unlockStartChannel) { | ||
this.unlockStartChannel(); | ||
this.unlockStartChannel = null; | ||
} | ||
await this.updateInDb(); | ||
this.events.on('peer_start_channel', async () => { | ||
this.step = 'waiting_transfers'; | ||
this.events.emit('start'); | ||
if (this.unlockStartChannel) { | ||
this.unlockStartChannel(); | ||
this.unlockStartChannel = null; | ||
} | ||
await this.updateInDb(); | ||
}); | ||
} else if (objMessage.step === 'transfer_start' && this.step === 'waiting_transfers') { | ||
@@ -332,2 +341,7 @@ this.messageTransfer = objMessage.message; | ||
bbWallet.sendSignature(from_address, buf_to_sign.toString("base64"), signature, signing_path, top_address); | ||
if(conf.bLight) { | ||
setTimeout(() => { | ||
bbLWallet.refreshLightClientHistory(); | ||
}, 1000); | ||
} | ||
}); | ||
@@ -594,2 +608,3 @@ } | ||
this.unlockPick(); | ||
this.unlockPick = null; | ||
} | ||
@@ -596,0 +611,0 @@ }, MAX_UNLOCK_TIMEOUT); |
{ | ||
"name": "biot-core", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "core.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152042
4094