HomePhabricator

[electrum] show a warning when a BIP21 URI sets a significant amount in the…

Description

[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

Details

Provenance
PiRKAuthored on Feb 6 2024, 11:14
PiRKPushed on Feb 7 2024, 07:43
Reviewer
Restricted Project
Differential Revision
D15396: [electrum] show a warning when a BIP21 URI sets a significant amount in the send tab
Parents
rABC28732c3a64df: [electrum] make get_merkle_root.py work on computers were Electrum ABC was…
Branches
Unknown
Tags
Unknown