bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

PayPro not working in 0.6.2

Open tonygallippi opened this issue 12 years ago • 8 comments

testing against production BitPay invoices at

https://bitpay.com/demos

when pasting the full BIP72 or BIP73 string into Copay's Send Address field, Copay fetches the signature, then does nothing except put a green check in the address box.

I should add that on the BIP72 string it doesn't parse off the amount. it just keeps the whole string in the address box.

BIP72 string screen shot 2014-09-29 at 8 34 57 pm

BIP73 string screen shot 2014-09-29 at 12 17 02 pm

tonygallippi avatar Sep 30 '14 00:09 tonygallippi

I'll investigate. I guess the question is, who introduced new code that affected this and what is it exactly. It was working when it was released and hasn't been touched since.

chjj avatar Sep 30 '14 00:09 chjj

cc @matiu @maraoz, any idea what would have caused this regression?

chjj avatar Sep 30 '14 00:09 chjj

I have never tested this case, only 'bitcoin:*' URIs generated by test.bitpay.com.

@chjj can you provide a commit in which this was working, so we can check?

On Monday, September 29, 2014, Christopher Jeffrey (JJ) < [email protected]> wrote:

cc @matiu https://github.com/matiu @maraoz https://github.com/maraoz, any idea what would have caused this regression?

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore/issues/518#issuecomment-57252699.

matiu avatar Sep 30 '14 11:09 matiu

@matiu, I'm investigating this as we speak. I'll let you know when I have something. The last commit it was working would have been my last commit on my branch that was eventually pulled.

chjj avatar Sep 30 '14 17:09 chjj

The UI is working for me. The only thing I can think of is fetchPaymentTx is not returning fast enough. Maybe we could add some kind of loading dialog, or lock down the inputs as it's waiting for the callback to be executed. It could also be bad error handling. I'll play around with it some more.

chjj avatar Sep 30 '14 17:09 chjj

Just a note: This is after a fresh pull, npm install, bower install, and grunt call.

chjj avatar Sep 30 '14 17:09 chjj

Okay, I seem to run into this problem every once in a while (maybe a fifth of the time). Very odd. fetchPaymentTx just isn't having it's callback executed. I can add a timeout for fetchPaymentTx's callback I suppose.

chjj avatar Sep 30 '14 18:09 chjj

Okay, I've come up with an idea of why this might be happening: the address input is not locked while fetching the payment request. This could cause another called to $scope.onChanged and mess things up a bit. I've added a $scope.loading = true before fetchPaymentTx. I've also added a 10 second timeout for payment servers. The form will reset if the server takes more than 10 seconds to respond.

I was only able to reproduce this UI error a handful of times, but after adding the $scope.loading change, I didn't see this error at all. Let me know if you guys still have trouble with this. I'll be opening a pull request.

chjj avatar Sep 30 '14 18:09 chjj