diff options
| author | Konstantin Ullrich <konstantinullrich12@gmail.com> | 2024-08-26 15:37:12 +0200 |
|---|---|---|
| committer | Konstantin Ullrich <konstantinullrich12@gmail.com> | 2024-08-26 15:37:12 +0200 |
| commit | 3bdf1a04cff5a03c11d233a4c72d7e093f95a1fe (patch) | |
| tree | 1da4dd192f00321a1e007adb164a306ace95e0fd | |
| parent | 35633848e26dcf8cdc928de8df31f14eb9ee918c (diff) | |
minor fix
| -rw-r--r-- | impls/monero.dart/lib/src/ledger.dart | 5 | ||||
| -rw-r--r-- | patches/monero/0015-add-dummy-device-for-ledger.patch | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/impls/monero.dart/lib/src/ledger.dart b/impls/monero.dart/lib/src/ledger.dart index b24bced..68cf2c1 100644 --- a/impls/monero.dart/lib/src/ledger.dart +++ b/impls/monero.dart/lib/src/ledger.dart @@ -23,7 +23,10 @@ void enableLedgerExchange( final response = await exchange(ledger, device, ledgerRequest); final Pointer<Uint8> result = malloc<Uint8>(response.length); - result.asTypedList(response.length).addAll(response); + for (var i = 0; i < response.length; i++) { + result.asTypedList(response.length)[i] = response[i]; + } + monero.Wallet_setDeviceReceivedData( ptr, result.cast<UnsignedChar>(), response.length); diff --git a/patches/monero/0015-add-dummy-device-for-ledger.patch b/patches/monero/0015-add-dummy-device-for-ledger.patch index 4f88774..3ab7b52 100644 --- a/patches/monero/0015-add-dummy-device-for-ledger.patch +++ b/patches/monero/0015-add-dummy-device-for-ledger.patch @@ -427,10 +427,10 @@ index 8bdd75a5a..d8661b213 100644 using namespace std; using namespace cryptonote; -@@ -3299,4 +3302,94 @@ uint64_t WalletImpl::getBytesSent() +@@ -3299,4 +3302,95 @@ uint64_t WalletImpl::getBytesSent() return m_wallet->get_bytes_sent(); } - + + +// HIDAPI_DUMMY +bool WalletImpl::getStateIsConnected() { @@ -502,6 +502,7 @@ index 8bdd75a5a..d8661b213 100644 + return; + #else + hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len)); ++ hw::io::device_io_dummy::receivedFromDeviceLength = len; + memset(hw::io::device_io_dummy::receivedFromDevice, 0, len); + memcpy(hw::io::device_io_dummy::receivedFromDevice, data, len); + hw::io::device_io_dummy::waitsForDeviceReceive = false; |
