|
|
@ -425,7 +425,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 120000000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola 1-1', |
|
|
|
message: 'hello 1-1', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -462,7 +462,7 @@ describe('client API ', function() { |
|
|
|
should.not.exist(err); |
|
|
|
clients[2].getTxProposals({}, function(err, txs) { |
|
|
|
should.not.exist(err); |
|
|
|
txs[0].decryptedMessage.should.equal('some message'); |
|
|
|
txs[0].message.should.equal('some message'); |
|
|
|
txs[0].actions[0].comment.should.equal('rejection comment'); |
|
|
|
done(); |
|
|
|
}); |
|
|
@ -523,7 +523,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola', |
|
|
|
message: 'hello', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -562,7 +562,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola', |
|
|
|
message: 'hello', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -601,7 +601,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola', |
|
|
|
message: 'hello', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -643,7 +643,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola 1-1', |
|
|
|
message: 'hello 1-1', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -670,7 +670,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola 1-1', |
|
|
|
message: 'hello 1-1', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -701,14 +701,14 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola 1-1', |
|
|
|
message: 'hello 1-1', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
|
x.status.should.equal('pending'); |
|
|
|
x.requiredRejections.should.equal(2); |
|
|
|
x.requiredSignatures.should.equal(2); |
|
|
|
clients[0].rejectTxProposal(x, 'no me gusto', function(err, tx) { |
|
|
|
clients[0].rejectTxProposal(x, 'wont sign', function(err, tx) { |
|
|
|
should.not.exist(err, err); |
|
|
|
tx.status.should.equal('pending'); |
|
|
|
clients[1].signTxProposal(x, function(err, tx) { |
|
|
@ -735,7 +735,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola 1-1', |
|
|
|
message: 'hello 1-1', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
@ -743,13 +743,13 @@ describe('client API ', function() { |
|
|
|
x.requiredRejections.should.equal(2); |
|
|
|
x.requiredSignatures.should.equal(3); |
|
|
|
|
|
|
|
clients[0].rejectTxProposal(x, 'no me gusto', function(err, tx) { |
|
|
|
clients[0].rejectTxProposal(x, 'wont sign', function(err, tx) { |
|
|
|
should.not.exist(err, err); |
|
|
|
tx.status.should.equal('pending'); |
|
|
|
clients[1].signTxProposal(x, function(err, tx) { |
|
|
|
should.not.exist(err); |
|
|
|
tx.status.should.equal('pending'); |
|
|
|
clients[2].rejectTxProposal(x, 'tampoco me gusto', function(err, tx) { |
|
|
|
clients[2].rejectTxProposal(x, 'me neither', function(err, tx) { |
|
|
|
should.not.exist(err); |
|
|
|
tx.status.should.equal('rejected'); |
|
|
|
done(); |
|
|
@ -770,7 +770,7 @@ describe('client API ', function() { |
|
|
|
var opts = { |
|
|
|
amount: 10000, |
|
|
|
toAddress: 'n2TBMPzPECGUfcT2EByiTJ12TPZkhN2mN5', |
|
|
|
message: 'hola 1-1', |
|
|
|
message: 'hello 1-1', |
|
|
|
}; |
|
|
|
clients[0].sendTxProposal(opts, function(err, x) { |
|
|
|
should.not.exist(err); |
|
|
|