Updated on 2026-08-14

This commit is contained in:
Tangem 2022-02-09 21:12:06 +03:00
commit 78c896194a
2 changed files with 7 additions and 4 deletions

View file

@ -14,10 +14,11 @@ fun MoonpayStatus.buyIsAllowed(currency: Currency): Boolean {
return when (currency) {
is Currency.Blockchain -> {
if (currency.blockchain == Blockchain.Unknown || currency.blockchain == Blockchain.BSC) {
false
} else {
availableToBuy.contains(currency.currencySymbol)
val blockchain = currency.blockchain
when {
blockchain.isTestnet() -> blockchain.getTestnetTopUpUrl() != null
blockchain == Blockchain.Unknown || blockchain == Blockchain.BSC -> false
else -> availableToBuy.contains(currency.currencySymbol)
}
}
is Currency.Token -> false

View file

@ -1,6 +1,7 @@
package com.tangem.tap.features.onboarding
import android.content.Context
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.tangem.tap.common.extensions.copyToClipboard
import com.tangem.tap.common.extensions.dispatchDialogHide
@ -23,6 +24,7 @@ class AddressInfoBottomSheetDialog(
init {
this.setContentView(R.layout.dialog_onboarding_address_info)
behavior.state = BottomSheetBehavior.STATE_EXPANDED
setOnCancelListener { store.dispatchDialogHide() }
}