mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 11:52:05 +02:00
WalletManager: fix handling Payment URLs with empty amount
This commit is contained in:
parent
36eb1f80e1
commit
c963facc8c
@ -307,7 +307,7 @@ QVariantMap WalletManager::parse_uri_to_object(const QString &uri) const
|
|||||||
{
|
{
|
||||||
QString address;
|
QString address;
|
||||||
QString payment_id;
|
QString payment_id;
|
||||||
uint64_t amount;
|
uint64_t amount = 0;
|
||||||
QString tx_description;
|
QString tx_description;
|
||||||
QString recipient_name;
|
QString recipient_name;
|
||||||
QVector<QString> unknown_parameters;
|
QVector<QString> unknown_parameters;
|
||||||
@ -317,7 +317,7 @@ QVariantMap WalletManager::parse_uri_to_object(const QString &uri) const
|
|||||||
if (this->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error)) {
|
if (this->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error)) {
|
||||||
result.insert("address", address);
|
result.insert("address", address);
|
||||||
result.insert("payment_id", payment_id);
|
result.insert("payment_id", payment_id);
|
||||||
result.insert("amount", this->displayAmount(amount));
|
result.insert("amount", amount > 0 ? this->displayAmount(amount) : "");
|
||||||
result.insert("tx_description", tx_description);
|
result.insert("tx_description", tx_description);
|
||||||
result.insert("recipient_name", recipient_name);
|
result.insert("recipient_name", recipient_name);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user