mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
wallet api: allow wallet to fetch all key images via api
This commit is contained in:
parent
3bd6ed94d7
commit
50ff1066f5
3 changed files with 5 additions and 4 deletions
|
@ -1168,7 +1168,7 @@ bool WalletImpl::submitTransaction(const string &fileName) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WalletImpl::exportKeyImages(const string &filename)
|
bool WalletImpl::exportKeyImages(const string &filename, bool all)
|
||||||
{
|
{
|
||||||
if (m_wallet->watch_only())
|
if (m_wallet->watch_only())
|
||||||
{
|
{
|
||||||
|
@ -1178,7 +1178,7 @@ bool WalletImpl::exportKeyImages(const string &filename)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!m_wallet->export_key_images(filename))
|
if (!m_wallet->export_key_images(filename), all)
|
||||||
{
|
{
|
||||||
setStatusError(tr("failed to save file ") + filename);
|
setStatusError(tr("failed to save file ") + filename);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -164,7 +164,7 @@ public:
|
||||||
virtual PendingTransaction * createSweepUnmixableTransaction() override;
|
virtual PendingTransaction * createSweepUnmixableTransaction() override;
|
||||||
bool submitTransaction(const std::string &fileName) override;
|
bool submitTransaction(const std::string &fileName) override;
|
||||||
virtual UnsignedTransaction * loadUnsignedTx(const std::string &unsigned_filename) override;
|
virtual UnsignedTransaction * loadUnsignedTx(const std::string &unsigned_filename) override;
|
||||||
bool exportKeyImages(const std::string &filename) override;
|
bool exportKeyImages(const std::string &filename, bool all = false) override;
|
||||||
bool importKeyImages(const std::string &filename) override;
|
bool importKeyImages(const std::string &filename) override;
|
||||||
|
|
||||||
virtual void disposeTransaction(PendingTransaction * t) override;
|
virtual void disposeTransaction(PendingTransaction * t) override;
|
||||||
|
|
|
@ -901,9 +901,10 @@ struct Wallet
|
||||||
/*!
|
/*!
|
||||||
* \brief exportKeyImages - exports key images to file
|
* \brief exportKeyImages - exports key images to file
|
||||||
* \param filename
|
* \param filename
|
||||||
|
* \param all - export all key images or only those that have not yet been exported
|
||||||
* \return - true on success
|
* \return - true on success
|
||||||
*/
|
*/
|
||||||
virtual bool exportKeyImages(const std::string &filename) = 0;
|
virtual bool exportKeyImages(const std::string &filename, bool all = false) = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief importKeyImages - imports key images from file
|
* \brief importKeyImages - imports key images from file
|
||||||
|
|
Loading…
Reference in a new issue