File tree Expand file tree Collapse file tree
definitions/flipcash/protos/src/main/proto/account/v1
services/flipcash/src/main/kotlin/com/flipcash/services/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,4 +108,6 @@ message UserFlags {
108108 uint32 min_build_number = 6 ;
109109 // Exchange data timeout for sequential give/grabs for bills
110110 google.protobuf.Duration bill_exchange_data_timeout = 7 ;
111+ // USDF amount, in quarks, that must be purchased when launching a new currency
112+ uint64 new_currency_purchase_amount = 8 ;
111113}
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import com.flipcash.services.internal.domain.mapper.Mapper
55import com.flipcash.services.internal.model.account.UserFlags
66import com.flipcash.services.internal.model.thirdparty.OnRampProvider
77import com.flipcash.services.internal.model.thirdparty.OnRampType
8+ import com.getcode.opencode.model.financial.Fiat
9+ import com.getcode.opencode.model.financial.toFiat
810import javax.inject.Inject
911import kotlin.time.DurationUnit
1012import kotlin.time.toDuration
@@ -20,6 +22,7 @@ internal class UserFlagsMapper @Inject constructor():
2022 supportedOnRampProviders = from.supportedOnRampProvidersList.map { it.toDomain() },
2123 minimumVersion = from.minBuildNumber,
2224 billExchangeDataTimeout = from.billExchangeDataTimeout.seconds.toDuration(DurationUnit .SECONDS ),
25+ newCurrencyPurchaseAmount = Fiat (quarks = from.newCurrencyPurchaseAmount)
2326 )
2427 }
2528}
Original file line number Diff line number Diff line change 11package com.flipcash.services.internal.model.account
22
33import com.flipcash.services.internal.model.thirdparty.OnRampProvider
4+ import com.getcode.opencode.model.financial.Fiat
5+ import com.getcode.opencode.model.financial.toFiat
46import kotlin.time.Duration
57
68data class UserFlags (
@@ -11,6 +13,7 @@ data class UserFlags(
1113 val supportedOnRampProviders : List <OnRampProvider >,
1214 val minimumVersion : Int? ,
1315 val billExchangeDataTimeout : Duration ? ,
16+ val newCurrencyPurchaseAmount : Fiat ,
1417) {
1518 companion object {
1619 val Default = UserFlags (
@@ -21,6 +24,7 @@ data class UserFlags(
2124 supportedOnRampProviders = emptyList(),
2225 minimumVersion = null ,
2326 billExchangeDataTimeout = null ,
27+ newCurrencyPurchaseAmount = Fiat .MAX_VALUE ,
2428 )
2529 }
2630}
You can’t perform that action at this time.
0 commit comments