diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/Account.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/Account.java index cfc477fae..f78da0a09 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/Account.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/Account.java @@ -689,8 +689,8 @@ public class Account { public Optional getAccountRecoveryPassword() { requireNotStale(); - return accountRecoveryPasswordSalt != null && accountRecoveryPasswordHash != null - ? Optional.of(new SaltedTokenHash(accountRecoveryPasswordSalt, accountRecoveryPasswordHash)) + return accountRecoveryPasswordHash != null && accountRecoveryPasswordSalt != null + ? Optional.of(new SaltedTokenHash(accountRecoveryPasswordHash, accountRecoveryPasswordSalt)) : Optional.empty(); }