MCPcopy Create free account
hub / github.com/ElementsProject/elements / requestUnlock

Method requestUnlock

src/qt/walletmodel.cpp:480–492  ·  view source on GitHub ↗

WalletModel::UnlockContext implementation

Source from the content-addressed store, hash-verified

478
479// WalletModel::UnlockContext implementation
480WalletModel::UnlockContext WalletModel::requestUnlock()
481{
482 bool was_locked = getEncryptionStatus() == Locked;
483 if(was_locked)
484 {
485 // Request UI to unlock wallet
486 Q_EMIT requireUnlock();
487 }
488 // If wallet is still locked, unlock was failed or cancelled, mark context as invalid
489 bool valid = getEncryptionStatus() != Locked;
490
491 return UnlockContext(this, valid, was_locked);
492}
493
494WalletModel::UnlockContext::UnlockContext(WalletModel *_wallet, bool _valid, bool _relock):
495 wallet(_wallet),

Callers 4

signTransactionMethod · 0.80
PrepareSendTextMethod · 0.80
addRowMethod · 0.80

Calls 1

UnlockContextClass · 0.85

Tested by

no test coverage detected