summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patches/monero/0021-trezor-import-export-sign-functions.patch54
1 files changed, 51 insertions, 3 deletions
diff --git a/patches/monero/0021-trezor-import-export-sign-functions.patch b/patches/monero/0021-trezor-import-export-sign-functions.patch
index b990692..8f89f01 100644
--- a/patches/monero/0021-trezor-import-export-sign-functions.patch
+++ b/patches/monero/0021-trezor-import-export-sign-functions.patch
@@ -1,9 +1,10 @@
-From 7c128c7a2392419a9d5c6fd3b27ad982586aba64 Mon Sep 17 00:00:00 2001
+From b0fb84c69bba4cc6ffdd7c401a804c2d73089043 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 13 May 2026 11:35:01 -0400
Subject: [PATCH] trezor import/export/sign functions
---
+ cmake/CheckTrezor.cmake | 28 +--
src/device_trezor/trezor/protocol.cpp | 220 ++++++++++++++++++++++++
src/device_trezor/trezor/protocol.hpp | 8 +
src/wallet/api/pending_transaction.cpp | 60 +++++++
@@ -14,8 +15,55 @@ Subject: [PATCH] trezor import/export/sign functions
src/wallet/api/wallet2_api.h | 14 ++
src/wallet/wallet2.cpp | 158 +++++++++++++++++
src/wallet/wallet2.h | 5 +-
- 10 files changed, 499 insertions(+), 2 deletions(-)
+ 11 files changed, 500 insertions(+), 29 deletions(-)
+diff --git a/cmake/CheckTrezor.cmake b/cmake/CheckTrezor.cmake
+index 4fae15fad..57e3d4866 100644
+--- a/cmake/CheckTrezor.cmake
++++ b/cmake/CheckTrezor.cmake
+@@ -40,9 +40,6 @@ if (USE_DEVICE_TREZOR)
+ # Protobuf handling the cache variables set in docker.
+ if(NOT Protobuf_FOUND AND NOT Protobuf_LIBRARY AND NOT Protobuf_PROTOC_EXECUTABLE AND NOT Protobuf_INCLUDE_DIR)
+ message(STATUS "Could not find Protobuf")
+- elseif(NOT Protobuf_LIBRARY OR NOT EXISTS "${Protobuf_LIBRARY}")
+- message(STATUS "Protobuf library not found: ${Protobuf_LIBRARY}")
+- unset(Protobuf_FOUND)
+ elseif(NOT Protobuf_PROTOC_EXECUTABLE OR NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
+ message(STATUS "Protobuf executable not found: ${Protobuf_PROTOC_EXECUTABLE}")
+ unset(Protobuf_FOUND)
+@@ -93,31 +90,8 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
+ endif()
+ endif()
+
+-# Protobuf compilation test
+-if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
+- execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_CURRENT_LIST_DIR}" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
+- if(RET)
+- message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
+- endif()
+-
+- try_compile(Protobuf_COMPILE_TEST_PASSED
+- "${CMAKE_BINARY_DIR}"
+- SOURCES
+- "${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
+- "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
+- CMAKE_FLAGS
+- "-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
+- "-DCMAKE_CXX_STANDARD=11"
+- LINK_LIBRARIES ${Protobuf_LIBRARY}
+- OUTPUT_VARIABLE OUTPUT
+- )
+- if(NOT Protobuf_COMPILE_TEST_PASSED)
+- message(STATUS "Protobuf Compilation test failed: ${OUTPUT}.")
+- endif()
+-endif()
+-
+ # Try to build protobuf messages
+-if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED)
++if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
+ set(ENV{PROTOBUF_INCLUDE_DIRS} "${Protobuf_INCLUDE_DIR}")
+ set(ENV{PROTOBUF_PROTOC_EXECUTABLE} "${Protobuf_PROTOC_EXECUTABLE}")
+ set(TREZOR_PROTOBUF_PARAMS "")
diff --git a/src/device_trezor/trezor/protocol.cpp b/src/device_trezor/trezor/protocol.cpp
index 0e59a16ba..afd1498d2 100644
--- a/src/device_trezor/trezor/protocol.cpp
@@ -693,5 +741,5 @@ index 37a2447d2..a1ca49e90 100644
bool daemon_requires_payment();
bool make_rpc_payment(uint32_t nonce, uint32_t cookie, uint64_t &credits, uint64_t &balance);
--
-2.50.1 (Apple Git-155)
+2.51.0