mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 17:57:36 +00:00
18 lines
398 B
Dart
18 lines
398 B
Dart
|
class PaymentRequest {
|
||
|
PaymentRequest(this.address, this.amount);
|
||
|
|
||
|
factory PaymentRequest.fromUri(Uri uri) {
|
||
|
var address = "";
|
||
|
var amount = "";
|
||
|
|
||
|
if (uri != null) {
|
||
|
address = uri.path;
|
||
|
amount = uri.queryParameters['tx_amount'] ?? uri.queryParameters['amount'] ?? "";
|
||
|
}
|
||
|
|
||
|
return PaymentRequest(address, amount);
|
||
|
}
|
||
|
|
||
|
final String address;
|
||
|
final String amount;
|
||
|
}
|