Skip to content

Commit

Permalink
Fixed crypto flavour build
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemHryhorovGeniusee committed Jan 30, 2023
1 parent fa1c845 commit 78fa83c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -45,10 +44,6 @@ class CardSummaryViewModel(useCaseProvider: UseCaseProvider) : ViewModel() {
}
}

fun updateLastCurrency(currency: String) {
pushyUseCase.updateCryptoCurrency(currency)
}

fun clearPopUpTopUpHistory() {
balanceUseCase.clearBalancePopUpHistory()
balanceUseCase.clearMinBalancePopUpHistory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Unit>()
private val _paymentExpired = MutableLiveData<Unit>()
private val _paymentFailed = MutableLiveData<Unit>()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 78fa83c

Please sign in to comment.