Browse Source

Merge pull request #434 from troggy/history-custom-data

Return tx customData wth txHistory
activeAddress
Ivan Socolsky 9 years ago
parent
commit
ec9a6cde9b
  1. 1
      lib/server.js
  2. 5
      test/integration/server.js

1
lib/server.js

@ -2198,6 +2198,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
var txpOut = _.find(proposal.outputs, query);
output.message = txpOut ? txpOut.message : null;
});
newTx.customData = proposal.customData;
// newTx.sentTs = proposal.sentTs;
// newTx.merchant = proposal.merchant;
//newTx.paymentAckMemo = proposal.paymentAckMemo;

5
test/integration/server.js

@ -4651,7 +4651,8 @@ describe('Wallet service', function() {
message: 'message #2'
}];
var txOpts = helpers.createProposalOpts(Model.TxProposalLegacy.Types.MULTIPLEOUTPUTS, outputs, TestData.copayers[0].privKey_1H_0, {
message: 'some message'
message: 'some message',
customData: { "test": true }
});
server.createTxLegacy(txOpts, function(err, tx) {
should.not.exist(err);
@ -4713,6 +4714,8 @@ describe('Wallet service', function() {
tx.outputs[1].amount.should.equal(helpers.toSatoshi(30));
should.exist(tx.outputs[1].message);
tx.outputs[1].message.should.equal('message #2');
should.exist(tx.customData);
should.exist(tx.customData["test"]);
done();
});
});

Loading…
Cancel
Save