From: Damyan Ivanov Date: Sun, 26 Dec 2021 21:35:54 +0000 (+0200) Subject: add support for 1.23 also when adding transactions X-Git-Tag: v0.21.1~2 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=3c8ec123d29f8b67b8219352e7ecfd21cb005ce4;p=mobile-ledger.git add support for 1.23 also when adding transactions the previous 1.23 support concerned only transaction/account retrieval --- diff --git a/app/src/main/java/net/ktnx/mobileledger/json/Gateway.java b/app/src/main/java/net/ktnx/mobileledger/json/Gateway.java index 97789673..521e4c9f 100644 --- a/app/src/main/java/net/ktnx/mobileledger/json/Gateway.java +++ b/app/src/main/java/net/ktnx/mobileledger/json/Gateway.java @@ -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)