Ensure we mark 2fa as disabled if we delete keys, regardless of success or
failure
This commit is contained in:
parent
a64b582798
commit
9c7d21044e
@ -260,18 +260,20 @@ const NSUInteger kLegacyTruncated2FAv1PinLength = 16;
|
||||
.then(^{
|
||||
return [self disableRegistrationLockV2];
|
||||
})
|
||||
.then(
|
||||
^() {
|
||||
OWSAssertIsOnMainThread();
|
||||
.ensure(^{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
[self.databaseStorage writeWithBlock:^(SDSAnyWriteTransaction *transaction) {
|
||||
[self markDisabledWithTransaction:transaction];
|
||||
}];
|
||||
[self.databaseStorage writeWithBlock:^(SDSAnyWriteTransaction *transaction) {
|
||||
[self markDisabledWithTransaction:transaction];
|
||||
}];
|
||||
})
|
||||
.then(^() {
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
})
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
})
|
||||
.catch(^(NSError *error) {
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user