mirror of
https://github.com/monero-project/monero.git
synced 2025-05-19 21:50:24 -04:00
wallet: API changes to enable passphrase entry
This commit is contained in:
parent
fe3403c8f0
commit
827f52add0
4 changed files with 37 additions and 10 deletions
|
@ -57,9 +57,14 @@ Wallet *WalletManagerImpl::createWallet(const std::string &path, const std::stri
|
|||
return wallet;
|
||||
}
|
||||
|
||||
Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string &password, NetworkType nettype, uint64_t kdf_rounds)
|
||||
Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string &password, NetworkType nettype, uint64_t kdf_rounds, WalletListener * listener)
|
||||
{
|
||||
WalletImpl * wallet = new WalletImpl(nettype, kdf_rounds);
|
||||
wallet->setListener(listener);
|
||||
if (listener){
|
||||
listener->onSetWallet(wallet);
|
||||
}
|
||||
|
||||
wallet->open(path, password);
|
||||
//Refresh addressBook
|
||||
wallet->addressBook()->refresh();
|
||||
|
@ -122,9 +127,15 @@ Wallet *WalletManagerImpl::createWalletFromDevice(const std::string &path,
|
|||
const std::string &deviceName,
|
||||
uint64_t restoreHeight,
|
||||
const std::string &subaddressLookahead,
|
||||
uint64_t kdf_rounds)
|
||||
uint64_t kdf_rounds,
|
||||
WalletListener * listener)
|
||||
{
|
||||
WalletImpl * wallet = new WalletImpl(nettype, kdf_rounds);
|
||||
wallet->setListener(listener);
|
||||
if (listener){
|
||||
listener->onSetWallet(wallet);
|
||||
}
|
||||
|
||||
if(restoreHeight > 0){
|
||||
wallet->setRefreshFromBlockHeight(restoreHeight);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue