mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 13:47:47 +00:00
Merge pull request #4361
26971d46
WalletAPI: 'hasMultisigPartialKeyImages' function added (naughtyfox)
This commit is contained in:
commit
535bd0eb7e
3 changed files with 20 additions and 0 deletions
|
@ -1244,6 +1244,20 @@ size_t WalletImpl::importMultisigImages(const vector<string>& images) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WalletImpl::hasMultisigPartialKeyImages() const {
|
||||||
|
try {
|
||||||
|
clearStatus();
|
||||||
|
checkMultisigWalletReady(m_wallet);
|
||||||
|
|
||||||
|
return m_wallet->has_multisig_partial_key_images();
|
||||||
|
} catch (const exception& e) {
|
||||||
|
LOG_ERROR("Error on checking for partial multisig key images: ") << e.what();
|
||||||
|
setStatusError(string(tr("Failed to check for partial multisig key images: ")) + e.what());
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
PendingTransaction* WalletImpl::restoreMultisigTransaction(const string& signData) {
|
PendingTransaction* WalletImpl::restoreMultisigTransaction(const string& signData) {
|
||||||
try {
|
try {
|
||||||
clearStatus();
|
clearStatus();
|
||||||
|
|
|
@ -139,6 +139,7 @@ public:
|
||||||
bool finalizeMultisig(const std::vector<std::string>& extraMultisigInfo) override;
|
bool finalizeMultisig(const std::vector<std::string>& extraMultisigInfo) override;
|
||||||
bool exportMultisigImages(std::string& images) override;
|
bool exportMultisigImages(std::string& images) override;
|
||||||
size_t importMultisigImages(const std::vector<std::string>& images) override;
|
size_t importMultisigImages(const std::vector<std::string>& images) override;
|
||||||
|
bool hasMultisigPartialKeyImages() const override;
|
||||||
PendingTransaction* restoreMultisigTransaction(const std::string& signData) override;
|
PendingTransaction* restoreMultisigTransaction(const std::string& signData) override;
|
||||||
|
|
||||||
PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
|
PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
|
||||||
|
|
|
@ -720,6 +720,11 @@ struct Wallet
|
||||||
* @return number of imported images
|
* @return number of imported images
|
||||||
*/
|
*/
|
||||||
virtual size_t importMultisigImages(const std::vector<std::string>& images) = 0;
|
virtual size_t importMultisigImages(const std::vector<std::string>& images) = 0;
|
||||||
|
/**
|
||||||
|
* @brief hasMultisigPartialKeyImages - checks if wallet needs to import multisig key images from other participants
|
||||||
|
* @return true if there are partial key images
|
||||||
|
*/
|
||||||
|
virtual bool hasMultisigPartialKeyImages() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief restoreMultisigTransaction creates PendingTransaction from signData
|
* @brief restoreMultisigTransaction creates PendingTransaction from signData
|
||||||
|
|
Loading…
Reference in a new issue