mirror of https://github.com/BTCPrivate/copay.git
paypro: remove logs from tests. see #1043.
This commit is contained in:
parent
bd24f51da4
commit
5f20b09b0b
|
@ -675,17 +675,11 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
if (w.totalCopayers > 1) {
|
if (w.totalCopayers > 1) {
|
||||||
console.log('Sent TX proposal to other copayers:');
|
|
||||||
console.log([ntxid, merchantData]);
|
|
||||||
return done();
|
return done();
|
||||||
} else {
|
} else {
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
w.sendPaymentTx(ntxid, { memo: memo }, function(txid, merchantData) {
|
w.sendPaymentTx(ntxid, { memo: memo }, function(txid, merchantData) {
|
||||||
should.exist(txid);
|
should.exist(txid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
console.log('TX sent:');
|
|
||||||
console.log([ntxid, merchantData]);
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -710,18 +704,12 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
if (w.totalCopayers > 1) {
|
if (w.totalCopayers > 1) {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
console.log('Sent TX proposal to other copayers:');
|
|
||||||
console.log([ntxid, merchantData]);
|
|
||||||
return done();
|
return done();
|
||||||
} else {
|
} else {
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
w.sendTx(ntxid, function(txid, merchantData) {
|
w.sendTx(ntxid, function(txid, merchantData) {
|
||||||
should.exist(txid);
|
should.exist(txid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
console.log('TX sent:');
|
|
||||||
console.log([ntxid, merchantData]);
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -737,17 +725,11 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
if (w.totalCopayers > 1) {
|
if (w.totalCopayers > 1) {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
console.log('Sent TX proposal to other copayers:');
|
|
||||||
console.log([ntxid, merchantData]);
|
|
||||||
return done();
|
return done();
|
||||||
} else {
|
} else {
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
w.sendTx(ntxid, function(txid, merchantData) {
|
w.sendTx(ntxid, function(txid, merchantData) {
|
||||||
should.exist(txid);
|
should.exist(txid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
console.log('TX sent:');
|
|
||||||
console.log([ntxid, merchantData]);
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -763,9 +745,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
|
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
|
|
||||||
// Tamper with payment request in its raw form:
|
// Tamper with payment request in its raw form:
|
||||||
var data = new Buffer(merchantData.raw, 'hex');
|
var data = new Buffer(merchantData.raw, 'hex');
|
||||||
data = PayPro.PaymentRequest.decode(data);
|
data = PayPro.PaymentRequest.decode(data);
|
||||||
|
@ -789,7 +768,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
|
|
||||||
w.verifyPaymentRequest(ntxid).should.equal(false);
|
w.verifyPaymentRequest(ntxid).should.equal(false);
|
||||||
|
|
||||||
console.log('TX not verified.');
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -803,9 +781,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
|
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
|
|
||||||
// Tamper with payment request in its abstract form:
|
// Tamper with payment request in its abstract form:
|
||||||
var outputs = merchantData.pr.pd.outputs;
|
var outputs = merchantData.pr.pd.outputs;
|
||||||
var output = outputs[outputs.length - 1];
|
var output = outputs[outputs.length - 1];
|
||||||
|
@ -820,7 +795,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
|
|
||||||
w.verifyPaymentRequest(ntxid).should.equal(false);
|
w.verifyPaymentRequest(ntxid).should.equal(false);
|
||||||
|
|
||||||
console.log('TX not verified.');
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -834,9 +808,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
|
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
|
|
||||||
// Tamper with payment request in its abstract form:
|
// Tamper with payment request in its abstract form:
|
||||||
var txp = w.txProposals.txps[ntxid];
|
var txp = w.txProposals.txps[ntxid];
|
||||||
var tx = txp.builder.tx || txp.builder.build();
|
var tx = txp.builder.tx || txp.builder.build();
|
||||||
|
@ -850,7 +821,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
|
|
||||||
w.verifyPaymentRequest(ntxid).should.equal(false);
|
w.verifyPaymentRequest(ntxid).should.equal(false);
|
||||||
|
|
||||||
console.log('TX not verified.');
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -864,9 +834,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
should.exist(ntxid);
|
should.exist(ntxid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
|
|
||||||
console.log('Sending TX to merchant server:');
|
|
||||||
console.log(ntxid);
|
|
||||||
|
|
||||||
var myId = w.getMyCopayerId();
|
var myId = w.getMyCopayerId();
|
||||||
var txp = w.txProposals.txps[ntxid];
|
var txp = w.txProposals.txps[ntxid];
|
||||||
should.exist(txp);
|
should.exist(txp);
|
||||||
|
@ -875,7 +842,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
|
|
||||||
w.verifyPaymentRequest(ntxid).should.equal(true);
|
w.verifyPaymentRequest(ntxid).should.equal(true);
|
||||||
|
|
||||||
console.log('PR verfied successfully.');
|
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue