mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-06 13:47:25 -04:00
Merge pull request #1768
02134c4 transfer: paste Payment URL to fill the payment form fields (xiphon)
This commit is contained in:
@@ -296,13 +296,37 @@ QString WalletManager::resolveOpenAlias(const QString &address) const
|
||||
res = std::string(dnssec_valid ? "true" : "false") + "|" + res;
|
||||
return QString::fromStdString(res);
|
||||
}
|
||||
bool WalletManager::parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error)
|
||||
bool WalletManager::parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error) const
|
||||
{
|
||||
if (m_currentWallet)
|
||||
return m_currentWallet->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error);
|
||||
return false;
|
||||
}
|
||||
|
||||
QVariantMap WalletManager::parse_uri_to_object(const QString &uri) const
|
||||
{
|
||||
QString address;
|
||||
QString payment_id;
|
||||
uint64_t amount;
|
||||
QString tx_description;
|
||||
QString recipient_name;
|
||||
QVector<QString> unknown_parameters;
|
||||
QString error;
|
||||
|
||||
QVariantMap result;
|
||||
if (this->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error)) {
|
||||
result.insert("address", address);
|
||||
result.insert("payment_id", payment_id);
|
||||
result.insert("amount", this->displayAmount(amount));
|
||||
result.insert("tx_description", tx_description);
|
||||
result.insert("recipient_name", recipient_name);
|
||||
} else {
|
||||
result.insert("error", error);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void WalletManager::setLogLevel(int logLevel)
|
||||
{
|
||||
Monero::WalletManagerFactory::setLogLevel(logLevel);
|
||||
|
||||
Reference in New Issue
Block a user