mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
wallet_api: catch getTxKey exception
- getTxKey method throws an exception, e.g., when user declines txKey export
This commit is contained in:
parent
6335509727
commit
097cca59c1
1 changed files with 17 additions and 8 deletions
|
@ -1729,6 +1729,9 @@ std::string WalletImpl::getTxKey(const std::string &txid_str) const
|
|||
|
||||
crypto::secret_key tx_key;
|
||||
std::vector<crypto::secret_key> additional_tx_keys;
|
||||
try
|
||||
{
|
||||
clearStatus();
|
||||
if (m_wallet->get_tx_key(txid, tx_key, additional_tx_keys))
|
||||
{
|
||||
clearStatus();
|
||||
|
@ -1744,6 +1747,12 @@ std::string WalletImpl::getTxKey(const std::string &txid_str) const
|
|||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue