Browse Source

fix txProposal#isPending

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

2
lib/model/txproposal.js

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

13
test/integration.js

@ -978,14 +978,11 @@ describe('Copay server', function() {
server.getPendingTxs({}, function(err, txps) {
should.not.exist(err);
txps.length.should.equal(0);
server.getTx({
id: txpid
}, function(err, txp) {
txp.status.should.equal('accepted');
should.not.exist(txp.txid);
done();
});
txps.length.should.equal(1);
var txp = txps[0];
txp.status.should.equal('accepted');
should.not.exist(txp.txid);
done();
});
});
});

Loading…
Cancel
Save