From f174a8f05fe966895557d23f571cf755852dcb7f Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 4 Jun 2021 15:24:53 +0200 Subject: wallet_api: reconnectDevice --- src/wallet/api/wallet.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/wallet/api/wallet.cpp') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index db3049f9e..00f6e92ca 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2576,6 +2576,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; -- cgit v1.2.3