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
|
||||
key: 'satoshirocks',
|
||||
host: '162.242.219.26',
|
||||
port: 80,
|
||||
port: 10000,
|
||||
path: '/',
|
||||
|
||||
// other PeerJS config
|
||||
maxPeers: 15,
|
||||
debug: 3,
|
||||
debug: 1,
|
||||
|
||||
// Network encryption config
|
||||
sjclParams: {
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</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 data-alert class="alert-box radius error">
|
||||
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)
|
||||
$rootScope.txAlertCount = 0;
|
||||
$rootScope.insightError = -1;
|
||||
$rootScope.insightError = 0;
|
||||
|
||||
$rootScope.$watch('insightError', function(status) {
|
||||
if (status === 0) {
|
||||
if (status === -1) {
|
||||
$rootScope.$flashMessage = {
|
||||
type: 'success',
|
||||
message: 'Networking Restored :)',
|
||||
};
|
||||
$rootScope.insightError = 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -231,15 +231,17 @@ TxProposals.prototype.getTxProposal = function(ntxid, copayers) {
|
|||
return i;
|
||||
};
|
||||
|
||||
//returns the unspent txid-vout used in PENDING Txs
|
||||
TxProposals.prototype.getUsedUnspent = function(maxRejectCount) {
|
||||
var ret = [];
|
||||
var ret = {};
|
||||
for(var i in this.txps) {
|
||||
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;
|
||||
|
||||
for (var j in u){
|
||||
ret.push(u[j].txid);
|
||||
for (var j in u) {
|
||||
ret[u[j].txid + ',' + u[j].vout]=1;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
|
|
@ -596,8 +596,9 @@ Wallet.prototype.getUnspent = function(cb) {
|
|||
var uu = self.txProposals.getUsedUnspent(maxRejectCount);
|
||||
|
||||
for (var i in unspentList) {
|
||||
if (uu.indexOf(unspentList[i].txid) === -1)
|
||||
safeUnspendList.push(unspentList[i]);
|
||||
var u=unspentList[i];
|
||||
if (! uu[u.txid +','+u.vout])
|
||||
safeUnspendList.push(u);
|
||||
}
|
||||
|
||||
return cb(null, safeUnspendList, unspentList);
|
||||
|
|
|
@ -174,7 +174,6 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
root._setCommError = function(e) {
|
||||
// first error ever?
|
||||
if ($rootScope.insightError<0)
|
||||
$rootScope.insightError=0;
|
||||
$rootScope.insightError++;
|
||||
|
@ -182,6 +181,9 @@ angular.module('copayApp.services')
|
|||
|
||||
|
||||
root._clearCommError = function(e) {
|
||||
if ($rootScope.insightError>0)
|
||||
$rootScope.insightError=-1;
|
||||
else
|
||||
$rootScope.insightError=0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue