diff --git a/src/ga_session.cpp b/src/ga_session.cpp index 358109372..347cccd12 100644 --- a/src/ga_session.cpp +++ b/src/ga_session.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "assertion.hpp" @@ -66,20 +65,6 @@ namespace green { static const std::array TX_NTFY_FIELDS = { "subaccounts", "txhash", "value", TXN_OPTIONAL }; - // TODO: too slow. lacks validation. - static std::array uint256_to_base256(const std::string& input) - { - constexpr size_t base = 256; - - std::array repr{}; - size_t i = repr.size() - 1; - for (boost::multiprecision::checked_uint256_t num(input); num; num = num / base, --i) { - repr[i] = static_cast(num % base); - } - - return repr; - } - static bool ignore_tx_notification(const nlohmann::json& details) { for (const auto& item : details.items()) { @@ -351,19 +336,6 @@ namespace green { return m_nlocktimes; } - std::pair ga_session::sign_challenge( - session_impl::locker_t& locker, const std::string& challenge) - { - GDK_RUNTIME_ASSERT(locker.owns_lock()); - GDK_RUNTIME_ASSERT(m_signer); - - const auto path_bytes = get_random_bytes<8>(); - const auto path = bytes_to_bip32_path(path_bytes); - const auto challenge_hash = uint256_to_base256(challenge); - - return { sig_only_to_der_hex(m_signer->ecdsa_sign(path, challenge_hash)), b2h(path_bytes) }; - } - void ga_session::set_fee_estimates(session_impl::locker_t& locker, const nlohmann::json& fee_estimates) { GDK_RUNTIME_ASSERT(locker.owns_lock()); diff --git a/src/ga_session.hpp b/src/ga_session.hpp index d8667f439..6022a80c8 100644 --- a/src/ga_session.hpp +++ b/src/ga_session.hpp @@ -192,8 +192,6 @@ namespace green { const std::string& name, const std::string& receiving_id, const std::optional& recovery_key, uint32_t required_ca); - std::pair sign_challenge(locker_t& locker, const std::string& challenge); - void set_fee_estimates(locker_t& locker, const nlohmann::json& fee_estimates); nlohmann::json refresh_http_data(const std::string& page, const std::string& key, bool refresh);