mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
WalletManager: parse_uri_to_object extra parameters support
This commit is contained in:
parent
c137a6ea36
commit
99907e539a
1 changed files with 16 additions and 2 deletions
|
@ -418,10 +418,24 @@ QVariantMap WalletManager::parse_uri_to_object(const QString &uri) const
|
||||||
result.insert("amount", amount > 0 ? displayAmount(amount) : "");
|
result.insert("amount", amount > 0 ? 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);
|
||||||
|
|
||||||
|
QVariantMap extra_parameters;
|
||||||
|
if (unknown_parameters.size() > 0)
|
||||||
|
{
|
||||||
|
for (const QString &item : unknown_parameters)
|
||||||
|
{
|
||||||
|
const auto parsed_item = item.splitRef("=");
|
||||||
|
if (parsed_item.size() == 2)
|
||||||
|
{
|
||||||
|
extra_parameters.insert(parsed_item[0].toString(), parsed_item[1].toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.insert("extra_parameters", extra_parameters);
|
||||||
} else {
|
} else {
|
||||||
result.insert("error", error);
|
result.insert("error", !error.isEmpty() ? error : tr("Unknown error"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue