[electrum] show a warning when a BIP21 URI sets a significant amount in the send tab
Summary:
This is to prevent users from accidentaly sending large amounts after clicking on a payment URI. The warning makes them aware that they should pay attention.
The XEC threshold serves as a fallback in case the user didn't enable fiat conversions in the application. It can be adjusted in the future if the exchange rate changes significantly.
Test Plan:
Does not trigger the warning:
ecash:qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme?amount=2999999.00
Triggers the warning if the fiat conversion is enabled:
ecash:qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme?amount=3500000.00
ecash:qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme?amount=2000000.00&addr=qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme&amount=1500000.00
Triggers the warning if the fiat conversion is disabled (after restarting the application to actually make the fiat conversion unavailable):
ecash:qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme?amount=3000000.00
ecash:qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme?amount=2000000.00&addr=qrh3ethkfms79tlcw7m736t38hp9kg5f7gycxeymme&amount=1000000.00
Reviewers: #bitcoin_abc, bytesofman
Reviewed By: #bitcoin_abc, bytesofman
Subscribers: bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D15396