cw-60: fill amount on scan qr on exchange page (#309)

* cw-60: fill amount on scan qr on exchange page
This commit is contained in:
clear 2022-03-31 19:54:45 +02:00 committed by GitHub
parent 1cd90cf57d
commit 5890df86db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 92 additions and 42 deletions

View file

@ -0,0 +1,18 @@
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;
}