mirror of https://github.com/BTCPrivate/copay.git
commit
a3e0711dcd
|
@ -0,0 +1,2 @@
|
||||||
|
--exclude=js/copayBundle.js
|
||||||
|
--exclude=lib/bitcore/browser/bundle.js
|
|
@ -23,12 +23,12 @@ var defaultConfig = {
|
||||||
// Use this to connect to bitpay's PeerJS server
|
// Use this to connect to bitpay's PeerJS server
|
||||||
key: 'satoshirocks',
|
key: 'satoshirocks',
|
||||||
host: '162.242.219.26',
|
host: '162.242.219.26',
|
||||||
port: 80,
|
port: 10000,
|
||||||
path: '/',
|
path: '/',
|
||||||
|
|
||||||
// other PeerJS config
|
// other PeerJS config
|
||||||
maxPeers: 15,
|
maxPeers: 15,
|
||||||
debug: 3,
|
debug: 1,
|
||||||
|
|
||||||
// Network encryption config
|
// Network encryption config
|
||||||
sjclParams: {
|
sjclParams: {
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" ng-if='$root.insightError>1'>
|
<div class="row" ng-if='$root.insightError>0'>
|
||||||
<div class="small-8 large-centered columns">
|
<div class="small-8 large-centered columns">
|
||||||
<div data-alert class="alert-box radius error">
|
<div data-alert class="alert-box radius error">
|
||||||
Having troubles connecting to Insight server. Check
|
Having troubles connecting to Insight server. Check
|
||||||
|
|
|
@ -35,14 +35,15 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
||||||
|
|
||||||
// Initialize alert notification (not show when init wallet)
|
// Initialize alert notification (not show when init wallet)
|
||||||
$rootScope.txAlertCount = 0;
|
$rootScope.txAlertCount = 0;
|
||||||
$rootScope.insightError = -1;
|
$rootScope.insightError = 0;
|
||||||
|
|
||||||
$rootScope.$watch('insightError', function(status) {
|
$rootScope.$watch('insightError', function(status) {
|
||||||
if (status === 0) {
|
if (status === -1) {
|
||||||
$rootScope.$flashMessage = {
|
$rootScope.$flashMessage = {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: 'Networking Restored :)',
|
message: 'Networking Restored :)',
|
||||||
};
|
};
|
||||||
|
$rootScope.insightError = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -231,15 +231,17 @@ TxProposals.prototype.getTxProposal = function(ntxid, copayers) {
|
||||||
return i;
|
return i;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//returns the unspent txid-vout used in PENDING Txs
|
||||||
TxProposals.prototype.getUsedUnspent = function(maxRejectCount) {
|
TxProposals.prototype.getUsedUnspent = function(maxRejectCount) {
|
||||||
var ret = [];
|
var ret = {};
|
||||||
for(var i in this.txps) {
|
for(var i in this.txps) {
|
||||||
var u = this.txps[i].builder.getSelectedUnspent();
|
var u = this.txps[i].builder.getSelectedUnspent();
|
||||||
if (this.getTxProposal(i).rejectCount>maxRejectCount)
|
var p = this.getTxProposal(i);
|
||||||
|
if (p.rejectCount>maxRejectCount || p.sentTxid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (var j in u){
|
for (var j in u) {
|
||||||
ret.push(u[j].txid);
|
ret[u[j].txid + ',' + u[j].vout]=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -596,8 +596,9 @@ Wallet.prototype.getUnspent = function(cb) {
|
||||||
var uu = self.txProposals.getUsedUnspent(maxRejectCount);
|
var uu = self.txProposals.getUsedUnspent(maxRejectCount);
|
||||||
|
|
||||||
for (var i in unspentList) {
|
for (var i in unspentList) {
|
||||||
if (uu.indexOf(unspentList[i].txid) === -1)
|
var u=unspentList[i];
|
||||||
safeUnspendList.push(unspentList[i]);
|
if (! uu[u.txid +','+u.vout])
|
||||||
|
safeUnspendList.push(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cb(null, safeUnspendList, unspentList);
|
return cb(null, safeUnspendList, unspentList);
|
||||||
|
|
|
@ -174,7 +174,6 @@ angular.module('copayApp.services')
|
||||||
};
|
};
|
||||||
|
|
||||||
root._setCommError = function(e) {
|
root._setCommError = function(e) {
|
||||||
// first error ever?
|
|
||||||
if ($rootScope.insightError<0)
|
if ($rootScope.insightError<0)
|
||||||
$rootScope.insightError=0;
|
$rootScope.insightError=0;
|
||||||
$rootScope.insightError++;
|
$rootScope.insightError++;
|
||||||
|
@ -182,7 +181,10 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
|
|
||||||
root._clearCommError = function(e) {
|
root._clearCommError = function(e) {
|
||||||
$rootScope.insightError=0;
|
if ($rootScope.insightError>0)
|
||||||
|
$rootScope.insightError=-1;
|
||||||
|
else
|
||||||
|
$rootScope.insightError=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
root.setSocketHandlers = function() {
|
root.setSocketHandlers = function() {
|
||||||
|
|
Loading…
Reference in New Issue