From 69093aa9055da501fd14103ac772d730850cb7b4 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 14 May 2020 14:13:18 -0300 Subject: [wallet] Remove success pages for withdrawal and payment The user is now brought the the transaction list where both are shown directly as pending transactions. --- .../src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt') diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt index 6bcd013..75e4daa 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt @@ -43,8 +43,7 @@ sealed class WithdrawStatus { ) : WithdrawStatus() data class Withdrawing(val talerWithdrawUri: String) : WithdrawStatus() - - object Success : WithdrawStatus() + data class Success(val currency: String) : WithdrawStatus() data class Error(val message: String?) : WithdrawStatus() } @@ -145,7 +144,7 @@ class WithdrawManager(private val walletBackendApi: WalletBackendApi) { } } - fun acceptWithdrawal(talerWithdrawUri: String, selectedExchange: String) { + fun acceptWithdrawal(talerWithdrawUri: String, selectedExchange: String, currency: String) { val args = JSONObject() args.put("talerWithdrawUri", talerWithdrawUri) args.put("selectedExchange", selectedExchange) @@ -154,7 +153,7 @@ class WithdrawManager(private val walletBackendApi: WalletBackendApi) { walletBackendApi.sendRequest("acceptWithdrawal", args) { isError, result -> if (isError) { - Log.v(TAG, "got acceptWithdrawal error result: ${result.toString(4)}") + Log.v(TAG, "got acceptWithdrawal error result: ${result.toString(2)}") return@sendRequest } Log.v(TAG, "got acceptWithdrawal result") @@ -163,7 +162,7 @@ class WithdrawManager(private val walletBackendApi: WalletBackendApi) { Log.w(TAG, "ignoring acceptWithdrawal result, invalid state: $status") return@sendRequest } - withdrawStatus.postValue(WithdrawStatus.Success) + withdrawStatus.postValue(WithdrawStatus.Success(currency)) } } -- cgit v1.2.3