Fix ledger issue (#114)
* Fix ledger issue (https://github.com/cake-tech/cake_wallet/issues/2007) * cleanup debug message
This commit is contained in:
@@ -105,6 +105,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
add_definitions(-DUSE_DEVICE_TREZOR=OFF)
|
||||
add_definitions(-DHIDAPI_DUMMY=ON)
|
||||
set(HIDAPI_DUMMY ON)
|
||||
SET(ANDROID TRUE)
|
||||
if(ARCHITECTURE STREQUAL "armv7a")
|
||||
SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
|
||||
@@ -132,6 +133,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
set(USE_DEVICE_TREZOR OFF)
|
||||
add_definitions(-DHIDAPI_DUMMY=ON)
|
||||
set(HIDAPI_DUMMY ON)
|
||||
add_definitions(-DUSE_DEVICE_LEDGER=ON)
|
||||
SET(CMAKE_C_COMPILER @CC@)
|
||||
SET(CMAKE_CXX_COMPILER @CXX@)
|
||||
else()
|
||||
|
||||
@@ -86,7 +86,7 @@ index e6cd358..777584c 100644
|
||||
device_registry::device_registry(){
|
||||
hw::core::register_all(registry);
|
||||
- #ifdef WITH_DEVICE_LEDGER
|
||||
+ #if defined(WITH_DEVICE_LEDGER) && !defined(HIDAPI_DUMMY)
|
||||
+ #if defined(WITH_DEVICE_LEDGER) || defined(HIDAPI_DUMMY)
|
||||
hw::ledger::register_all(registry);
|
||||
#endif
|
||||
atexit(clear_device_registry);
|
||||
@@ -102,7 +102,7 @@ index e6cd358..777584c 100644
|
||||
MERROR(" - " << sm_pair.first);
|
||||
}
|
||||
- throw std::runtime_error("device not found: " + device_descriptor);
|
||||
+ throw std::runtime_error("device not found: " + device_descriptor + "\nlalala\n" + ss.str());
|
||||
+ throw std::runtime_error("device not found: " + device_descriptor + "\n" + ss.str());
|
||||
}
|
||||
return *device->second;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ index e6cd358b6..777584c01 100644
|
||||
device_registry::device_registry(){
|
||||
hw::core::register_all(registry);
|
||||
- #ifdef WITH_DEVICE_LEDGER
|
||||
+ #if defined(WITH_DEVICE_LEDGER) && !defined(HIDAPI_DUMMY)
|
||||
+ #if defined(WITH_DEVICE_LEDGER) || defined(HIDAPI_DUMMY)
|
||||
hw::ledger::register_all(registry);
|
||||
#endif
|
||||
atexit(clear_device_registry);
|
||||
@@ -102,7 +102,7 @@ index e6cd358b6..777584c01 100644
|
||||
MERROR(" - " << sm_pair.first);
|
||||
}
|
||||
- throw std::runtime_error("device not found: " + device_descriptor);
|
||||
+ throw std::runtime_error("device not found: " + device_descriptor + "\nlalala\n" + ss.str());
|
||||
+ throw std::runtime_error("device not found: " + device_descriptor + "\n" + ss.str());
|
||||
}
|
||||
return *device->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user