From 44496bcedb1336b8169e10e4d4fcf9165edc194d Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 28 Sep 2020 14:33:33 -0300 Subject: [wallet] Enable manual withdrawal (without payto:// parsing/display) --- .../main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt | 8 ++++---- wallet/src/main/res/navigation/nav_graph.xml | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt index f368c68..47c2c6b 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt @@ -21,10 +21,9 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Toast -import android.widget.Toast.LENGTH_SHORT import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels +import androidx.navigation.fragment.findNavController import net.taler.common.hideKeyboard import net.taler.lib.common.Amount import net.taler.wallet.MainViewModel @@ -44,7 +43,7 @@ class ManualWithdrawFragment : Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ): View? { ui = FragmentManualWithdrawBinding.inflate(inflater, container, false) return ui.root @@ -70,8 +69,9 @@ class ManualWithdrawFragment : Fragment() { val value = ui.amountView.text.toString().toLong() val amount = Amount(exchangeItem.currency, value, 0) ui.amountView.hideKeyboard() - Toast.makeText(requireContext(), "Not implemented: $amount", LENGTH_SHORT).show() + withdrawManager.getWithdrawalDetails(exchangeItem.exchangeBaseUrl, amount) + findNavController().navigate(R.id.action_nav_exchange_manual_withdrawal_to_promptWithdraw) } } diff --git a/wallet/src/main/res/navigation/nav_graph.xml b/wallet/src/main/res/navigation/nav_graph.xml index cf98b95..e8929c9 100644 --- a/wallet/src/main/res/navigation/nav_graph.xml +++ b/wallet/src/main/res/navigation/nav_graph.xml @@ -75,7 +75,11 @@ + android:label="@string/withdraw_title"> + +