@@ -40,11 +40,11 @@ class IdentityRepository @Inject constructor(
4040 val enableDebugOptions : Boolean ,
4141 val eligibleAirdrops : Set <AirdropType >,
4242 val isPhoneNumberLinked : Boolean ,
43- val buyModuleEnabled : Boolean ,
43+ val buyModuleAvailable : Boolean ,
4444 )
4545
4646 fun getUser (
47- keyPair : Ed25519 . KeyPair ,
47+ keyPair : KeyPair ,
4848 phoneValue : String
4949 ): Flowable <GetUserResponse > {
5050 if (isMock()) return Flowable .just(
@@ -54,7 +54,7 @@ class IdentityRepository @Inject constructor(
5454 enableDebugOptions = false ,
5555 eligibleAirdrops = setOf (),
5656 isPhoneNumberLinked = true ,
57- buyModuleEnabled = false ,
57+ buyModuleAvailable = false
5858 )
5959 )
6060
@@ -78,7 +78,7 @@ class IdentityRepository @Inject constructor(
7878 )
7979 }?.toSet() ? : throw Exception (" Error: Null data" ),
8080 isPhoneNumberLinked = it.phone?.isLinked ? : throw Exception (" Error: Null data" ),
81- buyModuleEnabled = it.enableBuyModule
81+ buyModuleAvailable = false ,
8282 )
8383 }
8484 .let { networkOracle.managedRequest(it) }
@@ -102,8 +102,8 @@ class IdentityRepository @Inject constructor(
102102 user.enableDebugOptions
103103 )
104104 prefRepository.set(
105- PrefsBool .BUY_KIN_ENABLED ,
106- user.buyModuleEnabled
105+ PrefsBool .BUY_MODULE_AVAILABLE ,
106+ user.buyModuleAvailable
107107 )
108108 prefRepository.set(
109109 PrefsBool .IS_ELIGIBLE_GET_FIRST_KIN_AIRDROP ,
@@ -130,9 +130,9 @@ class IdentityRepository @Inject constructor(
130130 prefRepository.getFlowable(PrefsBool .IS_ELIGIBLE_GET_FIRST_KIN_AIRDROP ),
131131 prefRepository.getFlowable(PrefsBool .IS_ELIGIBLE_GIVE_FIRST_KIN_AIRDROP ),
132132 Flowable .just(phoneRepository.phoneLinked),
133- prefRepository.getFlowable(PrefsBool .BUY_KIN_ENABLED ),
134- ) { userId, dataContainerId, isDebugAllowed, isEligibleGetFirstKinAirdrop, isEligibleGiveFirstKinAirdrop, isPhoneNumberLinked, buyModuleEnabled ->
135- var eligibleAirdrops = Sets .newHashSet<AirdropType >()
133+ prefRepository.getFlowable(PrefsBool .BUY_MODULE_AVAILABLE ),
134+ ) { userId, dataContainerId, isDebugAllowed, isEligibleGetFirstKinAirdrop, isEligibleGiveFirstKinAirdrop, isPhoneNumberLinked, buyModuleAvailable ->
135+ val eligibleAirdrops = Sets .newHashSet<AirdropType >()
136136 if (isEligibleGetFirstKinAirdrop) {
137137 eligibleAirdrops.add(AirdropType .GetFirstKin )
138138 }
@@ -145,7 +145,7 @@ class IdentityRepository @Inject constructor(
145145 enableDebugOptions = isDebugAllowed,
146146 eligibleAirdrops = eligibleAirdrops,
147147 isPhoneNumberLinked = isPhoneNumberLinked.value,
148- buyModuleEnabled = buyModuleEnabled
148+ buyModuleAvailable = buyModuleAvailable,
149149 )
150150 }
151151 .filter { it.userId.isNotEmpty() && it.dataContainerId.isNotEmpty() }
@@ -154,7 +154,7 @@ class IdentityRepository @Inject constructor(
154154
155155
156156 fun linkAccount (
157- keyPair : Ed25519 . KeyPair ,
157+ keyPair : KeyPair ,
158158 phoneValue : String ,
159159 code : String
160160 ): Single <IdentityService .LinkAccountResponse .Result > {
@@ -183,7 +183,7 @@ class IdentityRepository @Inject constructor(
183183 }
184184
185185 fun unlinkAccount (
186- keyPair : Ed25519 . KeyPair ,
186+ keyPair : KeyPair ,
187187 phoneValue : String
188188 ): Single <IdentityService .UnlinkAccountResponse .Result > {
189189 if (isMock()) return Single .just(IdentityService .UnlinkAccountResponse .Result .OK )
0 commit comments