Merge pull request #5673
097cca5
wallet_api: catch getTxKey exception (ph4r05)
This commit is contained in:
commit
6b6593dad9
|
@ -1742,6 +1742,9 @@ std::string WalletImpl::getTxKey(const std::string &txid_str) const
|
||||||
|
|
||||||
crypto::secret_key tx_key;
|
crypto::secret_key tx_key;
|
||||||
std::vector<crypto::secret_key> additional_tx_keys;
|
std::vector<crypto::secret_key> additional_tx_keys;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
clearStatus();
|
||||||
if (m_wallet->get_tx_key(txid, tx_key, additional_tx_keys))
|
if (m_wallet->get_tx_key(txid, tx_key, additional_tx_keys))
|
||||||
{
|
{
|
||||||
clearStatus();
|
clearStatus();
|
||||||
|
@ -1757,6 +1760,12 @@ std::string WalletImpl::getTxKey(const std::string &txid_str) const
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
|
{
|
||||||
|
setStatusError(e.what());
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool WalletImpl::checkTxKey(const std::string &txid_str, std::string tx_key_str, const std::string &address_str, uint64_t &received, bool &in_pool, uint64_t &confirmations)
|
bool WalletImpl::checkTxKey(const std::string &txid_str, std::string tx_key_str, const std::string &address_str, uint64_t &received, bool &in_pool, uint64_t &confirmations)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue