commit
d8a4a2ebad
2 changed files with 4 additions and 0 deletions
|
|
@ -2632,6 +2632,7 @@ Wallet.prototype.getTransactionHistory = function(opts, cb) {
|
||||||
if (proposal) {
|
if (proposal) {
|
||||||
// TODO refactor
|
// TODO refactor
|
||||||
tx.comment = proposal.comment;
|
tx.comment = proposal.comment;
|
||||||
|
tx.sentTs = proposal.sentTs;
|
||||||
tx.merchant = proposal.merchant;
|
tx.merchant = proposal.merchant;
|
||||||
tx.peerActions = proposal.peerActions;
|
tx.peerActions = proposal.peerActions;
|
||||||
tx.merchant = proposal.merchant;
|
tx.merchant = proposal.merchant;
|
||||||
|
|
|
||||||
|
|
@ -903,12 +903,15 @@ describe('Wallet model', function() {
|
||||||
it('should broadcast a TX', function(done) {
|
it('should broadcast a TX', function(done) {
|
||||||
var w = createW2(null, 1);
|
var w = createW2(null, 1);
|
||||||
var utxo = createUTXO(w);
|
var utxo = createUTXO(w);
|
||||||
|
var now = Date.now();
|
||||||
var txp = w._createTxProposal(PP.outs[0].address, PP.outs[0].amountSatStr, 'hola', utxo);
|
var txp = w._createTxProposal(PP.outs[0].address, PP.outs[0].amountSatStr, 'hola', utxo);
|
||||||
var ntxid = w.txProposals.add(txp);
|
var ntxid = w.txProposals.add(txp);
|
||||||
sinon.stub(w.blockchain, 'broadcast').yields(null, 1234);
|
sinon.stub(w.blockchain, 'broadcast').yields(null, 1234);
|
||||||
|
|
||||||
w.issueTx(ntxid, function(err, txid, status) {
|
w.issueTx(ntxid, function(err, txid, status) {
|
||||||
should.not.exist(err);
|
should.not.exist(err);
|
||||||
|
txp.getSent().should.be.above(now-1);
|
||||||
|
txp.sentTxid.should.be.equal(txid);
|
||||||
txid.should.equal(1234);
|
txid.should.equal(1234);
|
||||||
status.should.equal(Wallet.TX_BROADCASTED);
|
status.should.equal(Wallet.TX_BROADCASTED);
|
||||||
done();
|
done();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue