mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 07:41:32 +02:00
remove finalize multisig from c++ library
This commit is contained in:
@@ -2775,26 +2775,6 @@ namespace monero {
|
||||
return result;
|
||||
}
|
||||
|
||||
string monero_wallet::finalize_multisig(const vector<string>& multisig_hexes, const string& password) {
|
||||
|
||||
// validate state and request
|
||||
bool ready;
|
||||
uint32_t threshold, total;
|
||||
if (!m_w2->multisig(&ready, &threshold, &total)) throw new runtime_error("This wallet is not multisig");
|
||||
if (ready) throw runtime_error("This wallet is multisig, and already finalized");
|
||||
if (multisig_hexes.size() < 1 || multisig_hexes.size() > total) throw runtime_error("Needs multisig info from more participants");
|
||||
|
||||
// do not refresh while finalizing multisig
|
||||
boost::lock_guard<boost::mutex> guarg(m_sync_mutex);
|
||||
|
||||
// finalize multisig
|
||||
bool success = m_w2->finalize_multisig(epee::wipeable_string(password), multisig_hexes);
|
||||
if (!success) throw runtime_error("Error calling finalize_multisig");
|
||||
|
||||
// return the multisig wallet's primary address
|
||||
return m_w2->get_account().get_public_address_str(m_w2->nettype());
|
||||
}
|
||||
|
||||
monero_multisig_init_result monero_wallet::exchange_multisig_keys(const vector<string>& multisig_hexes, const string& password) {
|
||||
|
||||
// validate state and args
|
||||
|
||||
@@ -1310,17 +1310,6 @@ namespace monero {
|
||||
*/
|
||||
monero_multisig_init_result make_multisig(const vector<string>& multisig_hexes, int threshold, const string& password);
|
||||
|
||||
/**
|
||||
* Finalize a N-1/N multisig wallet.
|
||||
*
|
||||
* TODO monero core: this is a special case of exchangeMultisigKeys() for N-1/N multisig. use that as the last step instead and remove this? that would further generalize the process
|
||||
*
|
||||
* @param multisig_hexes are multisig hex from each participant
|
||||
* @param password is the wallet's password // TODO monero core: redundant? wallet is created with password
|
||||
* @return the multisig wallet's address
|
||||
*/
|
||||
string finalize_multisig(const vector<string>& multisig_hexes, const string& password);
|
||||
|
||||
/**
|
||||
* Exchange multisig hex with participants in a M/N multisig wallet.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user