mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Implement refactor to utilize new donation configuration endpoint.
This commit is contained in:
committed by
Cody Henthorne
parent
40cf87307a
commit
424a0233c2
@@ -9,10 +9,14 @@ object Environment {
|
||||
const val IS_STAGING: Boolean = BuildConfig.BUILD_ENVIRONMENT_TYPE == "Staging"
|
||||
|
||||
object Donations {
|
||||
@JvmStatic
|
||||
@get:JvmName("getGooglePayConfiguration")
|
||||
val GOOGLE_PAY_CONFIGURATION = GooglePayApi.Configuration(
|
||||
walletEnvironment = if (IS_STAGING) WalletConstants.ENVIRONMENT_TEST else WalletConstants.ENVIRONMENT_PRODUCTION
|
||||
)
|
||||
|
||||
@JvmStatic
|
||||
@get:JvmName("getStripeConfiguration")
|
||||
val STRIPE_CONFIGURATION = StripeApi.Configuration(
|
||||
publishableKey = BuildConfig.STRIPE_PUBLISHABLE_KEY
|
||||
)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package org.thoughtcrime.securesms.util
|
||||
|
||||
import java.util.Currency
|
||||
|
||||
/**
|
||||
* Utility methods for java.util.Currency
|
||||
*
|
||||
* This is prefixed with "Platform" as there are several different Currency classes
|
||||
* available in the app, and this utility class is specifically for dealing with
|
||||
* java.util.Currency
|
||||
*/
|
||||
object PlatformCurrencyUtil {
|
||||
|
||||
val USD: Currency = Currency.getInstance("USD")
|
||||
|
||||
/**
|
||||
* Note: Adding this as an extension method of Currency causes some confusion in
|
||||
* AndroidStudio due to a separate Currency class from the AndroidSDK having
|
||||
* an extension method of the same signature.
|
||||
*/
|
||||
fun getAvailableCurrencyCodes(): Set<String> {
|
||||
return Currency.getAvailableCurrencies().map { it.currencyCode }.toSet()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user