wallet_api: getPassword

pull/402/head
tobtoht 3 years ago committed by wowario
parent bad59c1225
commit 78e3ea51d6

@ -855,7 +855,7 @@ bool WalletImpl::setPassword(const std::string &password)
return status() == Status_Ok; return status() == Status_Ok;
} }
std::string WalletImpl::getPassword() const const std::string& WalletImpl::getPassword() const
{ {
return m_password; return m_password;
} }

@ -96,7 +96,7 @@ public:
std::string errorString() const override; std::string errorString() const override;
void statusWithErrorString(int& status, std::string& errorString) const override; void statusWithErrorString(int& status, std::string& errorString) const override;
bool setPassword(const std::string &password) override; bool setPassword(const std::string &password) override;
std::string getPassword() const override; const std::string& getPassword() const override;
bool setDevicePin(const std::string &password) override; bool setDevicePin(const std::string &password) override;
bool setDevicePassphrase(const std::string &password) override; bool setDevicePassphrase(const std::string &password) override;
std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const override; std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const override;

@ -552,7 +552,7 @@ struct Wallet
//! returns both error and error string atomically. suggested to use in instead of status() and errorString() //! returns both error and error string atomically. suggested to use in instead of status() and errorString()
virtual void statusWithErrorString(int& status, std::string& errorString) const = 0; virtual void statusWithErrorString(int& status, std::string& errorString) const = 0;
virtual bool setPassword(const std::string &password) = 0; virtual bool setPassword(const std::string &password) = 0;
virtual std::string getPassword() const = 0; virtual const std::string& getPassword() const = 0;
virtual bool setDevicePin(const std::string &pin) { (void)pin; return false; }; virtual bool setDevicePin(const std::string &pin) { (void)pin; return false; };
virtual bool setDevicePassphrase(const std::string &passphrase) { (void)passphrase; return false; }; virtual bool setDevicePassphrase(const std::string &passphrase) { (void)passphrase; return false; };
virtual std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const = 0; virtual std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const = 0;

Loading…
Cancel
Save