Removed 'funds received' notification for change addresses
This commit is contained in:
parent
e2af5ac782
commit
e0263cf594
3 changed files with 37 additions and 7 deletions
|
|
@ -1591,4 +1591,27 @@ describe('Wallet model', function() {
|
|||
should.exist(n.networkNonce);
|
||||
});
|
||||
|
||||
it('should emit notification when tx received', function(done) {
|
||||
var w = cachedCreateW2();
|
||||
w.blockchain.removeAllListeners = sinon.stub();
|
||||
var spy = sinon.spy(w, 'emit');
|
||||
|
||||
w.generateAddress(false, function(addr1) {
|
||||
w.generateAddress(true, function(addr2) {
|
||||
w.blockchain.on = sinon.stub().withArgs('tx').yields({
|
||||
address: addr1.toString(),
|
||||
});
|
||||
w._setBlockchainListeners();
|
||||
spy.calledWith('tx', addr1.toString(), false).should.be.true;
|
||||
|
||||
w.blockchain.on = sinon.stub().withArgs('tx').yields({
|
||||
address: addr2.toString(),
|
||||
});
|
||||
w._setBlockchainListeners();
|
||||
spy.calledWith('tx', addr2.toString(), true).should.be.true;
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue