(fingerprint, type)
| 200 | } |
| 201 | |
| 202 | async removeKey(fingerprint, type) { |
| 203 | const removedKey = super.removeKey(fingerprint, type); |
| 204 | if (type === 'private') { |
| 205 | const defaultKeyFpr = await this.keystore.getDefaultKeyFpr(); |
| 206 | // Remove the key from the keyring attributes if default |
| 207 | if (defaultKeyFpr === removedKey.getFingerprint()) { |
| 208 | await this.setDefaultKey(''); |
| 209 | } |
| 210 | } |
| 211 | await this.sync.add(removedKey.getFingerprint(), keyringSync.DELETE); |
| 212 | await this.keystore.store(); |
| 213 | await this.sync.commit(); |
| 214 | } |
| 215 | |
| 216 | async revokeKey(unlockedKey) { |
| 217 | const {privateKey: revokedKey} = await revokeKey({key: unlockedKey, format: 'object'}); |
no test coverage detected