From d2f0b7fa635570eeccdbb775b33cb4a76fcb09de Mon Sep 17 00:00:00 2001 From: HashEngineering Date: Fri, 1 Dec 2023 22:34:26 -0500 Subject: [PATCH] feat(coinbase): hide buy swap from coinbase info and portal screens --- .../integrations/coinbase/ui/CoinbaseServicesFragment.kt | 3 +++ .../wallet/ui/buy_sell/IntegrationOverviewFragment.kt | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/integrations/coinbase/src/main/java/org/dash/wallet/integrations/coinbase/ui/CoinbaseServicesFragment.kt b/integrations/coinbase/src/main/java/org/dash/wallet/integrations/coinbase/ui/CoinbaseServicesFragment.kt index 47ef6c962f..6d76ab36ab 100644 --- a/integrations/coinbase/src/main/java/org/dash/wallet/integrations/coinbase/ui/CoinbaseServicesFragment.kt +++ b/integrations/coinbase/src/main/java/org/dash/wallet/integrations/coinbase/ui/CoinbaseServicesFragment.kt @@ -87,6 +87,9 @@ class CoinbaseServicesFragment : Fragment(R.layout.fragment_integration_portal) safeNavigate(CoinbaseServicesFragmentDirections.servicesToBuyDash()) } + // the convert or buy swap feature should be hidden + // as there are not enough supported currencies with the v3 API + binding.convertBtn.isVisible = false binding.convertBtn.setOnClickListener { viewModel.logEvent(AnalyticsConstants.Coinbase.CONVERT_DASH) safeNavigate(CoinbaseServicesFragmentDirections.servicesToConvertCrypto(true)) diff --git a/wallet/src/de/schildbach/wallet/ui/buy_sell/IntegrationOverviewFragment.kt b/wallet/src/de/schildbach/wallet/ui/buy_sell/IntegrationOverviewFragment.kt index cb68ba1df2..2f7d1c298f 100644 --- a/wallet/src/de/schildbach/wallet/ui/buy_sell/IntegrationOverviewFragment.kt +++ b/wallet/src/de/schildbach/wallet/ui/buy_sell/IntegrationOverviewFragment.kt @@ -22,6 +22,7 @@ import android.content.Intent import android.os.Bundle import android.view.View import androidx.activity.result.contract.ActivityResultContracts +import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.lifecycle.lifecycleScope @@ -62,6 +63,10 @@ class IntegrationOverviewFragment : Fragment(R.layout.fragment_integration_overv binding.continueBtn.setOnClickListener { continueCoinbase() } + // the convert or buy swap feature should be hidden + // as there are not enough supported currencies with the v3 API + binding.buyConvertText.isVisible = false + binding.buyConvertIc.isVisible = false } private fun continueCoinbase() {