mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Notify user when a different currency is scanned
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
class PaymentRequest {
|
||||
PaymentRequest(this.address, this.amount);
|
||||
PaymentRequest(this.address, this.amount, {this.scheme});
|
||||
|
||||
factory PaymentRequest.fromUri(Uri uri) {
|
||||
var address = "";
|
||||
var amount = "";
|
||||
var scheme = "";
|
||||
|
||||
if (uri != null) {
|
||||
address = uri.path;
|
||||
amount = uri.queryParameters['tx_amount'] ?? uri.queryParameters['amount'] ?? "";
|
||||
scheme = uri.scheme;
|
||||
}
|
||||
|
||||
return PaymentRequest(address, amount);
|
||||
return PaymentRequest(address, amount, scheme: scheme);
|
||||
}
|
||||
|
||||
final String address;
|
||||
final String amount;
|
||||
final String scheme;
|
||||
}
|
||||
Reference in New Issue
Block a user