diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-11-09 22:53:47 -0600 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-11-09 22:53:47 -0600 |
commit | 97ff1938a315e861dd99d7c30cac0dc4dd7160b2 (patch) | |
tree | 1898ee4b81e3d876dd3bcce2e754d369aa68a504 | |
parent | Merge pull request #8031 (diff) | |
parent | device: fix ledger error strings, add human friendly messages (diff) | |
download | monero-97ff1938a315e861dd99d7c30cac0dc4dd7160b2.tar.xz |
Merge pull request #8038
fbe8358 device: fix ledger error strings, add human friendly messages (selsta)
-rw-r--r-- | src/device/device_ledger.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index 5caad3a1a..ebad740cd 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -451,13 +451,6 @@ namespace hw { ASSERT_X(this->length_recv>=3, "Communication error, less than three bytes received. Check your application version."); - unsigned int device_version = 0; - device_version = VERSION(this->buffer_recv[0], this->buffer_recv[1], this->buffer_recv[2]); - - ASSERT_X (device_version >= MINIMAL_APP_VERSION, - "Unsupported device application version: " << VERSION_MAJOR(device_version)<<"."<<VERSION_MINOR(device_version)<<"."<<VERSION_MICRO(device_version) << - " At least " << MINIMAL_APP_VERSION_MAJOR<<"."<<MINIMAL_APP_VERSION_MINOR<<"."<<MINIMAL_APP_VERSION_MICRO<<" is required."); - return true; } @@ -470,6 +463,9 @@ namespace hw { this->length_recv -= 2; this->sw = (this->buffer_recv[length_recv]<<8) | this->buffer_recv[length_recv+1]; logRESP(); + MDEBUG("Device "<< this->id << " exchange: sw: " << this->sw << " expected: " << ok); + ASSERT_X(sw != SW_CLIENT_NOT_SUPPORTED, "Monero Ledger App doesn't support current monero version. Try to update the Monero Ledger App, at least " << MINIMAL_APP_VERSION_MAJOR<< "." << MINIMAL_APP_VERSION_MINOR << "." << MINIMAL_APP_VERSION_MICRO << " is required."); + ASSERT_X(sw != SW_PROTOCOL_NOT_SUPPORTED, "Make sure no other program is communicating with the Ledger."); ASSERT_SW(this->sw,ok,msk); return this->sw; |