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 @@ -80,6 +80,7 @@ message UserFlags {
8080 PHANTOM = 5 ;
8181 SOLFLARE = 6 ;
8282 BACKPACK = 7 ;
83+ BASE = 8 ;
8384 }
8485 // The set of supported on ramp providers for the user, based on their platform
8586 // and locale if provided
@@ -88,4 +89,7 @@ message UserFlags {
8889 // The preferred on ramp provider for this user. If the value is UNKNOWN, client
8990 // should show the list of all supported providers.
9091 OnRampProvider preferred_on_ramp_provider = 5 ;
92+ // The minumum build number for this user. If their build number is less than the
93+ // provided value, client should show a forced upgrade screen.
94+ uint32 min_build_number = 6 ;
9195}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ internal class UserFlagsMapper @Inject constructor():
1616 requiresIapForRegistration = from.requiresIapForRegistration,
1717 preferredOnRampProvider = from.preferredOnRampProvider.toDomain().takeIf { it != OnRampProvider .Unknown },
1818 supportedOnRampProviders = from.supportedOnRampProvidersList.map { it.toDomain() },
19+ minimumVersion = from.minBuildNumber
1920 )
2021 }
2122}
@@ -29,7 +30,8 @@ private fun FlipcashAccountService.UserFlags.OnRampProvider.toDomain(): OnRampPr
2930 FlipcashAccountService .UserFlags .OnRampProvider .PHANTOM -> OnRampProvider .Phantom
3031 FlipcashAccountService .UserFlags .OnRampProvider .SOLFLARE -> OnRampProvider .Solflare
3132 FlipcashAccountService .UserFlags .OnRampProvider .BACKPACK -> OnRampProvider .Backpack
32-
33+ // Unhandled for now
34+ FlipcashAccountService .UserFlags .OnRampProvider .BASE ,
3335 FlipcashAccountService .UserFlags .OnRampProvider .UNKNOWN ,
3436 FlipcashAccountService .UserFlags .OnRampProvider .UNRECOGNIZED -> OnRampProvider .Unknown
3537 }
Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ data class UserFlags(
88 val requiresIapForRegistration : Boolean ,
99 val preferredOnRampProvider : OnRampProvider ? ,
1010 val supportedOnRampProviders : List <OnRampProvider >,
11+ val minimumVersion : Int? ,
1112)
You can’t perform that action at this time.
0 commit comments