[Webfunds-commits] java/webfunds/client/sox PendingReceipt.java SOXWallet.java

Jeroen C. van Gelderen gelderen@cypherpunks.ai
Tue, 6 Mar 2001 20:10:19 -0400 (AST)


gelderen    01/03/06 20:10:19

  Modified:    webfunds/client Client.java ReceiptBrowser.java
                        ReceiptTableModel.java
               webfunds/client/sox PendingReceipt.java SOXWallet.java
  Log:
  Catch up with java/webfunds/client/Transaction.java rev. 1.12.

Revision  Changes    Path
1.26      +2 -2      java/webfunds/client/Client.java

Index: Client.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/Client.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- Client.java	2000/09/30 18:50:07	1.25
+++ Client.java	2001/03/07 00:10:14	1.26
@@ -1,4 +1,4 @@
-/* $Id: Client.java,v 1.25 2000/09/30 18:50:07 iang Exp $
+/* $Id: Client.java,v 1.26 2001/03/07 00:10:14 gelderen Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * The WebFunds Development Team.  All Rights Reserved.
@@ -106,7 +106,7 @@
         for(int a = 0; a < trans.length; a++)
         {
 //out.println(trans[a] );
-            if(trans[a].getStatus() < Transaction.COMPLETED_OK)
+            if(trans[a].getStatus() < Transaction.STATUS_COMPLETED_OK)
             {
                 wallet.cancel(trans[a] );
             }



1.18      +4 -4      java/webfunds/client/ReceiptBrowser.java

Index: ReceiptBrowser.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/ReceiptBrowser.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ReceiptBrowser.java	2000/06/05 00:56:58	1.17
+++ ReceiptBrowser.java	2001/03/07 00:10:14	1.18
@@ -1,5 +1,5 @@
 /*
- * $Id: ReceiptBrowser.java,v 1.17 2000/06/05 00:56:58 iang Exp $
+ * $Id: ReceiptBrowser.java,v 1.18 2001/03/07 00:10:14 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -213,7 +213,7 @@
         AccountInfo account = (AccountInfo)tablemodel.getValueAt(row, src);
         String transid = (String)tablemodel.getValueAt(row, tid);
         Transaction t;
-        t = new Transaction(Transaction.PAYMENT, transid, item, account,
+        t = new Transaction(Transaction.TYPE_PAYMENT, transid, item, account,
                                                  null, 0, null, null);
 
 	victor.addElement(t);
@@ -287,8 +287,8 @@
             account = (AccountInfo)tablemodel.getValueAt(row, src);
             String transid = (String)tablemodel.getValueAt(row, tid);
             Transaction t;
-            t = new Transaction(Transaction.PAYMENT, transid, item, account,
-                                                     null, 0, null, null);
+            t = new Transaction(Transaction.TYPE_PAYMENT, transid, item,
+                                account, null, 0, null, null);
 
 	    victor.addElement(t);
             //wi.cancel(t);



1.14      +6 -5      java/webfunds/client/ReceiptTableModel.java

Index: ReceiptTableModel.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/ReceiptTableModel.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ReceiptTableModel.java	2000/06/18 21:57:17	1.13
+++ ReceiptTableModel.java	2001/03/07 00:10:16	1.14
@@ -1,5 +1,5 @@
 /*
- * $Id: ReceiptTableModel.java,v 1.13 2000/06/18 21:57:17 iang Exp $
+ * $Id: ReceiptTableModel.java,v 1.14 2001/03/07 00:10:16 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -113,7 +113,8 @@
         // skip it if it is a cancel
         // trans should tell us this itself.  Can't change until fixed.
         //
-        if (!showCancels && (amount == 0) && (status == trans.COMPLETED_OK))
+        if (!showCancels && (amount == 0)
+            && (status == trans.STATUS_COMPLETED_OK))
         {
             if (source.equals(target))
                 return ;
@@ -137,9 +138,9 @@
         //   to plugin.
         //
         row[i++] = new Long(amount);
-        row[i++] = new String( webfunds.utils.Hex.printable( trans.getDesc() ) );
-        row[i++] = trans.getStringStatus();
-        row[i++] = trans.getStringType();
+        row[i++] = new String( webfunds.utils.Hex.printable(trans.getDesc()) );
+        row[i++] = trans.getStatusAsString();
+        row[i++] = trans.getTypeAsString();
         data.addElement(row);
     }
     



1.12      +2 -2      java/webfunds/client/sox/PendingReceipt.java

Index: PendingReceipt.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/PendingReceipt.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PendingReceipt.java	2001/02/27 01:28:22	1.11
+++ PendingReceipt.java	2001/03/07 00:10:18	1.12
@@ -1,5 +1,5 @@
 /*
- * $Id: PendingReceipt.java,v 1.11 2001/02/27 01:28:22 iang Exp $
+ * $Id: PendingReceipt.java,v 1.12 2001/03/07 00:10:18 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -34,7 +34,7 @@
     public long         amount;
     public byte[]       desc;
     public Date         date;
-    public int          status = Transaction.PENDING;
+    public int          status = Transaction.STATUS_PENDING;
 
 
     public PendingReceipt()



1.143     +12 -12    java/webfunds/client/sox/SOXWallet.java

Index: SOXWallet.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/SOXWallet.java,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- SOXWallet.java	2001/02/27 01:28:22	1.142
+++ SOXWallet.java	2001/03/07 00:10:18	1.143
@@ -1,4 +1,4 @@
-/* $Id: SOXWallet.java,v 1.142 2001/02/27 01:28:22 iang Exp $
+/* $Id: SOXWallet.java,v 1.143 2001/03/07 00:10:18 gelderen Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * The WebFunds Development Team.  All Rights Reserved.
@@ -77,7 +77,7 @@
  *  See quiteCancel for example of low call.  It should not use AccountInfo
  *  (artifact of Receipt Store).
  *
- * @version $Revision: 1.142 $
+ * @version $Revision: 1.143 $
  */
 public class SOXWallet
     extends Debug
@@ -2875,18 +2875,18 @@
             Date date = new Date(receipt.getTimestamp());
             if (info.equals(source))
             {
-                int type = Transaction.PAYMENT;
-                Transaction trans = new Transaction(type, transid,
+                Transaction trans =
+                    new Transaction(Transaction.TYPE_PAYMENT, transid,
                                     item, source, target, amount, desc, date);
-                trans.setStatus(Transaction.COMPLETED_OK);
+                trans.setStatus(Transaction.STATUS_COMPLETED_OK);
                 transactions.addElement(trans);
             }
             if (info.equals(target))
             {
-                int type = Transaction.DEPOSIT;
-                Transaction trans = new Transaction(type, transid,
+                Transaction trans =
+                    new Transaction(Transaction.TYPE_DEPOSIT, transid,
                                     item, source, target, amount, desc, date);
-                trans.setStatus(Transaction.COMPLETED_OK);
+                trans.setStatus(Transaction.STATUS_COMPLETED_OK);
                 transactions.addElement(trans);
             }
         }
@@ -2903,16 +2903,16 @@
 
             if (info.equals(source))
             {
-                int type = Transaction.PAYMENT;
-                Transaction trans = new Transaction(type, transid,
+                Transaction trans =
+                    new Transaction(Transaction.TYPE_PAYMENT, transid,
                                     item, source, target, amount, desc, date);
                 trans.setStatus(pending.status);
                 transactions.addElement(trans);
             }
             if (info.equals(target))
             {
-                int type = Transaction.DEPOSIT;
-                Transaction trans = new Transaction(type, transid,
+                Transaction trans =
+                    new Transaction(Transaction.TYPE_DEPOSIT, transid,
                                     item, source, target, amount, desc, date);
                 trans.setStatus(pending.status);
                 transactions.addElement(trans);