mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 23:31:32 +02:00
supprt is_multisig(), throw error if relay=true on multisig create_txs()
This commit is contained in:
@@ -1196,14 +1196,21 @@ namespace monero {
|
||||
throw std::runtime_error("is_multisig_import_needed() not supported");
|
||||
}
|
||||
|
||||
// TODO: bool is_multisig()
|
||||
/**
|
||||
* Indicates if this wallet is a multisig wallet.
|
||||
*
|
||||
* @return true if this is a multisig wallet, false otherwise
|
||||
*/
|
||||
virtual bool is_multisig() const {
|
||||
return get_multisig_info().m_is_multisig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get multisig info about this wallet.
|
||||
*
|
||||
* @return multisig info about this wallet
|
||||
*/
|
||||
virtual monero_multisig_info get_multisig_info() {
|
||||
virtual monero_multisig_info get_multisig_info() const {
|
||||
throw std::runtime_error("get_multisig_info() not supported");
|
||||
}
|
||||
|
||||
|
||||
@@ -1735,6 +1735,7 @@ namespace monero {
|
||||
bool get_tx_hex = true;
|
||||
bool get_tx_metadata = true;
|
||||
bool relay = config.m_relay != boost::none && config.m_relay.get();
|
||||
if (config.m_relay != boost::none && config.m_relay.get() == true && is_multisig()) throw std::runtime_error("Cannot relay multisig trasaction until co-signed");
|
||||
|
||||
// commit txs (if relaying) and get response using wallet rpc's fill_response()
|
||||
std::list<std::string> tx_keys;
|
||||
@@ -2922,7 +2923,7 @@ namespace monero {
|
||||
return m_w2->multisig() && m_w2->has_multisig_partial_key_images();
|
||||
}
|
||||
|
||||
monero_multisig_info monero_wallet_core::get_multisig_info() {
|
||||
monero_multisig_info monero_wallet_core::get_multisig_info() const {
|
||||
monero_multisig_info info;
|
||||
info.m_is_multisig = m_w2->multisig(&info.m_is_ready, &info.m_threshold, &info.m_num_participants);
|
||||
return info;
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace monero {
|
||||
void stop_mining() override;
|
||||
uint64_t wait_for_next_block() override;
|
||||
bool is_multisig_import_needed() const override;
|
||||
monero_multisig_info get_multisig_info() override;
|
||||
monero_multisig_info get_multisig_info() const override;
|
||||
std::string prepare_multisig() override;
|
||||
monero_multisig_init_result make_multisig(const std::vector<std::string>& multisig_hexes, int threshold, const std::string& password) override;
|
||||
monero_multisig_init_result exchange_multisig_keys(const std::vector<std::string>& mutisig_hexes, const std::string& password) override;
|
||||
|
||||
Reference in New Issue
Block a user