Comparing version 0.2.4 to 0.2.5
@@ -124,3 +124,3 @@ const crypto = require('crypto'); | ||
await this.updateInDb(); | ||
} else if(objMessage.step === 'im_start_channel'){ | ||
} else if (objMessage.step === 'im_start_channel') { | ||
this.events.emit('peer_start_channel'); | ||
@@ -241,4 +241,3 @@ } else if (objMessage.step === 'addressesAndContract') { | ||
} | ||
} | ||
else if (this.step === 'waiting_transfer' && (signing_path === 'r.2.0' || signing_path === 'r.1.0') && !this.imInitiator) { | ||
} else if (this.step === 'waiting_transfer' && (signing_path === 'r.2.0' || signing_path === 'r.1.0') && !this.imInitiator) { | ||
// this is B | ||
@@ -339,3 +338,3 @@ this.newMyAmount = this.myAmount + this.transferAmount; | ||
bbWallet.sendSignature(from_address, buf_to_sign.toString("base64"), signature, signing_path, top_address); | ||
if(conf.bLight) { | ||
if (conf.bLight) { | ||
setTimeout(() => { | ||
@@ -758,29 +757,24 @@ bbLWallet.refreshLightClientHistory(); | ||
return new Promise(((resolve, reject) => { | ||
this.getInputs(this.channelAddress).then(objInputs => { | ||
if (!objInputs) throw new Error('Insufficient funds contract address: ' + this.channelAddress + ' id: ' + this.id); | ||
let opts = {}; | ||
opts.paying_addresses = [this.channelAddress]; | ||
opts.signing_addresses = [this.myAddress, this.peerAddress]; | ||
opts.inputs = objInputs.arrInputs; | ||
opts.input_amount = objInputs.total_input; | ||
opts.outputs = [{ | ||
address: objMyContract.shared_address, | ||
amount: 0 | ||
}]; | ||
opts.signer = libKeys.getLocalSigner(opts, [this.myDeviceAddress, this.peerDeviceAddress], libKeys.signWithLocalPrivateKey); | ||
opts.callbacks = { | ||
ifError: (err) => { | ||
return reject(new Error(err)); | ||
}, | ||
ifNotEnoughFunds: (err) => { | ||
return reject(new Error(err)); | ||
}, | ||
ifOk: (objJoint, assocPrivatePayloads, unlock_callback) => { | ||
unlock_callback(); | ||
return resolve(objJoint); | ||
} | ||
}; | ||
composer.composeJoint(opts); | ||
}) | ||
let opts = {}; | ||
opts.paying_addresses = [this.channelAddress]; | ||
opts.signing_addresses = [this.myAddress, this.peerAddress]; | ||
opts.outputs = [{ | ||
address: objMyContract.shared_address, | ||
amount: 0 | ||
}]; | ||
opts.spend_unconfirmed = 'all'; | ||
opts.signer = libKeys.getLocalSigner(opts, [this.myDeviceAddress, this.peerDeviceAddress], libKeys.signWithLocalPrivateKey); | ||
opts.callbacks = { | ||
ifError: (err) => { | ||
return reject(new Error(err)); | ||
}, | ||
ifNotEnoughFunds: (err) => { | ||
return reject(new Error(err)); | ||
}, | ||
ifOk: (objJoint, assocPrivatePayloads, unlock_callback) => { | ||
unlock_callback(); | ||
return resolve(objJoint); | ||
} | ||
}; | ||
composer.composeJoint(opts); | ||
})); | ||
@@ -787,0 +781,0 @@ } |
{ | ||
"name": "biot-core", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"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
152585
4106