Remove throws from method that doesn’t throw

This commit is contained in:
Max Radermacher 2026-06-04 19:38:23 -05:00 committed by GitHub
parent feeb1303e5
commit f40bc944ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 20 deletions

View File

@ -362,23 +362,11 @@ class ProvisioningCoordinatorImpl: ProvisioningCoordinator {
self.tsAccountManager.setRegistrationId(aciRegistrationId, for: .aci, tx: tx)
self.tsAccountManager.setRegistrationId(pniRegistrationId, for: .pni, tx: tx)
do {
try svr.storeKeys(
fromProvisioningMessage: provisionMessage,
authedDevice: .explicit(authedDevice),
tx: tx,
)
} catch {
switch error {
case SVR.KeysError.missingMasterKey:
owsFailDebug("Failed to store master key from provisioning message")
return .obsoleteLinkedDeviceError
case SVR.KeysError.missingOrInvalidMRBK:
return .obsoleteLinkedDeviceError
default:
owsFailDebug("Unexpected Error")
}
}
self.svr.storeKeys(
fromProvisioningMessage: provisionMessage,
authedDevice: .explicit(authedDevice),
tx: tx,
)
self.receiptManager.setAreReadReceiptsEnabled(
provisionMessage.areReadReceiptsEnabled,

View File

@ -45,7 +45,7 @@ public class SecureValueRecoveryMock: SecureValueRecovery {
fromProvisioningMessage provisioningMessage: LinkingProvisioningMessage,
authedDevice: AuthedDevice,
tx: DBWriteTransaction,
) throws(SVR.KeysError) {
) {
let masterKey = switch provisioningMessage.rootKey {
case .accountEntropyPool(let aep): aep.getMasterKey()
case .masterKey(let masterKey): masterKey

View File

@ -119,5 +119,5 @@ public protocol SecureValueRecovery {
fromProvisioningMessage provisioningMessage: LinkingProvisioningMessage,
authedDevice: AuthedDevice,
tx: DBWriteTransaction,
) throws(SVR.KeysError)
)
}

View File

@ -92,7 +92,7 @@ public class SecureValueRecovery2Impl: SecureValueRecovery {
fromProvisioningMessage provisioningMessage: LinkingProvisioningMessage,
authedDevice: AuthedDevice,
tx: DBWriteTransaction,
) throws(SVR.KeysError) {
) {
Logger.info("")
accountKeyStore.setMediaRootBackupKey(provisioningMessage.mrbk, tx: tx)