Temporarily block payments for all regions.

fork-5.53.8
Alex Hart 2021-04-12 09:43:10 -03:00
rodzic 68aa97a676
commit 06ed124057
1 zmienionych plików z 22 dodań i 21 usunięć

Wyświetl plik

@ -106,27 +106,28 @@ 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)))
{
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;
}
}
// 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;
// }
// }
return PaymentsAvailability.NOT_IN_REGION;
}
@WorkerThread