WalletModel::UnlockContext implementation
| 478 | |
| 479 | // WalletModel::UnlockContext implementation |
| 480 | WalletModel::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 | |
| 494 | WalletModel::UnlockContext::UnlockContext(WalletModel *_wallet, bool _valid, bool _relock): |
| 495 | wallet(_wallet), |
no test coverage detected