feat: detect bitcoin/monero uri's#1097
Conversation
fix: use uri instead of manual parsing reformat: remove braces and use efficient variables refactor: add forgotten vars
|
Just squashed changes. |
julian-CStack
left a comment
There was a problem hiding this comment.
Would be better to handle all URIs for all coins. That is somewhat set up already here:
stack_wallet/lib/utilities/address_utils.dart
Line 133 in 5adfee8
That is already used in several places but mostly just for handling QR code reads such as here:
That
_scanQr() function can probably be refactored into two functions. One for the scanning and a second for handing the parsing of the content. That parsing function can then be used on paste as well.
Rather than attempting a full check and parse every time a character is typed it would be better to hook into the on paste event. See https://api.flutter.dev/flutter/material/TextField/contextMenuBuilder.html and https://api.flutter.dev/flutter/material/AdaptiveTextSelectionToolbar-class.html
Finally, this PR only applies to the standard mobile send screen when it should be consistent across all send forms where it would make sense to have this such as on desktop (and possibly some other places as well. Would need to look around the code to find out).
I think this |
|
Yup, I forgot about the contextMenuBuilder limitation/didn't register when looking it up. I guess It would still be good to do some kind of relatively inexpensive check in Everything else in my original comment (besides the |
|
Seperated the |
Closes #1069
Detects URI Schemes for Bitcoin and Monero and uses them.