mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-27 06:18:50 +01:00
add note decryption from QR code (#466)
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
class PaymentRequest {
|
||||
PaymentRequest(this.address, this.amount);
|
||||
PaymentRequest(this.address, this.amount, this.note);
|
||||
|
||||
factory PaymentRequest.fromUri(Uri uri) {
|
||||
var address = "";
|
||||
var amount = "";
|
||||
var note = "";
|
||||
|
||||
if (uri != null) {
|
||||
address = uri.path;
|
||||
amount = uri.queryParameters['tx_amount'] ?? uri.queryParameters['amount'] ?? "";
|
||||
note = uri.queryParameters['tx_description']
|
||||
?? uri.queryParameters['message'] ?? "";
|
||||
}
|
||||
|
||||
return PaymentRequest(address, amount);
|
||||
return PaymentRequest(address, amount, note);
|
||||
}
|
||||
|
||||
final String address;
|
||||
final String amount;
|
||||
final String note;
|
||||
}
|
||||
Reference in New Issue
Block a user