mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 12:59:52 +00:00
Conflicts: lib/di.dart lib/src/screens/send/send_page.dart lib/src/screens/send/widgets/send_card.dart lib/utils/payment_request.dart res/values/strings_de.arb res/values/strings_en.arb res/values/strings_es.arb res/values/strings_fr.arb res/values/strings_hi.arb res/values/strings_hr.arb res/values/strings_it.arb res/values/strings_ja.arb res/values/strings_ko.arb res/values/strings_nl.arb res/values/strings_pl.arb res/values/strings_pt.arb res/values/strings_ru.arb res/values/strings_uk.arb res/values/strings_zh.arb
25 lines
No EOL
659 B
Dart
25 lines
No EOL
659 B
Dart
class PaymentRequest {
|
|
PaymentRequest(this.address, this.amount, this.note, {this.scheme});
|
|
|
|
factory PaymentRequest.fromUri(Uri uri) {
|
|
var address = "";
|
|
var amount = "";
|
|
var note = "";
|
|
var scheme = "";
|
|
|
|
if (uri != null) {
|
|
address = uri.path;
|
|
amount = uri.queryParameters['tx_amount'] ?? uri.queryParameters['amount'] ?? "";
|
|
note = uri.queryParameters['tx_description']
|
|
?? uri.queryParameters['message'] ?? "";
|
|
scheme = uri.scheme;
|
|
}
|
|
|
|
return PaymentRequest(address, amount, note, scheme: scheme);
|
|
}
|
|
|
|
final String address;
|
|
final String amount;
|
|
final String note;
|
|
final String scheme;
|
|
} |