diff options
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt | 8 | ||||
-rw-r--r-- | 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 @@ <fragment android:id="@+id/nav_exchange_manual_withdrawal" android:name="net.taler.wallet.withdraw.ManualWithdrawFragment" - android:label="@string/withdraw_title"/> + android:label="@string/withdraw_title"> + <action + android:id="@+id/action_nav_exchange_manual_withdrawal_to_promptWithdraw" + app:destination="@id/promptWithdraw" /> + </fragment> <fragment android:id="@+id/nav_settings_backup" |