|
@ -1041,7 +1041,9 @@ describe('Wallet service', function() { |
|
|
copayer.name.should.equal('me'); |
|
|
copayer.name.should.equal('me'); |
|
|
copayer.id.should.equal(copayerId); |
|
|
copayer.id.should.equal(copayerId); |
|
|
copayer.customData.should.equal('dummy custom data'); |
|
|
copayer.customData.should.equal('dummy custom data'); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var notif = _.find(notifications, { |
|
|
var notif = _.find(notifications, { |
|
|
type: 'NewCopayer' |
|
|
type: 'NewCopayer' |
|
@ -1250,7 +1252,9 @@ describe('Wallet service', function() { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
wallet.status.should.equal('complete'); |
|
|
wallet.status.should.equal('complete'); |
|
|
wallet.publicKeyRing.length.should.equal(3); |
|
|
wallet.publicKeyRing.length.should.equal(3); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var notif = _.find(notifications, { |
|
|
var notif = _.find(notifications, { |
|
|
type: 'WalletComplete' |
|
|
type: 'WalletComplete' |
|
@ -1265,7 +1269,9 @@ describe('Wallet service', function() { |
|
|
|
|
|
|
|
|
it('should not notify WalletComplete if 1-of-1', function(done) { |
|
|
it('should not notify WalletComplete if 1-of-1', function(done) { |
|
|
helpers.createAndJoinWallet(1, 1, function(server) { |
|
|
helpers.createAndJoinWallet(1, 1, function(server) { |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var notif = _.find(notifications, { |
|
|
var notif = _.find(notifications, { |
|
|
type: 'WalletComplete' |
|
|
type: 'WalletComplete' |
|
@ -1554,7 +1560,9 @@ describe('Wallet service', function() { |
|
|
address.isChange.should.be.false; |
|
|
address.isChange.should.be.false; |
|
|
address.path.should.equal('m/2147483647/0/0'); |
|
|
address.path.should.equal('m/2147483647/0/0'); |
|
|
address.type.should.equal('P2SH'); |
|
|
address.type.should.equal('P2SH'); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var notif = _.find(notifications, { |
|
|
var notif = _.find(notifications, { |
|
|
type: 'NewAddress' |
|
|
type: 'NewAddress' |
|
@ -1617,7 +1625,9 @@ describe('Wallet service', function() { |
|
|
address.isChange.should.be.false; |
|
|
address.isChange.should.be.false; |
|
|
address.path.should.equal('m/0/0'); |
|
|
address.path.should.equal('m/0/0'); |
|
|
address.type.should.equal('P2SH'); |
|
|
address.type.should.equal('P2SH'); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var notif = _.find(notifications, { |
|
|
var notif = _.find(notifications, { |
|
|
type: 'NewAddress' |
|
|
type: 'NewAddress' |
|
@ -1684,7 +1694,9 @@ describe('Wallet service', function() { |
|
|
address.isChange.should.be.false; |
|
|
address.isChange.should.be.false; |
|
|
address.path.should.equal('m/0/0'); |
|
|
address.path.should.equal('m/0/0'); |
|
|
address.type.should.equal('P2PKH'); |
|
|
address.type.should.equal('P2PKH'); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var notif = _.find(notifications, { |
|
|
var notif = _.find(notifications, { |
|
|
type: 'NewAddress' |
|
|
type: 'NewAddress' |
|
@ -3605,7 +3617,9 @@ describe('Wallet service', function() { |
|
|
txp.actions.length.should.equal(1); |
|
|
txp.actions.length.should.equal(1); |
|
|
var action = txp.getActionBy(wallet.copayers[0].id); |
|
|
var action = txp.getActionBy(wallet.copayers[0].id); |
|
|
action.type.should.equal('accept'); |
|
|
action.type.should.equal('accept'); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var last = _.last(notifications); |
|
|
var last = _.last(notifications); |
|
|
last.type.should.not.equal('TxProposalFinallyAccepted'); |
|
|
last.type.should.not.equal('TxProposalFinallyAccepted'); |
|
@ -3635,7 +3649,9 @@ describe('Wallet service', function() { |
|
|
txp.isBroadcasted().should.be.false; |
|
|
txp.isBroadcasted().should.be.false; |
|
|
should.exist(txp.txid); |
|
|
should.exist(txp.txid); |
|
|
txp.actions.length.should.equal(2); |
|
|
txp.actions.length.should.equal(2); |
|
|
server.getNotifications({}, function(err, notifications) { |
|
|
server.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
var last = _.last(notifications); |
|
|
var last = _.last(notifications); |
|
|
last.type.should.equal('TxProposalFinallyAccepted'); |
|
|
last.type.should.equal('TxProposalFinallyAccepted'); |
|
@ -4180,7 +4196,9 @@ describe('Wallet service', function() { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
function(next) { |
|
|
function(next) { |
|
|
server2.getNotifications({}, function(err, notifications) { |
|
|
server2.getLatestNotifications({ |
|
|
|
|
|
minTs: 0 |
|
|
|
|
|
}, function(err, notifications) { |
|
|
should.not.exist(err); |
|
|
should.not.exist(err); |
|
|
should.exist(notifications); |
|
|
should.exist(notifications); |
|
|
notifications.length.should.above(0); |
|
|
notifications.length.should.above(0); |
|
|