Updated on 2026-08-14
This commit is contained in:
parent
258e950178
commit
e52bb2777f
3 changed files with 5 additions and 3 deletions
|
|
@ -224,13 +224,13 @@ internal class DefaultOnboardingRepository @Inject constructor(
|
|||
tangemPayStorage.storeHideOnboardingBanner(userWalletId, hide = true)
|
||||
}
|
||||
|
||||
override suspend fun disableTangemPay(userWalletId: UserWalletId): Either<VisaApiError, Any> {
|
||||
override suspend fun disableTangemPay(userWalletId: UserWalletId): Either<VisaApiError, Unit> {
|
||||
return requestHelper.performRequest(userWalletId) { authHeader ->
|
||||
tangemPayApi.setTangemPayEnabledStatus(
|
||||
authHeader = authHeader,
|
||||
body = SetTangemPayEnabledRequest(isTangemPayEnabled = false),
|
||||
)
|
||||
}.onRight {
|
||||
}.map {
|
||||
val address = requestHelper.getCustomerWalletAddress(userWalletId)
|
||||
tangemPayStorage.clearAll(userWalletId = userWalletId, customerWalletAddress = address)
|
||||
setHideMainOnboardingBanner(userWalletId)
|
||||
|
|
|
|||
|
|
@ -34,5 +34,5 @@ interface OnboardingRepository {
|
|||
|
||||
suspend fun setHideMainOnboardingBanner(userWalletId: UserWalletId)
|
||||
|
||||
suspend fun disableTangemPay(userWalletId: UserWalletId): Either<VisaApiError, Any>
|
||||
suspend fun disableTangemPay(userWalletId: UserWalletId): Either<VisaApiError, Unit>
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ import com.tangem.core.ui.components.bottomsheets.message.*
|
|||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.message.DialogMessage
|
||||
import com.tangem.core.ui.message.EventMessageAction
|
||||
import com.tangem.core.ui.message.ToastMessage
|
||||
import com.tangem.core.ui.message.bottomSheetMessage
|
||||
import com.tangem.domain.feedback.GetWalletMetaInfoUseCase
|
||||
import com.tangem.domain.feedback.SendFeedbackEmailUseCase
|
||||
|
|
@ -213,6 +214,7 @@ internal class TangemPayClickIntentsImplementor @Inject constructor(
|
|||
modelScope.launch {
|
||||
tangemPayOnboardingRepository.disableTangemPay(userWalletId)
|
||||
.onRight { tangemPayMainScreenCustomerInfoUseCase.fetch(userWalletId) }
|
||||
.onLeft { uiMessageSender.send(ToastMessage(resourceReference(R.string.common_something_went_wrong))) }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue