Revert "Temporarily block payments in all regions."

This reverts commit 4637e1b5d8.
This commit is contained in:
Cody Henthorne 2021-06-18 15:10:29 -04:00
parent 817f1ee938
commit 4b0811f9aa

View file

@ -106,27 +106,27 @@ public final class PaymentsValues extends SignalStoreValues {
* Applies feature flags and region restrictions to return an enum which describes the available feature set for the user.
*/
public PaymentsAvailability getPaymentsAvailability() {
// Context context = ApplicationDependencies.getApplication();
//
// if (!TextSecurePreferences.isPushRegistered(context) ||
// !GeographicalRestrictions.e164Allowed(TextSecurePreferences.getLocalNumber(context)))
// {
Context context = ApplicationDependencies.getApplication();
if (!TextSecurePreferences.isPushRegistered(context) ||
!GeographicalRestrictions.e164Allowed(TextSecurePreferences.getLocalNumber(context)))
{
return PaymentsAvailability.NOT_IN_REGION;
// }
//
// if (FeatureFlags.payments()) {
// if (mobileCoinPaymentsEnabled()) {
// return PaymentsAvailability.WITHDRAW_AND_SEND;
// } else {
// return PaymentsAvailability.REGISTRATION_AVAILABLE;
// }
// } else {
// if (mobileCoinPaymentsEnabled()) {
// return PaymentsAvailability.WITHDRAW_ONLY;
// } else {
// return PaymentsAvailability.DISABLED_REMOTELY;
// }
// }
}
if (FeatureFlags.payments()) {
if (mobileCoinPaymentsEnabled()) {
return PaymentsAvailability.WITHDRAW_AND_SEND;
} else {
return PaymentsAvailability.REGISTRATION_AVAILABLE;
}
} else {
if (mobileCoinPaymentsEnabled()) {
return PaymentsAvailability.WITHDRAW_ONLY;
} else {
return PaymentsAvailability.DISABLED_REMOTELY;
}
}
}
@WorkerThread