]> git.ktnx.net Git - mobile-ledger.git/commitdiff
add support for 1.23 also when adding transactions
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 26 Dec 2021 21:35:54 +0000 (23:35 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 26 Dec 2021 21:35:54 +0000 (23:35 +0200)
the previous 1.23 support concerned only transaction/account retrieval

app/src/main/java/net/ktnx/mobileledger/json/Gateway.java

index 97789673421b69a98f7fb2bdba19dd8cd394a15f..521e4c9fbb2292ce124cef6251d9871efe8be595 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright © 2020 Damyan Ivanov.
+ * Copyright © 2021 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -30,8 +30,11 @@ abstract public class Gateway {
                 return new net.ktnx.mobileledger.json.v1_15.Gateway();
             case v1_19_1:
                 return new net.ktnx.mobileledger.json.v1_19_1.Gateway();
                 return new net.ktnx.mobileledger.json.v1_15.Gateway();
             case v1_19_1:
                 return new net.ktnx.mobileledger.json.v1_19_1.Gateway();
+            case v1_23:
+                return new net.ktnx.mobileledger.json.v1_23.Gateway();
             default:
             default:
-                throw new RuntimeException("Unsupported JSON API version " + apiVersion);
+                throw new RuntimeException(
+                        "JSON API version " + apiVersion + " save implementation missing");
         }
     }
     public abstract String transactionSaveRequest(LedgerTransaction ledgerTransaction)
         }
     }
     public abstract String transactionSaveRequest(LedgerTransaction ledgerTransaction)