mirror of https://github.com/BTCPrivate/copay.git
put logs back in wallet model for payment protocol
This reverts commit e79d86d90625375e22ac2cbafb2c1f894a450bcf.
This commit is contained in:
parent
0a8d734e49
commit
bd24f51da4
|
@ -952,6 +952,11 @@ Wallet.prototype.receivePaymentRequest = function(options, pr, cb) {
|
|||
self.emit('txProposalsUpdated');
|
||||
}
|
||||
|
||||
self.log('You are currently on this BTC network:');
|
||||
self.log(network);
|
||||
self.log('The server sent you a message:');
|
||||
self.log(memo);
|
||||
|
||||
return cb(ntxid, merchantData);
|
||||
});
|
||||
};
|
||||
|
@ -1027,6 +1032,9 @@ Wallet.prototype.sendPaymentTx = function(ntxid, options, cb) {
|
|||
|
||||
pay = pay.serialize();
|
||||
|
||||
this.log('Sending Payment Message:');
|
||||
this.log(pay.toString('hex'));
|
||||
|
||||
var buf = new ArrayBuffer(pay.length);
|
||||
var view = new Uint8Array(buf);
|
||||
for (var i = 0; i < pay.length; i++) {
|
||||
|
@ -1067,6 +1075,9 @@ Wallet.prototype.receivePaymentRequestACK = function(tx, txp, ack, cb) {
|
|||
var payment = ack.get('payment');
|
||||
var memo = ack.get('memo');
|
||||
|
||||
this.log('Our payment was acknowledged!');
|
||||
this.log('Message from Merchant: %s', memo);
|
||||
|
||||
payment = PayPro.Payment.decode(payment);
|
||||
var pay = new PayPro();
|
||||
payment = pay.makePayment(payment);
|
||||
|
@ -1169,6 +1180,11 @@ Wallet.prototype.createPaymentTxSync = function(options, merchantData, unspent)
|
|||
|
||||
if (options.fetch) return;
|
||||
|
||||
this.log('');
|
||||
this.log('Created transaction:');
|
||||
this.log(b.tx.getStandardizedObject());
|
||||
this.log('');
|
||||
|
||||
var myId = this.getMyCopayerId();
|
||||
var now = Date.now();
|
||||
|
||||
|
|
Loading…
Reference in New Issue