removed unused code in wallet + tests

This commit is contained in:
Ivan Socolsky 2014-12-03 16:40:26 -03:00
commit 6797c3db19
2 changed files with 0 additions and 149 deletions

View file

@ -2469,76 +2469,6 @@ describe('Wallet model', function() {
});
});
describe('#getTransactionHistoryCsv', function() {
it('should return list of txs', function(done) {
var w = cachedCreateW2();
var txs = [{
vin: [{
addr: 'in_1',
valueSat: 1000
}],
vout: [{
scriptPubKey: {
addresses: ['out_1'],
},
value: '0.00000900',
}],
fees: 0.00000100
}, {
vin: [{
addr: 'in_2',
valueSat: 2000
}],
vout: [{
scriptPubKey: {
addresses: ['out_2'],
},
value: '0.00001900',
}],
fees: 0.00000100
}, {
vin: [{
addr: 'in_3',
valueSat: 3000
}],
vout: [{
scriptPubKey: {
addresses: ['out_3'],
},
value: '0.00002900',
}],
fees: 0.00000100
}];
w.blockchain.getTransactions = sinon.stub().yields(null, {
items: txs,
totalItems: txs.length,
});
sinon.stub(w, 'getAddresses').returns(['in_1', 'in_2', 'in_3', 'out_1', 'out_2', 'out_3']);
var s = sinon.stub(w.publicKeyRing, 'addressIsOwn');
s.withArgs('in_1').returns(true);
s.withArgs('out_1').returns(false);
s.withArgs('in_2').returns(false);
s.withArgs('out_2').returns(true);
s.withArgs('in_3').returns(true);
s.withArgs('out_3').returns(true);
w.getTransactionHistoryCsv(function(data) {
data.should.exist;
data.should.equal('data:text/csv;charset=utf-8,Date,Amount(bits),Action,AddressTo,Comment,Signers\n,9,sent,"out_1",\n,0,moved,"out_2",\n,29,sent,"out_3",\n');
done();
});
});
});
describe.skip('#read', function() {
var network, blockchain;