diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-06-24 14:05:35 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-06-24 14:05:35 -0500 |
commit | 7c3629a5eeb5bdde784290102878e199fabe1dcf (patch) | |
tree | beb8bc54ec72241ea5e625b98aa1c004a21496eb /src/wallet/api/wallet.cpp | |
parent | Merge pull request #7739 (diff) | |
parent | wallet_api: reconnectDevice (diff) | |
download | monero-7c3629a5eeb5bdde784290102878e199fabe1dcf.tar.xz |
Merge pull request #7742
f174a8f wallet_api: reconnectDevice (tobtoht)
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r-- | src/wallet/api/wallet.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 6a96d3db3..31d772457 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2571,6 +2571,23 @@ void WalletImpl::deviceShowAddress(uint32_t accountIndex, uint32_t addressIndex, m_wallet->device_show_address(accountIndex, addressIndex, payment_id_param); } + +bool WalletImpl::reconnectDevice() +{ + clearStatus(); + + bool r; + try { + r = m_wallet->reconnect_device(); + } + catch (const std::exception &e) { + LOG_ERROR(__FUNCTION__ << " error: " << e.what()); + setStatusError(e.what()); + return false; + } + + return r; +} } // namespace namespace Bitmonero = Monero; |