({key, message})
| 189 | } |
| 190 | |
| 191 | async unlockKey({key, message}) { |
| 192 | const pwdControl = await createController('pwdDialog'); |
| 193 | const openPopup = this.ports.decryptCont || !await this.getPopup() && this.ports.dDialog; |
| 194 | const beforePasswordRequest = async id => await this.getPopup() && this.ports.dDialog.emit('show-pwd-dialog', {id}); |
| 195 | const unlockedKey = await pwdControl.unlockKey({ |
| 196 | key, |
| 197 | message, |
| 198 | reason: 'PWD_DIALOG_REASON_DECRYPT', |
| 199 | openPopup, |
| 200 | beforePasswordRequest |
| 201 | }); |
| 202 | if (await this.getPopup()) { |
| 203 | this.ports.dDialog.emit('hide-pwd-dialog'); |
| 204 | } |
| 205 | triggerSync({keyringId: this.keyringId, key: unlockedKey.key, password: unlockedKey.password}); |
| 206 | return unlockedKey.key; |
| 207 | } |
| 208 | } |
nothing calls this directly
no test coverage detected