gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-android] branch master updated: [wallet] show p2p QR codes


From: gnunet
Subject: [taler-taler-android] branch master updated: [wallet] show p2p QR codes until tx ready
Date: Tue, 05 Sep 2023 18:30:22 +0200

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a commit to branch master
in repository taler-android.

The following commit(s) were added to refs/heads/master by this push:
     new 7392cd7  [wallet] show p2p QR codes until tx ready
7392cd7 is described below

commit 7392cd72ddd3406369b13bd8a7f57fb18822eaa2
Author: Iván Ávalos <avalos@disroot.org>
AuthorDate: Tue Sep 5 09:55:17 2023 -0600

    [wallet] show p2p QR codes until tx ready
    
    bug 0007933
---
 .../taler/wallet/peer/TransactionPeerPullCredit.kt |  3 ++-
 .../taler/wallet/peer/TransactionPeerPushDebit.kt  | 23 ++++++++++++----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git 
a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt 
b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt
index fe847b3..b04a756 100644
--- a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt
+++ b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt
@@ -40,6 +40,7 @@ import net.taler.wallet.transactions.TransactionAction.Suspend
 import net.taler.wallet.transactions.TransactionAmountComposable
 import net.taler.wallet.transactions.TransactionInfoComposable
 import net.taler.wallet.transactions.TransactionMajorState.Pending
+import net.taler.wallet.transactions.TransactionMinorState.Ready
 import net.taler.wallet.transactions.TransactionPeerComposable
 import net.taler.wallet.transactions.TransactionPeerPullCredit
 import net.taler.wallet.transactions.TransactionState
@@ -68,7 +69,7 @@ fun ColumnScope.TransactionPeerPullCreditComposable(t: 
TransactionPeerPullCredit
         label = stringResource(id = R.string.send_peer_purpose),
         info = t.info.summary ?: "",
     )
-    if (t.txState.major == Pending) {
+    if (t.txState == TransactionState(Pending, Ready)) {
         QrCodeUriComposable(
             talerUri = t.talerUri,
             clipBoardLabel = "Invoice",
diff --git 
a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt 
b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt
index 796f7fc..2587ea9 100644
--- a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt
+++ b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt
@@ -40,6 +40,7 @@ import net.taler.wallet.transactions.TransactionAction.Suspend
 import net.taler.wallet.transactions.TransactionAmountComposable
 import net.taler.wallet.transactions.TransactionInfoComposable
 import net.taler.wallet.transactions.TransactionMajorState.Pending
+import net.taler.wallet.transactions.TransactionMinorState.Ready
 import net.taler.wallet.transactions.TransactionPeerComposable
 import net.taler.wallet.transactions.TransactionPeerPushDebit
 import net.taler.wallet.transactions.TransactionState
@@ -68,16 +69,18 @@ fun ColumnScope.TransactionPeerPushDebitComposable(t: 
TransactionPeerPushDebit)
         label = stringResource(id = R.string.send_peer_purpose),
         info = t.info.summary ?: "",
     )
-    QrCodeUriComposable(
-        talerUri = t.talerUri,
-        clipBoardLabel = "Push payment",
-        buttonText = stringResource(id = R.string.copy),
-    ) {
-        Text(
-            modifier = Modifier.padding(horizontal = 16.dp),
-            style = MaterialTheme.typography.bodyLarge,
-            text = stringResource(id = R.string.receive_peer_invoice_uri),
-        )
+    if (t.txState == TransactionState(Pending, Ready)) {
+        QrCodeUriComposable(
+            talerUri = t.talerUri,
+            clipBoardLabel = "Push payment",
+            buttonText = stringResource(id = R.string.copy),
+        ) {
+            Text(
+                modifier = Modifier.padding(horizontal = 16.dp),
+                style = MaterialTheme.typography.bodyLarge,
+                text = stringResource(id = R.string.receive_peer_invoice_uri),
+            )
+        }
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]