Skip to content

Commit

Permalink
Remove v2 suffix from secure value recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
AsamK committed Sep 28, 2024
1 parent 19dc2d4 commit a6ab8f7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public IncomingMessageHandler getIncomingMessageHandler() {
}

PinHelper getPinHelper() {
return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecoveryV2()));
return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecovery()));
}

public PreKeyHelper getPreKeyHelper() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public void setRegistrationLockPin(
case SecureValueRecovery.BackupResponse.Success success -> {
}
case SecureValueRecovery.BackupResponse.ServerRejected serverRejected ->
logger.warn("Backup svr2 failed: ServerRejected");
logger.warn("Backup svr failed: ServerRejected");
case SecureValueRecovery.BackupResponse.EnclaveNotFound enclaveNotFound ->
logger.warn("Backup svr2 failed: EnclaveNotFound");
logger.warn("Backup svr failed: EnclaveNotFound");
case SecureValueRecovery.BackupResponse.ExposeFailure exposeFailure ->
logger.warn("Backup svr2 failed: ExposeFailure");
logger.warn("Backup svr failed: ExposeFailure");
case SecureValueRecovery.BackupResponse.ApplicationError error ->
throw new IOException(error.getException());
case SecureValueRecovery.BackupResponse.NetworkError error -> throw error.getException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public RegistrationManagerImpl(
userAgent,
ServiceConfig.AUTOMATIC_NETWORK_RETRY,
ServiceConfig.GROUP_MAX_SIZE);
final var secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves()
final var secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves()
.stream()
.map(mr -> (SecureValueRecovery) accountManager.getSecureValueRecoveryV2(mr))
.map(mr -> (SecureValueRecovery) this.unauthenticatedAccountManager.getSecureValueRecoveryV2(mr))
.toList();
this.pinHelper = new PinHelper(secureValueRecoveryV2);
this.pinHelper = new PinHelper(secureValueRecovery);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SignalDependencies {
private SignalServiceMessageReceiver messageReceiver;
private SignalServiceMessageSender messageSender;

private List<SecureValueRecovery> secureValueRecoveryV2;
private List<SecureValueRecovery> secureValueRecovery;
private ProfileService profileService;

SignalDependencies(
Expand Down Expand Up @@ -205,9 +205,9 @@ public SignalServiceMessageSender getMessageSender() {
ServiceConfig.MAX_ENVELOPE_SIZE));
}

public List<SecureValueRecovery> getSecureValueRecoveryV2() {
return getOrCreate(() -> secureValueRecoveryV2,
() -> secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves()
public List<SecureValueRecovery> getSecureValueRecovery() {
return getOrCreate(() -> secureValueRecovery,
() -> secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves()
.stream()
.map(mr -> (SecureValueRecovery) getAccountManager().getSecureValueRecoveryV2(mr))
.toList());
Expand Down

0 comments on commit a6ab8f7

Please sign in to comment.