commit
d4fa919a8b
5 changed files with 221 additions and 189 deletions
|
|
@ -182,7 +182,6 @@ Insight.prototype._request = function(options, callback) {
|
|||
request.open(options.method, url, true);
|
||||
request.timeout = 5000;
|
||||
request.ontimeout = function() {
|
||||
console.log('Insight timeout...retrying');
|
||||
setTimeout(function() {
|
||||
return self._request(options,callback);
|
||||
}, self.retryDelay);
|
||||
|
|
@ -206,9 +205,7 @@ Insight.prototype._request = function(options, callback) {
|
|||
else {
|
||||
var err= 'Error code: ' + request.status + ' - Status: ' + request.statusText
|
||||
+ ' - Description: ' + request.responseText;
|
||||
console.log('Insight Temporary error (will retry):', err);
|
||||
setTimeout(function() {
|
||||
console.log('### Retrying Insight Request....'); //TODO
|
||||
return self._request(options,callback);
|
||||
}, self.retryDelay);
|
||||
return callback(new Error(err));
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ PrivateKey.prototype._getHK = function(path) {
|
|||
if (typeof path === 'undefined') {
|
||||
return this.bip;
|
||||
}
|
||||
return this.bip.derive(path);
|
||||
var ret = this.bip.derive(path);
|
||||
return ret;
|
||||
};
|
||||
|
||||
PrivateKey.prototype.getForPaths = function(paths) {
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ PublicKeyRing.prototype.getPubKeys = function(index, isChange) {
|
|||
pubKeys = pubKeys.map(function(s){return new Buffer(s,'hex');});
|
||||
}
|
||||
|
||||
|
||||
return pubKeys;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ Wallet.prototype._handlePublicKeyRing = function(senderId, data, isInbound) {
|
|||
try{
|
||||
hasChanged = this.publicKeyRing.merge(inPKR, true);
|
||||
} catch (e){
|
||||
console.log('## WALLET ERROR', e); //TODO
|
||||
this.log('## WALLET ERROR', e); //TODO
|
||||
this.emit('connectionError', e.message);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue