From 78fa83ce9b8773b0e3c6a27c6fccde2860b9ac67 Mon Sep 17 00:00:00 2001 From: ArtemHryhorovGeniusee Date: Mon, 30 Jan 2023 13:16:37 +0200 Subject: [PATCH] Fixed crypto flavour build --- .../vpn/ui/top/up/card/summary/CardSummaryActivity.kt | 5 ----- .../vpn/ui/top/up/card/summary/CardSummaryViewModel.kt | 5 ----- .../vpn/ui/top/up/crypto/payment/CryptoPaymentActivity.kt | 5 ----- .../vpn/ui/top/up/crypto/payment/CryptoPaymentViewModel.kt | 5 ----- 4 files changed, 20 deletions(-) diff --git a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryActivity.kt b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryActivity.kt index 4ae39eca..44be110d 100644 --- a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryActivity.kt +++ b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryActivity.kt @@ -72,11 +72,6 @@ class CardSummaryActivity : SummaryActivity() { private fun paymentConfirmed() { setButtonAvailability(true) - val amountUSD = intent.extras?.getDouble(AMOUNT_USD_EXTRA_KEY) - val currency = intent.extras?.getString(CURRENCY_EXTRA_KEY) - if (currency != null && amountUSD != null) { - viewModel.updateLastCurrency(currency) - } viewModel.clearPopUpTopUpHistory() registerAccount() } diff --git a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryViewModel.kt b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryViewModel.kt index f0b7c68d..c85dcd98 100644 --- a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryViewModel.kt +++ b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/card/summary/CardSummaryViewModel.kt @@ -19,7 +19,6 @@ class CardSummaryViewModel(useCaseProvider: UseCaseProvider) : ViewModel() { private val connectionUseCase = useCaseProvider.connection() private val loginUseCase = useCaseProvider.login() private val paymentUseCase = useCaseProvider.payment() - private val pushyUseCase = useCaseProvider.pushy() fun accountFlowShown() { loginUseCase.accountFlowShown() @@ -45,10 +44,6 @@ class CardSummaryViewModel(useCaseProvider: UseCaseProvider) : ViewModel() { } } - fun updateLastCurrency(currency: String) { - pushyUseCase.updateCryptoCurrency(currency) - } - fun clearPopUpTopUpHistory() { balanceUseCase.clearBalancePopUpHistory() balanceUseCase.clearMinBalancePopUpHistory() diff --git a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentActivity.kt b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentActivity.kt index 38e4bdf3..b9c6ac3c 100644 --- a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentActivity.kt +++ b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentActivity.kt @@ -63,11 +63,6 @@ class CryptoPaymentActivity : BaseActivity() { private fun subscribeViewModel() { viewModel.paymentSuccessfully.observe(this) { - val currency = intent.extras?.getString(CRYPTO_NAME_EXTRA_KEY) - val amountUSD = intent.extras?.getDouble(CRYPTO_AMOUNT_USD_EXTRA_KEY)?.toFloat() - if (currency != null && amountUSD != null) { - viewModel.updateLastCurrency(currency) - } viewModel.clearPopUpTopUpHistory() registerAccount() } diff --git a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentViewModel.kt b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentViewModel.kt index 629cfb6c..7874e265 100644 --- a/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentViewModel.kt +++ b/android/app/src/crypto/java/updated/mysterium/vpn/ui/top/up/crypto/payment/CryptoPaymentViewModel.kt @@ -27,7 +27,6 @@ class CryptoPaymentViewModel(useCaseProvider: UseCaseProvider) : ViewModel() { private val connectionUseCase = useCaseProvider.connection() private val balanceUseCase = useCaseProvider.balance() private val loginUseCase = useCaseProvider.login() - private val pushyUseCase = useCaseProvider.pushy() private val _paymentSuccessfully = MutableLiveData() private val _paymentExpired = MutableLiveData() private val _paymentFailed = MutableLiveData() @@ -61,10 +60,6 @@ class CryptoPaymentViewModel(useCaseProvider: UseCaseProvider) : ViewModel() { balanceUseCase.clearMinBalancePushHistory() } - fun updateLastCurrency(currency: String) { - pushyUseCase.updateCryptoCurrency(currency) - } - fun registerAccount() = liveDataResult { val identity = connectionUseCase.getIdentity() val identityModel = IdentityModel(identity)