]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/json/Gateway.java
add support for 1.23 also when adding transactions
[mobile-ledger.git] / 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
@@ -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();
+            case v1_23:
+                return new net.ktnx.mobileledger.json.v1_23.Gateway();
             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)