Browse Source

fix txProposal#isPending

activeAddress
Ivan Socolsky 10 years ago
parent
commit
7726a69ae5
  1. 2
      lib/model/txproposal.js
  2. 7
      test/integration.js

2
lib/model/txproposal.js

@ -147,7 +147,7 @@ TxProposal.prototype.reject = function(copayerId) {
}; };
TxProposal.prototype.isPending = function() { TxProposal.prototype.isPending = function() {
return this.status === 'pending'; return !_.any(['boradcasted', 'rejected'], this.status);
}; };
TxProposal.prototype.isAccepted = function() { TxProposal.prototype.isAccepted = function() {

7
test/integration.js

@ -978,10 +978,8 @@ describe('Copay server', function() {
server.getPendingTxs({}, function(err, txps) { server.getPendingTxs({}, function(err, txps) {
should.not.exist(err); should.not.exist(err);
txps.length.should.equal(0); txps.length.should.equal(1);
server.getTx({ var txp = txps[0];
id: txpid
}, function(err, txp) {
txp.status.should.equal('accepted'); txp.status.should.equal('accepted');
should.not.exist(txp.txid); should.not.exist(txp.txid);
done(); done();
@ -991,7 +989,6 @@ describe('Copay server', function() {
}); });
}); });
}); });
});
describe('Multisignature wallet', function() { describe('Multisignature wallet', function() {
it.skip('all copayers should see pending proposal created by one copayer', function(done) {}); it.skip('all copayers should see pending proposal created by one copayer', function(done) {});

Loading…
Cancel
Save