From 30a52e4d0e79e77abc34f6bee2956bfe2ed53ee0 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 18 Aug 2019 19:32:20 -0400 Subject: [PATCH] implement is_multisig_import_needed() --- src/wallet/monero_wallet.cpp | 8 +++++++- src/wallet/monero_wallet.h | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 0d5f269..e241f8a 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -2554,8 +2554,14 @@ namespace monero { m_w2->deinit(); } + bool monero_wallet::is_multisig_import_needed() const { + return m_w2->multisig() && m_w2->has_multisig_partial_key_images(); + } + monero_multisig_info monero_wallet::get_multisig_info() { - throw runtime_error("get_multisig_info not implemented"); + monero_multisig_info info; + info.m_is_multisig = m_w2->multisig(&info.m_is_ready, &info.m_threshold, &info.m_num_participants); + return info; } string monero_wallet::prepare_multisig() { diff --git a/src/wallet/monero_wallet.h b/src/wallet/monero_wallet.h index 684a351..8d1eb45 100644 --- a/src/wallet/monero_wallet.h +++ b/src/wallet/monero_wallet.h @@ -1319,6 +1319,13 @@ namespace monero { */ void close(); + /** + * Indicates if importing multisig data is needed for returning a correct balance. + * + * @return true if importing multisig data is needed for returning a correct balance, false otherwise + */ + bool is_multisig_import_needed() const; + // bool is_multisig() /**