From 26971d46fc06b8be4a6ecc0309f2650f354ddc91 Mon Sep 17 00:00:00 2001 From: naughtyfox Date: Mon, 10 Sep 2018 19:18:25 +0300 Subject: WalletAPI: 'hasMultisigPartialKeyImages' function added --- src/wallet/api/wallet.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/wallet/api/wallet.cpp') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 7b4ad27e4..43a023d3c 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1244,6 +1244,20 @@ size_t WalletImpl::importMultisigImages(const vector& images) { 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) { try { clearStatus(); -- cgit v1.2.3