summaryrefslogtreecommitdiff
path: root/patches/monero
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-11-28 08:38:54 -0500
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-11-28 08:38:54 -0500
commitfffd22288aa9384add744a04251f68ec65124980 (patch)
treec8b5eca9a46d6ddc7dc2300dc7515d50b55d7e35 /patches/monero
parent1f82aad70dcd876d5321cf5fcd823ce0230289b5 (diff)
Cleanup patches
Diffstat (limited to 'patches/monero')
-rw-r--r--patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch46
-rw-r--r--patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch10
-rw-r--r--patches/monero/0003-store-crash-fix.patch22
-rw-r--r--patches/monero/0004-Update-android-ndk.patch153
-rw-r--r--patches/monero/0004-uint64_t-missing-definition-fix.patch (renamed from patches/monero/0005-uint64_t-missing-definition-fix.patch)8
-rw-r--r--patches/monero/0005-use-proper-error-handling-in-get_seed.patch (renamed from patches/monero/0006-use-proper-error-handling-in-get_seed.patch)10
-rw-r--r--patches/monero/0006-UR-functions.patch (renamed from patches/monero/0007-UR-functions.patch)75
-rw-r--r--patches/monero/0007-add-dummy-device-for-ledger.patch (renamed from patches/monero/0008-add-dummy-device-for-ledger.patch)120
-rw-r--r--patches/monero/0008-polyseed.patch (renamed from patches/monero/0009-polyseed.patch)311
-rw-r--r--patches/monero/0009-coin-control.patch (renamed from patches/monero/0010-coin-control.patch)46
-rw-r--r--patches/monero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch (renamed from patches/monero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch)12
-rw-r--r--patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch (renamed from patches/monero/0012-Add-recoverDeterministicWalletFromSpendKey.patch)16
-rw-r--r--patches/monero/0012-add-monero-submodule-support.patch (renamed from patches/monero/0013-add-monero-submodule-support.patch)12
-rw-r--r--patches/monero/0013-fix-iOS-depends-build.patch (renamed from patches/monero/0014-fix-iOS-depends-build.patch)6
-rw-r--r--patches/monero/0014-include-locale-only-when-targeting-WIN32.patch12
-rw-r--r--patches/monero/0015-ledger-dummy-fix.patch157
-rw-r--r--patches/monero/0020-catch-exception-in-queryWalletDevice.patch35
17 files changed, 258 insertions, 793 deletions
diff --git a/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch b/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch
index 302e5ac..849c8be 100644
--- a/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch
+++ b/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch
@@ -1,7 +1,7 @@
-From 66e6b4d40e9d7a927b0697bb66d387d18ad9ef0a Mon Sep 17 00:00:00 2001
+From 0efd53a750d0827a500b036dc30ab190689e7e13 Mon Sep 17 00:00:00 2001
From: j-berman <justinberman@protonmail.com>
Date: Thu, 13 Oct 2022 18:33:33 -0700
-Subject: [PATCH 01/12] wallet: background sync with just the view key
+Subject: [PATCH 01/14] wallet: background sync with just the view key
- When background syncing, the wallet wipes the spend key
from memory and processes all new transactions. The wallet saves
@@ -50,7 +50,7 @@ cache.
20 files changed, 2337 insertions(+), 130 deletions(-)
diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
-index 2ac455fda..4e87d4477 100644
+index 2ac455f..4e87d44 100644
--- a/src/cryptonote_basic/account.cpp
+++ b/src/cryptonote_basic/account.cpp
@@ -152,6 +152,17 @@ DISABLE_VS_WARNINGS(4244 4345)
@@ -72,7 +72,7 @@ index 2ac455fda..4e87d4477 100644
{
crypto::secret_key first = generate_keys(m_keys.m_account_address.m_spend_public_key, m_keys.m_spend_secret_key, recovery_key, recover);
diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h
-index 2ee9545d4..93d1d28f0 100644
+index 2ee9545..93d1d28 100644
--- a/src/cryptonote_basic/account.h
+++ b/src/cryptonote_basic/account.h
@@ -95,6 +95,7 @@ namespace cryptonote
@@ -84,7 +84,7 @@ index 2ee9545d4..93d1d28f0 100644
void encrypt_keys(const crypto::chacha_key &key) { m_keys.encrypt(key); }
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h
-index 61146a114..f9e6a6cb9 100644
+index 61146a1..f9e6a6c 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
@@ -241,6 +241,8 @@ namespace config
@@ -97,7 +97,7 @@ index 61146a114..f9e6a6cb9 100644
const unsigned char HASH_KEY_MEMORY = 'k';
const unsigned char HASH_KEY_MULTISIG[] = {'M', 'u', 'l', 't' , 'i', 's', 'i', 'g', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index b9e30f9d9..2c51337ef 100644
+index b9e30f9..2c51337 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -155,6 +155,17 @@ typedef cryptonote::simple_wallet sw;
@@ -721,7 +721,7 @@ index b9e30f9d9..2c51337ef 100644
{
PRINT_USAGE(USAGE_IMPORT_OUTPUTS);
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
-index 652708f5a..159da2c45 100644
+index 652708f..159da2c 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -147,6 +147,7 @@ namespace cryptonote
@@ -733,7 +733,7 @@ index 652708f5a..159da2c45 100644
bool set_inactivity_lock_timeout(const std::vector<std::string> &args = std::vector<std::string>());
bool set_setup_background_mining(const std::vector<std::string> &args = std::vector<std::string>());
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index fc4f89128..e9f76f4cf 100644
+index fc4f891..e9f76f4 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -54,6 +54,40 @@ using namespace cryptonote;
@@ -1198,7 +1198,7 @@ index fc4f89128..e9f76f4cf 100644
setStatusError(tr("Rescan spent can only be used with a trusted daemon"));
return false;
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index ec2d7e9b3..1f199a72c 100644
+index ec2d7e9..1f199a7 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -171,6 +171,13 @@ public:
@@ -1235,7 +1235,7 @@ index ec2d7e9b3..1f199a72c 100644
std::unique_ptr<TransactionHistoryImpl> m_history;
std::unique_ptr<Wallet2CallbackImpl> m_wallet2Callback;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 71991df0d..e349df176 100644
+index 71991df..e349df1 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -445,6 +445,12 @@ struct Wallet
@@ -1295,7 +1295,7 @@ index 71991df0d..e349df176 100644
virtual AddressBook * addressBook() = 0;
virtual Subaddress * subaddress() = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index ad8c36190..8146014d6 100644
+index ad8c361..8146014 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -157,6 +157,8 @@ static const std::string MULTISIG_SIGNATURE_MAGIC = "SigMultisigPkV1";
@@ -2739,7 +2739,7 @@ index ad8c36190..8146014d6 100644
{
payment_container payments;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 24366f630..b1dc4f716 100644
+index 24366f6..b1dc4f7 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -256,6 +256,20 @@ private:
@@ -3049,7 +3049,7 @@ index 24366f630..b1dc4f716 100644
}
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h
-index c077313d4..c54cd3499 100644
+index c077313..c54cd34 100644
--- a/src/wallet/wallet_errors.h
+++ b/src/wallet/wallet_errors.h
@@ -63,6 +63,7 @@ namespace tools
@@ -3120,7 +3120,7 @@ index c077313d4..c54cd3499 100644
#if !defined(_MSC_VER)
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index b1419949f..d24b4c563 100644
+index b141994..d24b4c5 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -73,6 +73,54 @@ using namespace epee;
@@ -3566,7 +3566,7 @@ index b1419949f..d24b4c563 100644
try
{
diff --git a/src/wallet/wallet_rpc_server.h b/src/wallet/wallet_rpc_server.h
-index 3308d1751..c2329aafe 100644
+index 3308d17..c2329aa 100644
--- a/src/wallet/wallet_rpc_server.h
+++ b/src/wallet/wallet_rpc_server.h
@@ -160,6 +160,9 @@ namespace tools
@@ -3590,7 +3590,7 @@ index 3308d1751..c2329aafe 100644
//json rpc v2
bool on_query_key(const wallet_rpc::COMMAND_RPC_QUERY_KEY::request& req, wallet_rpc::COMMAND_RPC_QUERY_KEY::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
-index b6098d95c..a44b56ed6 100644
+index b6098d9..a44b56e 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -2696,5 +2696,69 @@ namespace wallet_rpc
@@ -3664,7 +3664,7 @@ index b6098d95c..a44b56ed6 100644
}
}
diff --git a/src/wallet/wallet_rpc_server_error_codes.h b/src/wallet/wallet_rpc_server_error_codes.h
-index 541d29f86..4756c191c 100644
+index 541d29f..4756c19 100644
--- a/src/wallet/wallet_rpc_server_error_codes.h
+++ b/src/wallet/wallet_rpc_server_error_codes.h
@@ -81,3 +81,5 @@
@@ -3674,7 +3674,7 @@ index 541d29f86..4756c191c 100644
+#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_WALLET -51
+#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_SYNCING -52
diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py
-index 4063911f4..60eb09a10 100755
+index 4063911..60eb09a 100755
--- a/tests/functional_tests/transfer.py
+++ b/tests/functional_tests/transfer.py
@@ -30,6 +30,7 @@
@@ -4112,7 +4112,7 @@ index 4063911f4..60eb09a10 100755
if __name__ == '__main__':
TransferTest().run_test()
diff --git a/tests/functional_tests/util_resources.py b/tests/functional_tests/util_resources.py
-index e030312da..3ca6fdb86 100755
+index e030312..3ca6fdb 100755
--- a/tests/functional_tests/util_resources.py
+++ b/tests/functional_tests/util_resources.py
@@ -37,6 +37,8 @@
@@ -4152,7 +4152,7 @@ index e030312da..3ca6fdb86 100755
+ assert WALLET_DIRECTORY != ''
+ return os.path.isfile(WALLET_DIRECTORY + '/' + name)
diff --git a/tests/functional_tests/wallet.py b/tests/functional_tests/wallet.py
-index 1ad05c98f..8182cecb2 100755
+index 1ad05c9..8182cec 100755
--- a/tests/functional_tests/wallet.py
+++ b/tests/functional_tests/wallet.py
@@ -34,8 +34,7 @@
@@ -4243,7 +4243,7 @@ index 1ad05c98f..8182cecb2 100755
if __name__ == '__main__':
diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp
-index ef6964f9e..25121a02e 100644
+index ef6964f..25121a0 100644
--- a/tests/unit_tests/wipeable_string.cpp
+++ b/tests/unit_tests/wipeable_string.cpp
@@ -211,3 +211,15 @@ TEST(wipeable_string, to_hex)
@@ -4263,7 +4263,7 @@ index ef6964f9e..25121a02e 100644
+ ASSERT_TRUE(str == std::string("foo"));
+}
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
-index 1e10e1f86..bff33a561 100644
+index 1e10e1f..bff33a5 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -1138,3 +1138,45 @@ class Wallet(object):
@@ -4313,5 +4313,5 @@ index 1e10e1f86..bff33a561 100644
+ }
+ return self.rpc.send_json_rpc_request(stop_background_sync)
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
index 7d2fe5b..2b13c05 100644
--- a/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
+++ b/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
@@ -1,7 +1,7 @@
-From aee5abfcc82ca7ff3e350fd964bbcb6406a91201 Mon Sep 17 00:00:00 2001
+From c7b6e26d36d2428e5747e2b8287ae3719fa443e3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Tue, 2 Apr 2024 16:51:56 +0200
-Subject: [PATCH 02/12] fix missing ___clear_cache when targetting iOS
+Subject: [PATCH 02/14] fix missing ___clear_cache when targetting iOS
---
.gitmodules | 3 ++-
@@ -9,7 +9,7 @@ Subject: [PATCH 02/12] fix missing ___clear_cache when targetting iOS
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitmodules b/.gitmodules
-index 721cce3b4..ffb73fe9a 100644
+index 721cce3..ffb73fe 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -9,7 +9,8 @@
@@ -23,12 +23,12 @@ index 721cce3b4..ffb73fe9a 100644
path = external/supercop
url = https://github.com/monero-project/supercop
diff --git a/external/randomx b/external/randomx
-index 102f8acf9..ce72c9bb9 160000
+index 102f8ac..ce72c9b 160000
--- a/external/randomx
+++ b/external/randomx
@@ -1 +1 @@
-Subproject commit 102f8acf90a7649ada410de5499a7ec62e49e1da
+Subproject commit ce72c9bb9cb799e0d9171094b9abb009e04c5bfc
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0003-store-crash-fix.patch b/patches/monero/0003-store-crash-fix.patch
index a0a07df..225f0ab 100644
--- a/patches/monero/0003-store-crash-fix.patch
+++ b/patches/monero/0003-store-crash-fix.patch
@@ -1,7 +1,7 @@
-From 92b9dcfa4cc36728fc8d5738ab8bb71931a3e30d Mon Sep 17 00:00:00 2001
+From b49bc52f3d3d1751dd65d4694e4f74b84b23f583 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Sat, 11 May 2024 16:25:10 +0200
-Subject: [PATCH 03/12] store crash fix
+Subject: [PATCH 03/14] store crash fix
Monero wallet crashes (sometimes) when it is syncing,
while the proper solution (that can be seen in feather)
@@ -38,12 +38,12 @@ the current state.
---
src/wallet/api/wallet.cpp | 25 ++++++++++++-------------
src/wallet/api/wallet.h | 1 -
- src/wallet/wallet2.cpp | 12 +++++++++++-
+ src/wallet/wallet2.cpp | 11 ++++++++++-
src/wallet/wallet2.h | 3 +++
- 4 files changed, 26 insertions(+), 15 deletions(-)
+ 4 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e9f76f4cf..0d85cf359 100644
+index e9f76f4..0d85cf3 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -55,8 +55,8 @@ using namespace cryptonote;
@@ -135,7 +135,7 @@ index e9f76f4cf..0d85cf359 100644
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index 1f199a72c..ac7ce2f6a 100644
+index 1f199a7..ac7ce2f 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -273,7 +273,6 @@ private:
@@ -147,7 +147,7 @@ index 1f199a72c..ac7ce2f6a 100644
std::atomic<int> m_refreshIntervalMillis;
std::atomic<bool> m_refreshShouldRescan;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 8146014d6..aa61fb298 100644
+index 8146014..7913d55 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1192,6 +1192,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
@@ -173,19 +173,17 @@ index 8146014d6..aa61fb298 100644
bool wallet2::set_proxy(const std::string &address)
{
return m_http_client->set_proxy(address);
-@@ -4096,8 +4105,9 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
+@@ -4096,7 +4105,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
// infer when we get an incoming output
bool first = true, last = false;
- while(m_run.load(std::memory_order_relaxed) && blocks_fetched < max_blocks)
+ while(m_run.load(std::memory_order_relaxed) && blocks_fetched < max_blocks && m_refreshEnabled)
{
-+ LOG_ERROR("SYNCING");
uint64_t next_blocks_start_height;
std::vector<cryptonote::block_complete_entry> next_blocks;
- std::vector<parsed_block> next_parsed_blocks;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index b1dc4f716..a050286bc 100644
+index b1dc4f7..a050286 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1071,6 +1071,8 @@ private:
@@ -206,5 +204,5 @@ index b1dc4f716..a050286bc 100644
i_wallet2_callback* m_callback;
hw::device::device_type m_key_device_type;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0004-Update-android-ndk.patch b/patches/monero/0004-Update-android-ndk.patch
deleted file mode 100644
index a85c240..0000000
--- a/patches/monero/0004-Update-android-ndk.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 0893e2ca97d65bf64abd3efda3554f66948e073d Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Thu, 23 May 2024 08:02:49 +0200
-Subject: [PATCH 04/12] Update android ndk
-
-rename arm -> armv7a
----
- contrib/depends/hosts/android.mk | 18 ++++++++++++----
- contrib/depends/packages/android_ndk.mk | 28 ++++++++++++++++++-------
- contrib/depends/packages/boost.mk | 1 +
- contrib/depends/packages/openssl.mk | 2 +-
- contrib/depends/toolchain.cmake.in | 13 ++++++------
- 5 files changed, 44 insertions(+), 18 deletions(-)
-
-diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk
-index d6f8b99dd..827103c36 100644
---- a/contrib/depends/hosts/android.mk
-+++ b/contrib/depends/hosts/android.mk
-@@ -1,12 +1,22 @@
- ANDROID_API=21
--
--ifeq ($(host_arch),arm)
--host_toolchain=arm-linux-androideabi-
-+host_toolchain=nonexistent
-+ifeq ($(host_arch),armv7a)
-+host_toolchain=armv7a-linux-androideabi${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),x86_64)
-+host_toolchain=x86_64-linux-android${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),i686)
-+host_toolchain=i686-linux-android${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),aarch64)
-+host_toolchain=aarch64-linux-android${ANDROID_API}-
- endif
-
- android_CC=$(host_toolchain)clang
- android_CXX=$(host_toolchain)clang++
--android_RANLIB=:
-+android_RANLIB=llvm-ranlib
-+android_AR=llvm-ar
-
- android_CFLAGS=-pipe
- android_CXXFLAGS=$(android_CFLAGS)
-diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk
-index 9b8a5332f..2c2914ec2 100644
---- a/contrib/depends/packages/android_ndk.mk
-+++ b/contrib/depends/packages/android_ndk.mk
-@@ -1,12 +1,16 @@
- package=android_ndk
--$(package)_version=17b
-+$(package)_version=26d
- $(package)_download_path=https://dl.google.com/android/repository/
--$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
--$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
-+$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip
-+$(package)_sha256_hash=eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54
-+
-+$(package)_version_apiversion=21
-
- define $(package)_set_vars
--$(package)_config_opts_arm=--arch arm
-+$(package)_config_opts_armv7a=--arch arm
- $(package)_config_opts_aarch64=--arch arm64
-+$(package)_config_opts_x86_64=--arch x86_64
-+$(package)_config_opts_i686=--arch x86
- endef
-
- define $(package)_extract_cmds
-@@ -14,9 +18,19 @@ define $(package)_extract_cmds
- unzip -q $($(1)_source_dir)/$($(package)_file_name)
- endef
-
-+# arm-linux-androideabi-ar - openssl workaround
-+
- define $(package)_stage_cmds
-- android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
-- --install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
-- mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
-+ mkdir -p $(build_prefix) &&\
-+ echo $(build_prefix)/toolchain && \
-+ android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api $($(package)_version_apiversion) \
-+ --install-dir $(build_prefix)/toolchain --stl=libc++ $($(package)_config_opts) &&\
-+ mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native && \
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ranlib &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ranlib &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ranlib
- endef
-
-diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
-index fd06c5393..c17e863cc 100644
---- a/contrib/depends/packages/boost.mk
-+++ b/contrib/depends/packages/boost.mk
-@@ -25,6 +25,7 @@ $(package)_archiver_darwin=$($(package)_libtool)
- $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
- $(package)_cxxflags=-std=c++11
- $(package)_cxxflags_linux=-fPIC
-+$(package)_cxxflags_android=-fPIC
- $(package)_cxxflags_freebsd=-fPIC
- endef
-
-diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk
-index a157762c7..2430f6495 100644
---- a/contrib/depends/packages/openssl.mk
-+++ b/contrib/depends/packages/openssl.mk
-@@ -34,7 +34,7 @@ $(package)_config_opts_x86_64_linux=linux-x86_64
- $(package)_config_opts_i686_linux=linux-generic32
- $(package)_config_opts_arm_linux=linux-generic32
- $(package)_config_opts_aarch64_linux=linux-generic64
--$(package)_config_opts_arm_android=--static android-arm
-+$(package)_config_opts_armv7a_android=--static android-arm
- $(package)_config_opts_aarch64_android=--static android-arm64
- $(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
- $(package)_config_opts_riscv64_linux=linux-generic64
-diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
-index f118c754e..cc1d9b5c5 100644
---- a/contrib/depends/toolchain.cmake.in
-+++ b/contrib/depends/toolchain.cmake.in
-@@ -100,20 +100,21 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- SET(LLVM_ENABLE_PIE OFF)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
- SET(ANDROID TRUE)
-- if(ARCHITECTURE STREQUAL "arm")
-+ if(ARCHITECTURE STREQUAL "armv7a")
- SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
- SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
- SET(CMAKE_ANDROID_ARM_MODE ON)
-- SET(CMAKE_C_COMPILER_TARGET arm-linux-androideabi)
-- SET(CMAKE_CXX_COMPILER_TARGET arm-linux-androideabi)
-- SET(_CMAKE_TOOLCHAIN_PREFIX arm-linux-androideabi-)
-+ SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21)
-+ SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21)
-+ SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-)
- elseif(ARCHITECTURE STREQUAL "aarch64")
- SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
- SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
- endif()
- SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native)
-- SET(CMAKE_C_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang")
-- SET(CMAKE_CXX_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang++")
-+ SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
-+ SET(CMAKE_C_COMPILER @CC@)
-+ SET(CMAKE_CXX_COMPILER @CXX@)
- else()
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_CXX_COMPILER @CXX@)
---
-2.43.0
-
diff --git a/patches/monero/0005-uint64_t-missing-definition-fix.patch b/patches/monero/0004-uint64_t-missing-definition-fix.patch
index e2d7810..129886b 100644
--- a/patches/monero/0005-uint64_t-missing-definition-fix.patch
+++ b/patches/monero/0004-uint64_t-missing-definition-fix.patch
@@ -1,14 +1,14 @@
-From fc8b72e4da39cfe847a75213aab70365f3c2140d Mon Sep 17 00:00:00 2001
+From 99e6af859234d8b37866e46d95d77e20687767de Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 2 Sep 2024 16:40:31 +0200
-Subject: [PATCH 05/12] uint64_t missing definition fix
+Subject: [PATCH 04/14] uint64_t missing definition fix
---
contrib/epee/include/net/http_base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/epee/include/net/http_base.h b/contrib/epee/include/net/http_base.h
-index 4af4da790..ae4c0d05e 100644
+index 4af4da7..ae4c0d0 100644
--- a/contrib/epee/include/net/http_base.h
+++ b/contrib/epee/include/net/http_base.h
@@ -28,7 +28,7 @@
@@ -21,5 +21,5 @@ index 4af4da790..ae4c0d05e 100644
#include <string>
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0006-use-proper-error-handling-in-get_seed.patch b/patches/monero/0005-use-proper-error-handling-in-get_seed.patch
index 5039c22..3562b7b 100644
--- a/patches/monero/0006-use-proper-error-handling-in-get_seed.patch
+++ b/patches/monero/0005-use-proper-error-handling-in-get_seed.patch
@@ -1,7 +1,7 @@
-From 8ccefc307c8025881128a3ca908975270219d92e Mon Sep 17 00:00:00 2001
+From 6be87b2c75ea663e205f468c986809755839afa3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 24 Jun 2024 10:49:12 +0200
-Subject: [PATCH 06/12] use proper error handling in get_seed
+Subject: [PATCH 05/14] use proper error handling in get_seed
---
src/wallet/api/wallet.cpp | 17 ++++++++++++-----
@@ -9,7 +9,7 @@ Subject: [PATCH 06/12] use proper error handling in get_seed
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 0d85cf359..dfbf4fd28 100644
+index 0d85cf3..dfbf4fd 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -826,12 +826,19 @@ bool WalletImpl::close(bool store)
@@ -38,7 +38,7 @@ index 0d85cf359..dfbf4fd28 100644
std::string WalletImpl::getSeedLanguage() const
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index aa61fb298..5ffeda2ec 100644
+index 7913d55..debc0c2 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1440,11 +1440,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
@@ -67,5 +67,5 @@ index aa61fb298..5ffeda2ec 100644
return true;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0007-UR-functions.patch b/patches/monero/0006-UR-functions.patch
index b321420..c25b2d0 100644
--- a/patches/monero/0007-UR-functions.patch
+++ b/patches/monero/0006-UR-functions.patch
@@ -1,7 +1,7 @@
-From 06921411d75e372df8176dd307e146812fe397ba Mon Sep 17 00:00:00 2001
+From 3138500cb65a6d72726d611d16cbd4b28d01fbe9 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 10:09:50 +0100
-Subject: [PATCH 07/12] UR functions
+Subject: [PATCH 06/14] UR functions
This commit adds UR functions for UR tasks,
I believe that the right place to get
@@ -21,8 +21,6 @@ Things broken in the commit
---
.gitmodules | 4 +
CMakeLists.txt | 4 +-
- contrib/depends/hosts/darwin.mk | 2 +-
- contrib/depends/toolchain.cmake.in | 2 +-
external/CMakeLists.txt | 1 +
external/bc-ur | 1 +
src/device/device_ledger.cpp | 5 +-
@@ -36,11 +34,11 @@ Things broken in the commit
src/wallet/api/wallet2_api.h | 22 +-
src/wallet/wallet2.cpp | 141 +++++++----
src/wallet/wallet2.h | 3 +
- 17 files changed, 521 insertions(+), 59 deletions(-)
+ 15 files changed, 519 insertions(+), 57 deletions(-)
create mode 160000 external/bc-ur
diff --git a/.gitmodules b/.gitmodules
-index ffb73fe9a..72af74d55 100644
+index ffb73fe..72af74d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -15,3 +15,7 @@
@@ -52,7 +50,7 @@ index ffb73fe9a..72af74d55 100644
+ url = https://github.com/MrCyjaneK/bc-ur
+ branch = misc
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8fb03ba1f..63ee8252d 100644
+index 8fb03ba..63ee825 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,8 @@ enable_language(C ASM)
@@ -73,31 +71,8 @@ index 8fb03ba1f..63ee8252d 100644
check_submodule(external/miniupnp)
check_submodule(external/rapidjson)
check_submodule(external/trezor-common)
-diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
-index 79d449054..83d83036b 100644
---- a/contrib/depends/hosts/darwin.mk
-+++ b/contrib/depends/hosts/darwin.mk
-@@ -1,4 +1,4 @@
--OSX_MIN_VERSION=10.8
-+OSX_MIN_VERSION=10.14
- LD64_VERSION=609
- ifeq (aarch64, $(host_arch))
- CC_target=arm64-apple-$(host_os)
-diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
-index cc1d9b5c5..48a6f947e 100644
---- a/contrib/depends/toolchain.cmake.in
-+++ b/contrib/depends/toolchain.cmake.in
-@@ -94,7 +94,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- SET(BREW OFF)
- SET(PORT OFF)
- SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
-- SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
-+ SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
- SET(CMAKE_CXX_STANDARD 14)
- SET(LLVM_ENABLE_PIC OFF)
- SET(LLVM_ENABLE_PIE OFF)
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index 5b7f69a56..f9ed6a69a 100644
+index 5b7f69a..f9ed6a6 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -69,4 +69,5 @@ endif()
@@ -108,13 +83,13 @@ index 5b7f69a56..f9ed6a69a 100644
add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/external/bc-ur b/external/bc-ur
new file mode 160000
-index 000000000..d82e7c753
+index 0000000..d82e7c7
--- /dev/null
+++ b/external/bc-ur
@@ -0,0 +1 @@
+Subproject commit d82e7c753e710b8000706dc3383b498438795208
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index 5d0afe1ee..bb5b6f497 100644
+index 5d0afe1..bb5b6f4 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -313,12 +313,13 @@ namespace hw {
@@ -134,7 +109,7 @@ index 5d0afe1ee..bb5b6f497 100644
boost::lock_guard<boost::recursive_mutex> lock1(device_locker, boost::adopt_lock); \
boost::lock_guard<boost::mutex> lock2(command_locker, boost::adopt_lock)
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
-index 6095f99d5..b163212b7 100644
+index 6095f99..b163212 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -50,6 +50,7 @@ monero_add_library(wallet
@@ -146,7 +121,7 @@ index 6095f99d5..b163212b7 100644
common
cryptonote_core
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp
-index 70a702796..9c3c26ee5 100644
+index 70a7027..9c3c26e 100644
--- a/src/wallet/api/pending_transaction.cpp
+++ b/src/wallet/api/pending_transaction.cpp
@@ -42,6 +42,8 @@
@@ -197,7 +172,7 @@ index 70a702796..9c3c26ee5 100644
{
uint64_t result = 0;
diff --git a/src/wallet/api/pending_transaction.h b/src/wallet/api/pending_transaction.h
-index 0a9779c07..403bfe281 100644
+index 0a9779c..403bfe2 100644
--- a/src/wallet/api/pending_transaction.h
+++ b/src/wallet/api/pending_transaction.h
@@ -46,6 +46,7 @@ public:
@@ -209,7 +184,7 @@ index 0a9779c07..403bfe281 100644
uint64_t dust() const override;
uint64_t fee() const override;
diff --git a/src/wallet/api/unsigned_transaction.cpp b/src/wallet/api/unsigned_transaction.cpp
-index 6165a2240..fd03e959d 100644
+index 6165a22..fd03e95 100644
--- a/src/wallet/api/unsigned_transaction.cpp
+++ b/src/wallet/api/unsigned_transaction.cpp
@@ -40,6 +40,8 @@
@@ -269,7 +244,7 @@ index 6165a2240..fd03e959d 100644
bool UnsignedTransactionImpl::checkLoadedTx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message)
{
diff --git a/src/wallet/api/unsigned_transaction.h b/src/wallet/api/unsigned_transaction.h
-index 30065a7fa..a94b23f75 100644
+index 30065a7..a94b23f 100644
--- a/src/wallet/api/unsigned_transaction.h
+++ b/src/wallet/api/unsigned_transaction.h
@@ -53,6 +53,7 @@ public:
@@ -281,7 +256,7 @@ index 30065a7fa..a94b23f75 100644
uint64_t minMixinCount() const override;
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index dfbf4fd28..4fb5f7595 100644
+index dfbf4fd..4fb5f75 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -47,6 +47,7 @@
@@ -657,7 +632,7 @@ index dfbf4fd28..4fb5f7595 100644
{
if (checkBackgroundSync("cannot scan transactions"))
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index ac7ce2f6a..edf8bb8ce 100644
+index ac7ce2f..edf8bb8 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -112,6 +112,7 @@ public:
@@ -688,7 +663,7 @@ index ac7ce2f6a..edf8bb8ce 100644
bool setupBackgroundSync(const BackgroundSyncType background_sync_type, const std::string &wallet_password, const optional<std::string> &background_cache_password = optional<std::string>()) override;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index e349df176..764adbfbf 100644
+index e349df1..764adbf 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -91,6 +91,7 @@ struct PendingTransaction
@@ -779,7 +754,7 @@ index e349df176..764adbfbf 100644
/*!
* \brief scanTransactions - scan a list of transaction ids, this operation may reveal the txids to the remote node and affect your privacy
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 5ffeda2ec..4f58d7aea 100644
+index debc0c2..dfa3213 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -948,6 +948,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra)
@@ -799,7 +774,7 @@ index 5ffeda2ec..4f58d7aea 100644
static void setup_shim(hw::wallet_shim * shim, tools::wallet2 * wallet)
{
shim->get_tx_pub_key_from_received_outs = std::bind(&tools::wallet2::get_tx_pub_key_from_received_outs, wallet, std::placeholders::_1);
-@@ -6987,6 +6997,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
+@@ -6986,6 +6996,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
return amount;
}
//----------------------------------------------------------------------------------------------------
@@ -825,7 +800,7 @@ index 5ffeda2ec..4f58d7aea 100644
std::map<uint32_t, uint64_t> wallet2::balance_per_subaddress(uint32_t index_major, bool strict) const
{
std::map<uint32_t, uint64_t> amount_per_subaddr;
-@@ -7838,9 +7867,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
+@@ -7837,9 +7866,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
crypto::key_derivation derivation;
std::vector<crypto::key_derivation> additional_derivations;
@@ -836,7 +811,7 @@ index 5ffeda2ec..4f58d7aea 100644
std::vector<crypto::public_key> additional_tx_pub_keys;
for (const crypto::secret_key &skey: txs[n].additional_tx_keys)
{
-@@ -11236,7 +11263,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11235,7 +11262,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold));
continue;
}
@@ -845,7 +820,7 @@ index 5ffeda2ec..4f58d7aea 100644
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
{
-@@ -11286,9 +11313,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11285,9 +11312,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
LOG_PRINT_L2("Starting with " << num_nondust_outputs << " non-dust outputs and " << num_dust_outputs << " dust outputs");
@@ -863,7 +838,7 @@ index 5ffeda2ec..4f58d7aea 100644
// if empty, put dummy entry so that the front can be referenced later in the loop
if (unused_dust_indices_per_subaddr.empty())
unused_dust_indices_per_subaddr.push_back({});
-@@ -13924,33 +13957,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
+@@ -13923,33 +13956,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
bool wallet2::export_key_images(const std::string &filename, bool all) const
{
@@ -927,7 +902,7 @@ index 5ffeda2ec..4f58d7aea 100644
//----------------------------------------------------------------------------------------------------
std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> wallet2::export_key_images(bool all) const
{
-@@ -14005,53 +14045,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
+@@ -14004,53 +14044,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
return std::make_pair(offset, ski);
}
@@ -1007,7 +982,7 @@ index 5ffeda2ec..4f58d7aea 100644
ski.push_back(std::make_pair(key_image, signature));
}
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index a050286bc..1d7e430b9 100644
+index a050286..1d7e430 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1150,6 +1150,7 @@ private:
@@ -1031,5 +1006,5 @@ index a050286bc..1d7e430b9 100644
bool import_key_images(signed_tx_set & signed_tx, size_t offset=0, bool only_selected_transfers=false);
crypto::public_key get_tx_pub_key_from_received_outs(const tools::wallet2::transfer_details &td) const;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0008-add-dummy-device-for-ledger.patch b/patches/monero/0007-add-dummy-device-for-ledger.patch
index 68e072e..b9e1bea 100644
--- a/patches/monero/0008-add-dummy-device-for-ledger.patch
+++ b/patches/monero/0007-add-dummy-device-for-ledger.patch
@@ -1,26 +1,27 @@
-From 30ee30d8f0d5e9c301b782db53c92a8982c5bb46 Mon Sep 17 00:00:00 2001
+From bf8c0d01e60dade9fbdd77c4ce825e6b37d3c6c3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 26 Jun 2024 15:04:38 +0200
-Subject: [PATCH 08/12] add dummy device for ledger
+Subject: [PATCH 07/14] add dummy device for ledger
---
- CMakeLists.txt | 6 +-
- src/device/CMakeLists.txt | 6 +-
- src/device/device.cpp | 10 ++-
- src/device/device.hpp | 12 +--
- src/device/device_io_dummy.cpp | 133 +++++++++++++++++++++++++++++++++
- src/device/device_io_dummy.hpp | 74 ++++++++++++++++++
- src/device/device_ledger.cpp | 6 +-
- src/device/device_ledger.hpp | 7 +-
- src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++++
- src/wallet/api/wallet.h | 18 +++++
- src/wallet/api/wallet2_api.h | 12 +++
- 11 files changed, 357 insertions(+), 21 deletions(-)
+ CMakeLists.txt | 6 +-
+ src/device/CMakeLists.txt | 6 +-
+ src/device/device.cpp | 10 ++-
+ src/device/device.hpp | 12 +--
+ src/device/device_io_dummy.cpp | 133 ++++++++++++++++++++++++++++++
+ src/device/device_io_dummy.hpp | 74 +++++++++++++++++
+ src/device/device_ledger.cpp | 6 +-
+ src/device/device_ledger.hpp | 7 +-
+ src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++
+ src/wallet/api/wallet.h | 18 ++++
+ src/wallet/api/wallet2_api.h | 12 +++
+ src/wallet/api/wallet_manager.cpp | 12 ++-
+ 12 files changed, 365 insertions(+), 25 deletions(-)
create mode 100644 src/device/device_io_dummy.cpp
create mode 100644 src/device/device_io_dummy.hpp
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 63ee8252d..43ef6cd20 100644
+index 63ee825..43ef6cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -692,8 +692,12 @@ include_directories(${LMDB_INCLUDE})
@@ -38,7 +39,7 @@ index 63ee8252d..43ef6cd20 100644
add_definitions(-DHAVE_HIDAPI)
include_directories(${HIDAPI_INCLUDE_DIR})
diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
-index e4f1159b5..14d398f87 100644
+index e4f1159..14d398f 100644
--- a/src/device/CMakeLists.txt
+++ b/src/device/CMakeLists.txt
@@ -29,10 +29,11 @@
@@ -68,7 +69,7 @@ index e4f1159b5..14d398f87 100644
${device_headers}
device_ledger.hpp
diff --git a/src/device/device.cpp b/src/device/device.cpp
-index e6cd358b6..636929feb 100644
+index e6cd358..777584c 100644
--- a/src/device/device.cpp
+++ b/src/device/device.cpp
@@ -29,7 +29,7 @@
@@ -106,7 +107,7 @@ index e6cd358b6..636929feb 100644
return *device->second;
}
diff --git a/src/device/device.hpp b/src/device/device.hpp
-index 392703a24..ffd419779 100644
+index 392703a..ffd4197 100644
--- a/src/device/device.hpp
+++ b/src/device/device.hpp
@@ -34,17 +34,7 @@
@@ -130,7 +131,7 @@ index 392703a24..ffd419779 100644
diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
new file mode 100644
-index 000000000..fb082694e
+index 0000000..edb4bee
--- /dev/null
+++ b/src/device/device_io_dummy.cpp
@@ -0,0 +1,133 @@
@@ -174,7 +175,7 @@ index 000000000..fb082694e
+// Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
+// own USB/BLE/other transport layer.
+
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include <boost/scope_exit.hpp>
+#include "log.hpp"
+#include "device_io_dummy.hpp"
@@ -270,7 +271,7 @@ index 000000000..fb082694e
\ No newline at end of file
diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
new file mode 100644
-index 000000000..a1733616d
+index 0000000..a173361
--- /dev/null
+++ b/src/device/device_io_dummy.hpp
@@ -0,0 +1,74 @@
@@ -349,7 +350,7 @@ index 000000000..a1733616d
+
+#endif // HAVE_HIDAPI
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index bb5b6f497..d405b86f2 100644
+index bb5b6f4..046201a 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -41,7 +41,7 @@ namespace hw {
@@ -374,14 +375,14 @@ index bb5b6f497..d405b86f2 100644
bool device_ledger::connect(void) {
this->disconnect();
-+ #ifndef HIDAPI_DUMMY
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
hw_device.connect(known_devices);
+ #endif
this->reset();
#ifdef DEBUG_HWDEVICE
cryptonote::account_public_address pubkey;
diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 03058c4f1..506f27c4a 100644
+index 03058c4..39454ca 100644
--- a/src/device/device_ledger.hpp
+++ b/src/device/device_ledger.hpp
@@ -35,6 +35,7 @@
@@ -405,7 +406,7 @@ index 03058c4f1..506f27c4a 100644
mutable boost::mutex command_locker;
//IO
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+ hw::io::device_io_dummy hw_device;
+#else
hw::io::device_io_hid hw_device;
@@ -414,14 +415,14 @@ index 03058c4f1..506f27c4a 100644
unsigned char buffer_send[BUFFER_SEND_SIZE];
unsigned int length_recv;
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 4fb5f7595..4a3a7be75 100644
+index 4fb5f75..c73f38e 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -48,6 +48,9 @@
#include <boost/locale.hpp>
#include <boost/filesystem.hpp>
#include "bc-ur/src/bc-ur.hpp"
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include "device/device_io_dummy.hpp"
+#endif
@@ -434,8 +435,8 @@ index 4fb5f7595..4a3a7be75 100644
+
+// HIDAPI_DUMMY
+bool WalletImpl::getStateIsConnected() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::stateIsConnected;
@@ -443,8 +444,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+unsigned char* WalletImpl::getSendToDevice() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::sendToDevice;
@@ -452,8 +453,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+size_t WalletImpl::getSendToDeviceLength() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::sendToDeviceLength;
@@ -461,8 +462,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+unsigned char* WalletImpl::getReceivedFromDevice() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::receivedFromDevice;
@@ -470,8 +471,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+size_t WalletImpl::getReceivedFromDeviceLength() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
@@ -479,8 +480,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+bool WalletImpl::getWaitsForDeviceSend() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
@@ -488,8 +489,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+bool WalletImpl::getWaitsForDeviceReceive() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::waitsForDeviceReceive;
@@ -497,8 +498,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
@@ -510,8 +511,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
@@ -524,7 +525,7 @@ index 4fb5f7595..4a3a7be75 100644
+
} // namespace
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index edf8bb8ce..4e9c21ecb 100644
+index edf8bb8..4e9c21e 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -301,6 +301,24 @@ private:
@@ -553,7 +554,7 @@ index edf8bb8ce..4e9c21ecb 100644
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 764adbfbf..53ec4abfc 100644
+index 764adbf..53ec4ab 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -1150,6 +1150,18 @@ struct Wallet
@@ -575,6 +576,29 @@ index 764adbfbf..53ec4abfc 100644
};
/**
+diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
+index e81b8f8..277be6a 100644
+--- a/src/wallet/api/wallet_manager.cpp
++++ b/src/wallet/api/wallet_manager.cpp
+@@ -188,10 +188,14 @@ bool WalletManagerImpl::verifyWalletPassword(const std::string &keys_file_name,
+
+ bool WalletManagerImpl::queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds) const
+ {
+- hw::device::device_type type;
+- bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
+- device_type = static_cast<Wallet::Device>(type);
+- return r;
++ try {
++ hw::device::device_type type;
++ bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
++ device_type = static_cast<Wallet::Device>(type);
++ return r;
++ } catch (...) {
++ return false;
++ }
+ }
+
+ std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0009-polyseed.patch b/patches/monero/0008-polyseed.patch
index 4d82940..9289fc0 100644
--- a/patches/monero/0009-polyseed.patch
+++ b/patches/monero/0008-polyseed.patch
@@ -1,45 +1,35 @@
-From 6b0951540be868373ed261fa9b2806bf7888c9f0 Mon Sep 17 00:00:00 2001
+From ed2ce176ea5f1bbe81069a3df4601a141b533b95 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 09:42:37 +0100
-Subject: [PATCH 09/12] polyseed
+Subject: [PATCH 08/14] polyseed
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
---
- .gitmodules | 6 +
- CMakeLists.txt | 4 +-
- contrib/depends/hosts/darwin.mk | 2 +
- contrib/depends/hosts/linux.mk | 8 +-
- contrib/depends/packages/packages.mk | 2 +-
- contrib/depends/packages/polyseed.mk | 28 +++
- contrib/depends/packages/sodium.mk | 2 +-
- .../polyseed/0001-disable-soname.patch | 48 +++++
- .../patches/polyseed/force-static-mingw.patch | 23 +++
- contrib/epee/include/wipeable_string.h | 7 +
- contrib/epee/src/wipeable_string.cpp | 10 +
- external/CMakeLists.txt | 2 +
- external/polyseed | 1 +
- external/utf8proc | 1 +
- src/CMakeLists.txt | 1 +
- src/cryptonote_basic/CMakeLists.txt | 1 +
- src/cryptonote_basic/account.cpp | 23 ++-
- src/cryptonote_basic/account.h | 6 +
- src/cryptonote_config.h | 2 +
- src/polyseed/CMakeLists.txt | 25 +++
- src/polyseed/pbkdf2.c | 85 ++++++++
- src/polyseed/pbkdf2.h | 46 +++++
- src/polyseed/polyseed.cpp | 182 ++++++++++++++++++
- src/polyseed/polyseed.hpp | 167 ++++++++++++++++
- src/wallet/api/wallet.cpp | 70 +++++++
- src/wallet/api/wallet.h | 10 +
- src/wallet/api/wallet2_api.h | 25 +++
- src/wallet/api/wallet_manager.cpp | 9 +
- src/wallet/api/wallet_manager.h | 10 +
- src/wallet/wallet2.cpp | 100 ++++++++--
- src/wallet/wallet2.h | 30 ++-
- 31 files changed, 912 insertions(+), 24 deletions(-)
- create mode 100644 contrib/depends/packages/polyseed.mk
- create mode 100644 contrib/depends/patches/polyseed/0001-disable-soname.patch
- create mode 100644 contrib/depends/patches/polyseed/force-static-mingw.patch
+ .gitmodules | 6 +
+ CMakeLists.txt | 4 +-
+ contrib/epee/include/wipeable_string.h | 7 +
+ contrib/epee/src/wipeable_string.cpp | 10 ++
+ external/CMakeLists.txt | 2 +
+ external/polyseed | 1 +
+ external/utf8proc | 1 +
+ src/CMakeLists.txt | 1 +
+ src/cryptonote_basic/CMakeLists.txt | 1 +
+ src/cryptonote_basic/account.cpp | 23 +++-
+ src/cryptonote_basic/account.h | 6 +
+ src/cryptonote_config.h | 2 +
+ src/polyseed/CMakeLists.txt | 25 ++++
+ src/polyseed/pbkdf2.c | 85 ++++++++++++
+ src/polyseed/pbkdf2.h | 46 +++++++
+ src/polyseed/polyseed.cpp | 182 +++++++++++++++++++++++++
+ src/polyseed/polyseed.hpp | 167 +++++++++++++++++++++++
+ src/wallet/api/wallet.cpp | 70 ++++++++++
+ src/wallet/api/wallet.h | 10 ++
+ src/wallet/api/wallet2_api.h | 25 ++++
+ src/wallet/api/wallet_manager.cpp | 9 ++
+ src/wallet/api/wallet_manager.h | 10 ++
+ src/wallet/wallet2.cpp | 100 ++++++++++++--
+ src/wallet/wallet2.h | 30 +++-
+ 24 files changed, 805 insertions(+), 18 deletions(-)
create mode 160000 external/polyseed
create mode 160000 external/utf8proc
create mode 100644 src/polyseed/CMakeLists.txt
@@ -49,7 +39,7 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
create mode 100644 src/polyseed/polyseed.hpp
diff --git a/.gitmodules b/.gitmodules
-index 72af74d55..b838e84e0 100644
+index 72af74d..b838e84 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -11,6 +11,12 @@
@@ -66,7 +56,7 @@ index 72af74d55..b838e84e0 100644
path = external/supercop
url = https://github.com/monero-project/supercop
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 43ef6cd20..e7fa90abb 100644
+index 43ef6cd..e7fa90a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -371,6 +371,8 @@ if(NOT MANUAL_SUBMODULES)
@@ -87,185 +77,8 @@ index 43ef6cd20..e7fa90abb 100644
if(APPLE)
cmake_policy(SET CMP0042 NEW)
-diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
-index 83d83036b..b14ee5c5b 100644
---- a/contrib/depends/hosts/darwin.mk
-+++ b/contrib/depends/hosts/darwin.mk
-@@ -8,6 +8,8 @@ endif
- darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
- darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
-
-+darwin_RANLIB=$(host_prefix)/native/bin/$(host)-ranlib
-+
- darwin_CFLAGS=-pipe
- darwin_CXXFLAGS=$(darwin_CFLAGS)
- darwin_ARFLAGS=cr
-diff --git a/contrib/depends/hosts/linux.mk b/contrib/depends/hosts/linux.mk
-index 912fdb03c..b79799f30 100644
---- a/contrib/depends/hosts/linux.mk
-+++ b/contrib/depends/hosts/linux.mk
-@@ -11,15 +11,15 @@ linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
- linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
-
- ifeq (86,$(findstring 86,$(build_arch)))
--i686_linux_CC=gcc -m32
--i686_linux_CXX=g++ -m32
-+i686_linux_CC=i686-linux-gnu-gcc
-+i686_linux_CXX=i686-linux-gnu-g++
- i686_linux_AR=ar
- i686_linux_RANLIB=ranlib
- i686_linux_NM=nm
- i686_linux_STRIP=strip
-
--x86_64_linux_CC=gcc -m64
--x86_64_linux_CXX=g++ -m64
-+x86_64_linux_CC=x86_64-linux-gnu-gcc
-+x86_64_linux_CXX=x86_64-linux-gnu-g++
- x86_64_linux_AR=ar
- x86_64_linux_RANLIB=ranlib
- x86_64_linux_NM=nm
-diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
-index d2d1eca85..8783d4955 100644
---- a/contrib/depends/packages/packages.mk
-+++ b/contrib/depends/packages/packages.mk
-@@ -1,4 +1,4 @@
--packages:=boost openssl zeromq libiconv expat unbound
-+packages:=boost openssl zeromq libiconv expat unbound polyseed
-
- # ccache is useless in gitian builds
- ifneq ($(GITIAN),1)
-diff --git a/contrib/depends/packages/polyseed.mk b/contrib/depends/packages/polyseed.mk
-new file mode 100644
-index 000000000..0071b20f3
---- /dev/null
-+++ b/contrib/depends/packages/polyseed.mk
-@@ -0,0 +1,28 @@
-+package=polyseed
-+$(package)_version=2.0.0
-+$(package)_download_path=https://github.com/tevador/$(package)/archive/refs/tags/
-+$(package)_download_file=v$($(package)_version).tar.gz
-+$(package)_file_name=$(package)-$($(package)_version).tar.gz
-+$(package)_sha256_hash=f36282fcbcd68d32461b8230c89e1a40661bd46b91109681cec637433004135a
-+$(package)_patches=force-static-mingw.patch 0001-disable-soname.patch
-+
-+define $(package)_preprocess_cmds
-+ patch -p1 < $($(package)_patch_dir)/force-static-mingw.patch &&\
-+ patch -p1 < $($(package)_patch_dir)/0001-disable-soname.patch
-+endef
-+
-+define $(package)_config_cmds
-+ CC="$($(package)_cc)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" .
-+endef
-+
-+define $(package)_set_vars
-+ $(package)_build_opts=CC="$($(package)_cc)"
-+endef
-+
-+define $(package)_build_cmds
-+ CC="$($(package)_cc)" $(MAKE)
-+endef
-+
-+define $(package)_stage_cmds
-+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
-+endef
-diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
-index 87b34599e..68a5b48ba 100644
---- a/contrib/depends/packages/sodium.mk
-+++ b/contrib/depends/packages/sodium.mk
-@@ -6,7 +6,7 @@ $(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e
- $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
-
- define $(package)_set_vars
--$(package)_config_opts=--enable-static --disable-shared
-+$(package)_config_opts=--enable-static --disable-shared --with-pic
- $(package)_config_opts+=--prefix=$(host_prefix)
- endef
-
-diff --git a/contrib/depends/patches/polyseed/0001-disable-soname.patch b/contrib/depends/patches/polyseed/0001-disable-soname.patch
-new file mode 100644
-index 000000000..bd97dd394
---- /dev/null
-+++ b/contrib/depends/patches/polyseed/0001-disable-soname.patch
-@@ -0,0 +1,48 @@
-+From aabafcfc0572651436d024a635483c49042fad7f Mon Sep 17 00:00:00 2001
-+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-+Date: Thu, 28 Mar 2024 00:32:51 +0100
-+Subject: [PATCH] disable soname
-+
-+---
-+ CMakeLists.txt | 16 +++++++++-------
-+ 1 file changed, 9 insertions(+), 7 deletions(-)
-+
-+diff --git a/CMakeLists.txt b/CMakeLists.txt
-+index 8a8e7c2..5301353 100644
-+--- a/CMakeLists.txt
-++++ b/CMakeLists.txt
-+@@ -36,6 +36,7 @@ include_directories(polyseed
-+ target_compile_definitions(polyseed PRIVATE POLYSEED_SHARED)
-+ set_target_properties(polyseed PROPERTIES VERSION 2.0.0
-+ SOVERSION 2
-++ NO_SONAME 1
-+ C_STANDARD 11
-+ C_STANDARD_REQUIRED ON)
-+
-+@@ -45,16 +46,17 @@ include_directories(polyseed_static
-+ include/)
-+ target_compile_definitions(polyseed_static PRIVATE POLYSEED_STATIC)
-+ set_target_properties(polyseed_static PROPERTIES OUTPUT_NAME polyseed
-++ NO_SONAME 1
-+ C_STANDARD 11
-+ C_STANDARD_REQUIRED ON)
-+
-+-add_executable(polyseed-tests
-+- tests/tests.c)
-+-include_directories(polyseed-tests
-+- include/)
-+-target_compile_definitions(polyseed-tests PRIVATE POLYSEED_STATIC)
-+-target_link_libraries(polyseed-tests
-+- PRIVATE polyseed_static)
-++# add_executable(polyseed-tests
-++# tests/tests.c)
-++# include_directories(polyseed-tests
-++# include/)
-++# target_compile_definitions(polyseed-tests PRIVATE POLYSEED_STATIC)
-++# target_link_libraries(polyseed-tests
-++# PRIVATE polyseed_static)
-+
-+ include(GNUInstallDirs)
-+ install(TARGETS polyseed polyseed_static
-+--
-+2.39.2
-diff --git a/contrib/depends/patches/polyseed/force-static-mingw.patch b/contrib/depends/patches/polyseed/force-static-mingw.patch
-new file mode 100644
-index 000000000..f05cb2b6a
---- /dev/null
-+++ b/contrib/depends/patches/polyseed/force-static-mingw.patch
-@@ -0,0 +1,23 @@
-+--- a/include/polyseed.h
-++++ b/include/polyseed.h
-+@@ -93,13 +93,13 @@ Shared/static library definitions
-+ - define POLYSEED_STATIC when linking to the static library
-+ */
-+ #if defined(_WIN32) || defined(__CYGWIN__)
-+- #ifdef POLYSEED_SHARED
-+- #define POLYSEED_API __declspec(dllexport)
-+- #elif !defined(POLYSEED_STATIC)
-+- #define POLYSEED_API __declspec(dllimport)
-+- #else
-+- #define POLYSEED_API
-+- #endif
-++// #ifdef POLYSEED_SHARED
-++// #define POLYSEED_API __declspec(dllexport)
-++// #elif !defined(POLYSEED_STATIC)
-++// #define POLYSEED_API __declspec(dllimport)
-++// #else
-++ #define POLYSEED_API
-++// #endif
-+ #define POLYSEED_PRIVATE
-+ #else
-+ #ifdef POLYSEED_SHARED
diff --git a/contrib/epee/include/wipeable_string.h b/contrib/epee/include/wipeable_string.h
-index 65977cd97..594e15de4 100644
+index 65977cd..594e15d 100644
--- a/contrib/epee/include/wipeable_string.h
+++ b/contrib/epee/include/wipeable_string.h
@@ -34,6 +34,7 @@
@@ -290,7 +103,7 @@ index 65977cd97..594e15de4 100644
private:
void grow(size_t sz, size_t reserved = 0);
diff --git a/contrib/epee/src/wipeable_string.cpp b/contrib/epee/src/wipeable_string.cpp
-index b016f2f48..f2f365b1b 100644
+index b016f2f..f2f365b 100644
--- a/contrib/epee/src/wipeable_string.cpp
+++ b/contrib/epee/src/wipeable_string.cpp
@@ -261,4 +261,14 @@ wipeable_string &wipeable_string::operator=(const wipeable_string &other)
@@ -309,7 +122,7 @@ index b016f2f48..f2f365b1b 100644
+
}
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index f9ed6a69a..8fcf792d7 100644
+index f9ed6a6..8fcf792 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -69,5 +69,7 @@ endif()
@@ -322,20 +135,20 @@ index f9ed6a69a..8fcf792d7 100644
add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/external/polyseed b/external/polyseed
new file mode 160000
-index 000000000..dfb05d8ed
+index 0000000..bd79f50
--- /dev/null
+++ b/external/polyseed
@@ -0,0 +1 @@
+Subproject commit bd79f5014c331273357277ed8a3d756fb61b9fa1
diff --git a/external/utf8proc b/external/utf8proc
new file mode 160000
-index 000000000..3de4596fb
+index 0000000..3de4596
--- /dev/null
+++ b/external/utf8proc
@@ -0,0 +1 @@
+Subproject commit 3de4596fbe28956855df2ecb3c11c0bbc3535838
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 3335d3c21..06b708cf0 100644
+index 3335d3c..06b708c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -95,6 +95,7 @@ add_subdirectory(net)
@@ -347,7 +160,7 @@ index 3335d3c21..06b708cf0 100644
if(NOT IOS)
add_subdirectory(serialization)
diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt
-index 1414be1b2..414936a05 100644
+index 1414be1..414936a 100644
--- a/src/cryptonote_basic/CMakeLists.txt
+++ b/src/cryptonote_basic/CMakeLists.txt
@@ -71,6 +71,7 @@ target_link_libraries(cryptonote_basic
@@ -359,7 +172,7 @@ index 1414be1b2..414936a05 100644
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_SERIALIZATION_LIBRARY}
diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
-index 4e87d4477..2d556f285 100644
+index 4e87d44..2d556f2 100644
--- a/src/cryptonote_basic/account.cpp
+++ b/src/cryptonote_basic/account.cpp
@@ -87,12 +87,16 @@ DISABLE_VS_WARNINGS(4244 4345)
@@ -412,7 +225,7 @@ index 4e87d4477..2d556f285 100644
{
m_keys.m_account_address.m_spend_public_key = spend_public_key;
diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h
-index 93d1d28f0..1f76febce 100644
+index 93d1d28..1f76feb 100644
--- a/src/cryptonote_basic/account.h
+++ b/src/cryptonote_basic/account.h
@@ -33,6 +33,7 @@
@@ -450,7 +263,7 @@ index 93d1d28f0..1f76febce 100644
const account_keys& get_keys() const;
std::string get_public_address_str(network_type nettype) const;
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h
-index f9e6a6cb9..3af3a63a1 100644
+index f9e6a6c..3af3a63 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
@@ -207,6 +207,8 @@
@@ -464,7 +277,7 @@ index f9e6a6cb9..3af3a63a1 100644
// (1+32) + (1+1+16*32) + (1+16*32) = 1060
diff --git a/src/polyseed/CMakeLists.txt b/src/polyseed/CMakeLists.txt
new file mode 100644
-index 000000000..cca4eb746
+index 0000000..cca4eb7
--- /dev/null
+++ b/src/polyseed/CMakeLists.txt
@@ -0,0 +1,25 @@
@@ -495,7 +308,7 @@ index 000000000..cca4eb746
+)
diff --git a/src/polyseed/pbkdf2.c b/src/polyseed/pbkdf2.c
new file mode 100644
-index 000000000..1c45f4708
+index 0000000..1c45f47
--- /dev/null
+++ b/src/polyseed/pbkdf2.c
@@ -0,0 +1,85 @@
@@ -587,7 +400,7 @@ index 000000000..1c45f4708
\ No newline at end of file
diff --git a/src/polyseed/pbkdf2.h b/src/polyseed/pbkdf2.h
new file mode 100644
-index 000000000..f6253b9d7
+index 0000000..f6253b9
--- /dev/null
+++ b/src/polyseed/pbkdf2.h
@@ -0,0 +1,46 @@
@@ -640,7 +453,7 @@ index 000000000..f6253b9d7
\ No newline at end of file
diff --git a/src/polyseed/polyseed.cpp b/src/polyseed/polyseed.cpp
new file mode 100644
-index 000000000..231a48a94
+index 0000000..231a48a
--- /dev/null
+++ b/src/polyseed/polyseed.cpp
@@ -0,0 +1,182 @@
@@ -828,7 +641,7 @@ index 000000000..231a48a94
+}
diff --git a/src/polyseed/polyseed.hpp b/src/polyseed/polyseed.hpp
new file mode 100644
-index 000000000..2c8c777a7
+index 0000000..2c8c777
--- /dev/null
+++ b/src/polyseed/polyseed.hpp
@@ -0,0 +1,167 @@
@@ -1001,7 +814,7 @@ index 000000000..2c8c777a7
+#endif //POLYSEED_HPP
\ No newline at end of file
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index ec79482ac..e74fa0884 100644
+index c73f38e..67ac90a 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -728,6 +728,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p
@@ -1089,7 +902,7 @@ index ec79482ac..e74fa0884 100644
{
return m_wallet->get_seed_language();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index 4e9c21ecb..32e12284b 100644
+index 4e9c21e..32e1228 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -79,9 +79,19 @@ public:
@@ -1113,7 +926,7 @@ index 4e9c21ecb..32e12284b 100644
void setSeedLanguage(const std::string &arg) override;
// void setListener(Listener *) {}
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 53ec4abfc..be1c3704e 100644
+index 53ec4ab..be1c370 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -709,6 +709,10 @@ struct Wallet
@@ -1156,7 +969,7 @@ index 53ec4abfc..be1c3704e 100644
* \brief Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted
* \param wallet previously opened / created wallet instance
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index e81b8f83a..c79fe25d6 100644
+index 277be6a..da2056d 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -156,6 +156,15 @@ Wallet *WalletManagerImpl::createWalletFromDevice(const std::string &path,
@@ -1176,7 +989,7 @@ index e81b8f83a..c79fe25d6 100644
{
WalletImpl * wallet_ = dynamic_cast<WalletImpl*>(wallet);
diff --git a/src/wallet/api/wallet_manager.h b/src/wallet/api/wallet_manager.h
-index a223e1df9..28fcd36c9 100644
+index a223e1d..28fcd36 100644
--- a/src/wallet/api/wallet_manager.h
+++ b/src/wallet/api/wallet_manager.h
@@ -75,6 +75,16 @@ public:
@@ -1197,7 +1010,7 @@ index a223e1df9..28fcd36c9 100644
bool walletExists(const std::string &path) override;
bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds = 1) const override;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 4f58d7aea..1b3a66279 100644
+index dfa3213..fa346a9 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -92,6 +92,7 @@ using namespace epee;
@@ -1239,7 +1052,7 @@ index 4f58d7aea..1b3a66279 100644
bool wallet2::get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase) const
{
bool ready;
-@@ -4790,6 +4806,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
+@@ -4789,6 +4805,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
value2.SetInt(m_enable_multisig ? 1 : 0);
json.AddMember("enable_multisig", value2, json.GetAllocator());
@@ -1249,7 +1062,7 @@ index 4f58d7aea..1b3a66279 100644
if (m_background_sync_type == BackgroundSyncCustomPassword && !background_keys_file && m_custom_background_key)
{
value.SetString(reinterpret_cast<const char*>(m_custom_background_key.get().data()), m_custom_background_key.get().size());
-@@ -5029,6 +5048,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5028,6 +5047,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
m_enable_multisig = false;
m_allow_mismatched_daemon_version = false;
m_custom_background_key = boost::none;
@@ -1257,7 +1070,7 @@ index 4f58d7aea..1b3a66279 100644
}
else if(json.IsObject())
{
-@@ -5269,6 +5289,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5268,6 +5288,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, background_sync_type, BackgroundSyncType, Int, false, BackgroundSyncOff);
m_background_sync_type = field_background_sync_type;
@@ -1267,7 +1080,7 @@ index 4f58d7aea..1b3a66279 100644
// Load encryption key used to encrypt background cache
crypto::chacha_key custom_background_key;
m_custom_background_key = boost::none;
-@@ -5588,6 +5611,48 @@ void wallet2::init_type(hw::device::device_type device_type)
+@@ -5587,6 +5610,48 @@ void wallet2::init_type(hw::device::device_type device_type)
m_key_device_type = device_type;
}
@@ -1316,7 +1129,7 @@ index 4f58d7aea..1b3a66279 100644
/*!
* \brief Generates a wallet or restores one. Assumes the multisig setup
* has already completed for the provided multisig info.
-@@ -5715,7 +5780,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5714,7 +5779,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
return retval;
}
@@ -1325,7 +1138,7 @@ index 4f58d7aea..1b3a66279 100644
{
// -1 month for fluctuations in block time and machine date/time setup.
// avg seconds per block
-@@ -5739,7 +5804,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5738,7 +5803,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
// the daemon is currently syncing.
// If we use the approximate height we subtract one month as
// a safety margin.
@@ -1334,7 +1147,7 @@ index 4f58d7aea..1b3a66279 100644
uint64_t target_height = get_daemon_blockchain_target_height(err);
if (err.empty()) {
if (target_height < height)
-@@ -13636,7 +13701,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
+@@ -13635,7 +13700,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
return target_height;
}
@@ -1343,7 +1156,7 @@ index 4f58d7aea..1b3a66279 100644
{
// time of v2 fork
const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658;
-@@ -13645,7 +13710,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const
+@@ -13644,7 +13709,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const
// avg seconds per block
const int seconds_per_block = DIFFICULTY_TARGET_V2;
// Calculated blockchain height
@@ -1352,7 +1165,7 @@ index 4f58d7aea..1b3a66279 100644
// testnet and stagenet got some huge rollbacks, so the estimation is way off
static const uint64_t approximate_rolled_back_blocks = m_nettype == TESTNET ? 342100 : m_nettype == STAGENET ? 60000 : 30000;
if ((m_nettype == TESTNET || m_nettype == STAGENET) && approx_blockchain_height > approximate_rolled_back_blocks)
-@@ -15784,15 +15849,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
+@@ -15783,15 +15848,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
//----------------------------------------------------------------------------------------------------
uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day)
{
@@ -1368,7 +1181,7 @@ index 4f58d7aea..1b3a66279 100644
std::tm date = { 0, 0, 0, 0, 0, 0, 0, 0 };
date.tm_year = year - 1900;
date.tm_mon = month - 1;
-@@ -15801,7 +15857,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
+@@ -15800,7 +15856,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
{
throw std::runtime_error("month or day out of range");
}
@@ -1393,7 +1206,7 @@ index 4f58d7aea..1b3a66279 100644
uint64_t height_min = 0;
uint64_t height_max = get_daemon_blockchain_height(err) - 1;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 1d7e430b9..91cf2a376 100644
+index 1d7e430..91cf2a3 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -72,6 +72,7 @@
@@ -1469,5 +1282,5 @@ index 1d7e430b9..91cf2a376 100644
uint32_t m_multisig_threshold;
std::vector<crypto::public_key> m_multisig_signers;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0010-coin-control.patch b/patches/monero/0009-coin-control.patch
index c6ec734..1aac12a 100644
--- a/patches/monero/0010-coin-control.patch
+++ b/patches/monero/0009-coin-control.patch
@@ -1,7 +1,7 @@
-From 71fee81e40348ebf18995033fbf42e64d7522c6d Mon Sep 17 00:00:00 2001
+From 4d897d9ee1d24710500f4d58e9ccd79fb48cf1d2 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 11:07:57 +0100
-Subject: [PATCH 10/12] coin control
+Subject: [PATCH 09/14] coin control
---
src/simplewallet/simplewallet.cpp | 2 +-
@@ -22,7 +22,7 @@ Subject: [PATCH 10/12] coin control
create mode 100644 src/wallet/api/coins_info.h
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index 2c51337ef..645bd37e2 100644
+index 2c51337..645bd37 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -6930,7 +6930,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
@@ -35,7 +35,7 @@ index 2c51337ef..645bd37e2 100644
if (ptx_vector.empty())
{
diff --git a/src/wallet/api/CMakeLists.txt b/src/wallet/api/CMakeLists.txt
-index af7948d8a..bb740e2ac 100644
+index af7948d..bb740e2 100644
--- a/src/wallet/api/CMakeLists.txt
+++ b/src/wallet/api/CMakeLists.txt
@@ -40,7 +40,9 @@ set(wallet_api_sources
@@ -62,7 +62,7 @@ index af7948d8a..bb740e2ac 100644
${wallet_api_private_headers})
diff --git a/src/wallet/api/coins.cpp b/src/wallet/api/coins.cpp
new file mode 100644
-index 000000000..ef12141cf
+index 0000000..ef12141
--- /dev/null
+++ b/src/wallet/api/coins.cpp
@@ -0,0 +1,186 @@
@@ -254,7 +254,7 @@ index 000000000..ef12141cf
+} // namespace
diff --git a/src/wallet/api/coins.h b/src/wallet/api/coins.h
new file mode 100644
-index 000000000..b7a0a8642
+index 0000000..b7a0a86
--- /dev/null
+++ b/src/wallet/api/coins.h
@@ -0,0 +1,40 @@
@@ -300,7 +300,7 @@ index 000000000..b7a0a8642
+#endif //FEATHER_COINS_H
diff --git a/src/wallet/api/coins_info.cpp b/src/wallet/api/coins_info.cpp
new file mode 100644
-index 000000000..5f2c4e1e4
+index 0000000..5f2c4e1
--- /dev/null
+++ b/src/wallet/api/coins_info.cpp
@@ -0,0 +1,122 @@
@@ -428,7 +428,7 @@ index 000000000..5f2c4e1e4
+namespace Bitmonero = Monero;
diff --git a/src/wallet/api/coins_info.h b/src/wallet/api/coins_info.h
new file mode 100644
-index 000000000..c43e45abd
+index 0000000..c43e45a
--- /dev/null
+++ b/src/wallet/api/coins_info.h
@@ -0,0 +1,71 @@
@@ -504,7 +504,7 @@ index 000000000..c43e45abd
+
+#endif //FEATHER_COINS_INFO_H
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e74fa0884..66c1e45a6 100644
+index 67ac90a..6bb3a21 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -35,6 +35,7 @@
@@ -640,7 +640,7 @@ index e74fa0884..66c1e45a6 100644
{
return m_subaddress.get();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index 32e12284b..a82f270e4 100644
+index 32e1228..a82f270 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -46,6 +46,7 @@ class PendingTransactionImpl;
@@ -693,7 +693,7 @@ index 32e12284b..a82f270e4 100644
// multi-threaded refresh stuff
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index be1c3704e..013b5bcba 100644
+index be1c370..013b5bc 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -263,6 +263,51 @@ struct AddressBook
@@ -777,7 +777,7 @@ index be1c3704e..013b5bcba 100644
virtual SubaddressAccount * subaddressAccount() = 0;
virtual void setListener(WalletListener *) = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 1b3a66279..007ec384c 100644
+index fa346a9..d060bf9 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2094,12 +2094,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
@@ -837,7 +837,7 @@ index 1b3a66279..007ec384c 100644
transfer_details &td = m_transfers[kit->second];
td.m_block_height = height;
td.m_internal_output_index = o;
-@@ -10501,7 +10524,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
+@@ -10500,7 +10523,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
LOG_PRINT_L2("transfer_selected_rct done");
}
@@ -846,7 +846,7 @@ index 1b3a66279..007ec384c 100644
{
std::vector<size_t> picks;
float current_output_relatdness = 1.0f;
-@@ -10512,6 +10535,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10511,6 +10534,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -856,7 +856,7 @@ index 1b3a66279..007ec384c 100644
if (!is_spent(td, false) && !td.m_frozen && td.is_rct() && td.amount() >= needed_money && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1)
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
-@@ -10532,6 +10558,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10531,6 +10557,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -866,7 +866,7 @@ index 1b3a66279..007ec384c 100644
if (!is_spent(td, false) && !td.m_frozen && !td.m_key_image_partial && td.is_rct() && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1)
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
-@@ -10543,6 +10572,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10542,6 +10571,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t j = i + 1; j < m_transfers.size(); ++j)
{
const transfer_details& td2 = m_transfers[j];
@@ -876,7 +876,7 @@ index 1b3a66279..007ec384c 100644
if (td2.amount() > m_ignore_outputs_above || td2.amount() < m_ignore_outputs_below)
{
MDEBUG("Ignoring output " << j << " of amount " << print_money(td2.amount()) << " which is outside prescribed range [" << print_money(m_ignore_outputs_below) << ", " << print_money(m_ignore_outputs_above) << "]");
-@@ -11115,7 +11147,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
+@@ -11114,7 +11146,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
// This system allows for sending (almost) the entire balance, since it does
// not generate spurious change in all txes, thus decreasing the instantaneous
// usable balance.
@@ -885,7 +885,7 @@ index 1b3a66279..007ec384c 100644
{
//ensure device is let in NONE mode in any case
hw::device &hwdev = m_account.get_device();
-@@ -11323,6 +11355,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11322,6 +11354,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -895,7 +895,7 @@ index 1b3a66279..007ec384c 100644
if (m_ignore_fractional_outputs && td.amount() < fractional_threshold)
{
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold));
-@@ -11414,7 +11449,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11413,7 +11448,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
// will get us a known fee.
uint64_t estimated_fee = estimate_fee(use_per_byte_fee, use_rct, 2, fake_outs_count, 2, extra.size(), bulletproof, clsag, bulletproof_plus, use_view_tags, base_fee, fee_quantization_mask);
total_needed_money = needed_money + (subtract_fee_from_outputs.size() ? 0 : estimated_fee);
@@ -904,7 +904,7 @@ index 1b3a66279..007ec384c 100644
if (!preferred_inputs.empty())
{
string s;
-@@ -11893,7 +11928,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
+@@ -11892,7 +11927,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
return true;
}
@@ -913,7 +913,7 @@ index 1b3a66279..007ec384c 100644
{
std::vector<size_t> unused_transfers_indices;
std::vector<size_t> unused_dust_indices;
-@@ -11922,6 +11957,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
+@@ -11921,6 +11956,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -924,7 +924,7 @@ index 1b3a66279..007ec384c 100644
{
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below threshold " << print_money(fractional_threshold));
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 91cf2a376..bc16d528c 100644
+index 91cf2a3..bc16d52 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1209,8 +1209,8 @@ private:
@@ -975,5 +975,5 @@ index 91cf2a376..bc16d528c 100644
void set_unspent(size_t idx);
bool is_spent(const transfer_details &td, bool strict = true) const;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/monero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
index d026065..6917daa 100644
--- a/patches/monero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
+++ b/patches/monero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
@@ -1,7 +1,7 @@
-From c7bf71b5069ba8ea71022fab516b40bf85da2a79 Mon Sep 17 00:00:00 2001
+From 42aca87b69ecdc9fb24d14dd947f8bbffc7f3500 Mon Sep 17 00:00:00 2001
From: M <m@cakewallet.com>
Date: Fri, 21 Apr 2023 15:43:47 -0400
-Subject: [PATCH 11/12] Add hex encoding and tx key getter for
+Subject: [PATCH 10/14] Add hex encoding and tx key getter for
PendingTransction in wallet api.
---
@@ -11,7 +11,7 @@ Subject: [PATCH 11/12] Add hex encoding and tx key getter for
3 files changed, 20 insertions(+)
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp
-index 9c3c26ee5..1f714d229 100644
+index 9c3c26e..1f714d2 100644
--- a/src/wallet/api/pending_transaction.cpp
+++ b/src/wallet/api/pending_transaction.cpp
@@ -80,6 +80,22 @@ std::vector<std::string> PendingTransactionImpl::txid() const
@@ -38,7 +38,7 @@ index 9c3c26ee5..1f714d229 100644
{
diff --git a/src/wallet/api/pending_transaction.h b/src/wallet/api/pending_transaction.h
-index 403bfe281..0cc6c58e9 100644
+index 403bfe2..0cc6c58 100644
--- a/src/wallet/api/pending_transaction.h
+++ b/src/wallet/api/pending_transaction.h
@@ -59,6 +59,8 @@ public:
@@ -51,7 +51,7 @@ index 403bfe281..0cc6c58e9 100644
private:
friend class WalletImpl;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 013b5bcba..f421fdc05 100644
+index 013b5bc..f421fdc 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -127,6 +127,8 @@ struct PendingTransaction
@@ -64,5 +64,5 @@ index 013b5bcba..f421fdc05 100644
/**
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0012-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch
index a4bda2c..12d82ff 100644
--- a/patches/monero/0012-Add-recoverDeterministicWalletFromSpendKey.patch
+++ b/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch
@@ -1,7 +1,7 @@
-From a9977b076cf6aa260059bd272abbf1af580d2f72 Mon Sep 17 00:00:00 2001
+From ccddf3be96fd08d1eccbb58a7e8f8c98d07b07f2 Mon Sep 17 00:00:00 2001
From: Konstantin Ullrich <konstantinullrich12@gmail.com>
Date: Wed, 11 Oct 2023 16:47:59 +0200
-Subject: [PATCH 12/12] Add recoverDeterministicWalletFromSpendKey
+Subject: [PATCH 11/14] Add recoverDeterministicWalletFromSpendKey
This function is used by Cake Wallet to enable polyseed (dart implementation)
support.
@@ -19,7 +19,7 @@ Co-authored-by: Godwin Asuquo <godilite@gmail.com>
5 files changed, 75 insertions(+)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 66c1e45a6..cb09db8b2 100644
+index 6bb3a21..5734aff 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -824,6 +824,35 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c
@@ -59,7 +59,7 @@ index 66c1e45a6..cb09db8b2 100644
{
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index a82f270e4..9e1fbb40b 100644
+index a82f270..9e1fbb4 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -77,6 +77,10 @@ public:
@@ -74,7 +74,7 @@ index a82f270e4..9e1fbb40b 100644
const std::string &password,
const std::string &device_name);
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index f421fdc05..c8d6bb179 100644
+index f421fdc..c8d6bb1 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -1323,6 +1323,25 @@ struct WalletManager
@@ -104,7 +104,7 @@ index f421fdc05..c8d6bb179 100644
* \deprecated this method creates a wallet WITHOUT a passphrase, use createWalletFromKeys(..., password, ...) instead
* \brief recovers existing wallet using keys. Creates a view only wallet if spend key is omitted
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index c79fe25d6..f88bd9e64 100644
+index da2056d..c200f52 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -127,6 +127,22 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
@@ -131,7 +131,7 @@ index c79fe25d6..f88bd9e64 100644
const std::string &password,
NetworkType nettype,
diff --git a/src/wallet/api/wallet_manager.h b/src/wallet/api/wallet_manager.h
-index 28fcd36c9..be3ff8184 100644
+index 28fcd36..be3ff81 100644
--- a/src/wallet/api/wallet_manager.h
+++ b/src/wallet/api/wallet_manager.h
@@ -67,6 +67,13 @@ public:
@@ -149,5 +149,5 @@ index 28fcd36c9..be3ff8184 100644
const std::string &password,
NetworkType nettype,
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0013-add-monero-submodule-support.patch b/patches/monero/0012-add-monero-submodule-support.patch
index 97dcc90..d993a14 100644
--- a/patches/monero/0013-add-monero-submodule-support.patch
+++ b/patches/monero/0012-add-monero-submodule-support.patch
@@ -1,7 +1,7 @@
-From c7a565ce333b11e4eaa25a1cf6035837146273d7 Mon Sep 17 00:00:00 2001
+From d8ab8f6fffd6235e935400f0fe750c1ba29b85e7 Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Thu, 7 Nov 2024 16:46:24 +0000
-Subject: [PATCH] add monero submodule support
+Subject: [PATCH 12/14] add monero submodule support
---
CMakeLists.txt | 6 +++---
@@ -10,7 +10,7 @@ Subject: [PATCH] add monero submodule support
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e7fa90abb..b995a68b2 100644
+index e7fa90a..b995a68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,9 +223,9 @@ function(forbid_undefined_symbols)
@@ -35,7 +35,7 @@ index e7fa90abb..b995a68b2 100644
if (NOT DEFINED ENV{DEVELOPER_LOCAL_TOOLS})
message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env (not required)")
diff --git a/cmake/CheckLinkerFlag.cmake b/cmake/CheckLinkerFlag.cmake
-index 7ecf5f610..89fb9d167 100644
+index 7ecf5f6..89fb9d1 100644
--- a/cmake/CheckLinkerFlag.cmake
+++ b/cmake/CheckLinkerFlag.cmake
@@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
@@ -48,7 +48,7 @@ index 7ecf5f610..89fb9d167 100644
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${flag}")
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index d24b4c563..91f692599 100644
+index d24b4c5..91f6925 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -1163,7 +1163,7 @@ namespace tools
@@ -61,5 +61,5 @@ index d24b4c563..91f692599 100644
if (ptx_vector.empty())
{
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0014-fix-iOS-depends-build.patch b/patches/monero/0013-fix-iOS-depends-build.patch
index fd01f9e..97c23c6 100644
--- a/patches/monero/0014-fix-iOS-depends-build.patch
+++ b/patches/monero/0013-fix-iOS-depends-build.patch
@@ -1,7 +1,7 @@
-From 40d2ef7f253aafc16796c9465cd0d0a68ffeaa16 Mon Sep 17 00:00:00 2001
+From dcb483e5cb97c4e3c500355d8225bd49d3e0ae7f Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 21 Nov 2024 06:05:03 -0500
-Subject: [PATCH] fix iOS depends build
+Subject: [PATCH 13/14] fix iOS depends build
---
CMakeLists.txt | 4 ----
@@ -11,7 +11,7 @@ Subject: [PATCH] fix iOS depends build
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0d0a0e3..809bce6 100644
+index b995a68..4e86328 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,10 +39,6 @@ include(CheckLibraryExists)
diff --git a/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch b/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch
index 666e64d..4cd1d0c 100644
--- a/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch
+++ b/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch
@@ -1,7 +1,7 @@
-From c66deda1792f4955e4175b4e47af54bd2a7d7b24 Mon Sep 17 00:00:00 2001
+From dfe8fde34cd51f5d5ec95fb464737f6e447d41bb Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 18 Nov 2024 10:57:37 -0500
-Subject: [PATCH] include locale only when targeting WIN32
+Subject: [PATCH 14/14] include locale only when targeting WIN32
---
CMakeLists.txt | 5 ++++-
@@ -9,10 +9,10 @@ Subject: [PATCH] include locale only when targeting WIN32
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b995a68..0d0a0e3 100644
+index 4e86328..809bce6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1083,7 +1083,10 @@ if(STATIC)
+@@ -1079,7 +1079,10 @@ if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
@@ -25,7 +25,7 @@ index b995a68..0d0a0e3 100644
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 17d1625..995c45c 100644
+index 5734aff..f4fb093 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -46,7 +46,9 @@
@@ -37,7 +37,7 @@ index 17d1625..995c45c 100644
+#endif
#include <boost/filesystem.hpp>
#include "bc-ur/src/bc-ur.hpp"
- #ifdef HIDAPI_DUMMY
+ #if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
--
2.39.5 (Apple Git-154)
diff --git a/patches/monero/0015-ledger-dummy-fix.patch b/patches/monero/0015-ledger-dummy-fix.patch
deleted file mode 100644
index e8654b9..0000000
--- a/patches/monero/0015-ledger-dummy-fix.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From ebb4f7509127d1d442732da92aa96a1718b57698 Mon Sep 17 00:00:00 2001
-From: cyan <cyjan@mrcyjanek.net>
-Date: Tue, 26 Nov 2024 00:31:15 +0000
-Subject: [PATCH] ledger dummy fix
-
----
- src/device/device_io_dummy.cpp | 2 +-
- src/device/device_io_dummy.hpp | 2 +-
- src/device/device_ledger.hpp | 2 +-
- src/wallet/api/wallet.cpp | 36 +++++++++++++++++-----------------
- 4 files changed, 21 insertions(+), 21 deletions(-)
-
-diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
-index 9fe4040a7..edb4beea3 100644
---- a/src/device/device_io_dummy.cpp
-+++ b/src/device/device_io_dummy.cpp
-@@ -38,7 +38,7 @@
- // Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
- // own USB/BLE/other transport layer.
-
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
- #include <boost/scope_exit.hpp>
- #include "log.hpp"
- #include "device_io_dummy.hpp"
-diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
-index a1733616d..4a4807121 100644
---- a/src/device/device_io_dummy.hpp
-+++ b/src/device/device_io_dummy.hpp
-@@ -26,7 +26,7 @@
- // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- //
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
-
- #pragma once
-
-diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 506f27c4a..39454ca6d 100644
---- a/src/device/device_ledger.hpp
-+++ b/src/device/device_ledger.hpp
-@@ -149,7 +149,7 @@ namespace hw {
- mutable boost::mutex command_locker;
-
- //IO
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
- hw::io::device_io_dummy hw_device;
- #else
- hw::io::device_io_hid hw_device;
-diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 995c45c1d..1cfeea619 100644
---- a/src/wallet/api/wallet.cpp
-+++ b/src/wallet/api/wallet.cpp
-@@ -3339,8 +3339,8 @@ uint64_t WalletImpl::getBytesSent()
-
- // HIDAPI_DUMMY
- bool WalletImpl::getStateIsConnected() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::stateIsConnected;
-@@ -3348,8 +3348,8 @@ bool WalletImpl::getStateIsConnected() {
- }
-
- unsigned char* WalletImpl::getSendToDevice() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return {};
- #else
- return hw::io::device_io_dummy::sendToDevice;
-@@ -3357,8 +3357,8 @@ unsigned char* WalletImpl::getSendToDevice() {
- }
-
- size_t WalletImpl::getSendToDeviceLength() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return -1;
- #else
- return hw::io::device_io_dummy::sendToDeviceLength;
-@@ -3366,8 +3366,8 @@ size_t WalletImpl::getSendToDeviceLength() {
- }
-
- unsigned char* WalletImpl::getReceivedFromDevice() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return {};
- #else
- return hw::io::device_io_dummy::receivedFromDevice;
-@@ -3375,8 +3375,8 @@ unsigned char* WalletImpl::getReceivedFromDevice() {
- }
-
- size_t WalletImpl::getReceivedFromDeviceLength() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return -1;
- #else
- return hw::io::device_io_dummy::receivedFromDeviceLength;
-@@ -3384,8 +3384,8 @@ size_t WalletImpl::getReceivedFromDeviceLength() {
- }
-
- bool WalletImpl::getWaitsForDeviceSend() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::receivedFromDeviceLength;
-@@ -3393,8 +3393,8 @@ bool WalletImpl::getWaitsForDeviceSend() {
- }
-
- bool WalletImpl::getWaitsForDeviceReceive() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::waitsForDeviceReceive;
-@@ -3402,8 +3402,8 @@ bool WalletImpl::getWaitsForDeviceReceive() {
- }
-
- void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return;
- #else
- hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
-@@ -3415,8 +3415,8 @@ void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
- }
-
- void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return;
- #else
- hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
---
-2.43.0
-
diff --git a/patches/monero/0020-catch-exception-in-queryWalletDevice.patch b/patches/monero/0020-catch-exception-in-queryWalletDevice.patch
deleted file mode 100644
index 1fb2471..0000000
--- a/patches/monero/0020-catch-exception-in-queryWalletDevice.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d0774a747e7520f6dae3cf90ecbb682395da8c9c Mon Sep 17 00:00:00 2001
-From: cyan <cyjan@mrcyjanek.net>
-Date: Wed, 27 Nov 2024 23:28:32 +0000
-Subject: [PATCH] catch exception in queryWalletDevice
-
----
- src/wallet/api/wallet_manager.cpp | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index f88bd9e64..c200f52ae 100644
---- a/src/wallet/api/wallet_manager.cpp
-+++ b/src/wallet/api/wallet_manager.cpp
-@@ -213,10 +213,14 @@ bool WalletManagerImpl::verifyWalletPassword(const std::string &keys_file_name,
-
- bool WalletManagerImpl::queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds) const
- {
-- hw::device::device_type type;
-- bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
-- device_type = static_cast<Wallet::Device>(type);
-- return r;
-+ try {
-+ hw::device::device_type type;
-+ bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
-+ device_type = static_cast<Wallet::Device>(type);
-+ return r;
-+ } catch (...) {
-+ return false;
-+ }
- }
-
- std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
---
-2.43.0
-