mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Notify user when a different currency is scanned
This commit is contained in:
parent
7bccf46832
commit
e5fac16ef7
19 changed files with 69 additions and 37 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue