badger-cash / badger

Your gateway to the world of Bitcoin Cash (BCH) apps
https://badger.bitcoin.com/
MIT License
63 stars 47 forks source link

Show proper error message when loading payment requests #207

Open monsterbitar opened 4 years ago

monsterbitar commented 4 years ago

What problem are you trying to solve? Badgers user interface is needlessly vague

Describe the solution you'd like Badger wallet should check for the the easy-to-verify parts in their error statement and have unique errors for those. When a payment is expired it should say expired - when a payment is already paid, it should say already paid.

When you don't know why the payment is invalid it should say invalid - but it should not say that it is expired or already paid.

Additional context When a payment request is loaded that doesn't contain the optional merchant data field, this line broke down and a generic error message was shown to the user:

https://github.com/Bitcoin-com/badger/blob/master/app/scripts/controllers/transactions/index.js#L178