mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-31 06:58:42 +01:00
v5.1.0 Release Candidate (#2332)
* v5.1.0 Release Candidate * update app versions [skip ci] * separate secrets for Monero.com [skip ci] * fix: amount getting wiped when pasting address * update Trocador Monero api key [skip ci] * move fiat api key to headers [skip ci] * latest Release candidate
This commit is contained in:
@@ -263,11 +263,17 @@ class AddressTextField<T extends Currency> extends StatelessWidget {
|
||||
final address = clipboard?.text ?? '';
|
||||
|
||||
if (address.isNotEmpty) {
|
||||
try {
|
||||
final uri = Uri.parse(address);
|
||||
controller?.text = uri.path;
|
||||
onURIScanned?.call(uri);
|
||||
} catch (_) {
|
||||
// if it has query parameters then it's a valid uri
|
||||
// added because Uri.parse(address) can parse a normal address string and would still be valid
|
||||
if (address.contains("=")) {
|
||||
try {
|
||||
final uri = Uri.parse(address);
|
||||
controller?.text = uri.path;
|
||||
onURIScanned?.call(uri);
|
||||
} catch (_) {
|
||||
controller?.text = address;
|
||||
}
|
||||
} else {
|
||||
controller?.text = address;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user