From 379b4f4fb3983099f6665ad6f46b6e1ab602ff69 Mon Sep 17 00:00:00 2001 From: charvam Date: Tue, 20 Apr 2021 15:18:55 +0200 Subject: [PATCH 1/4] ET-907 Extended fiats exceptions. --- gradle.properties | 2 +- .../src/main/java/io/everytrade/server/model/Currency.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index ab9069be..fe7c47af 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=2.2.3 +projectVersion=2.3.1 pf4jVersion=3.4.0 xchangeVersion=5.0.4 requiredEverytradeVersion=>=20210303 diff --git a/plugin-api/src/main/java/io/everytrade/server/model/Currency.java b/plugin-api/src/main/java/io/everytrade/server/model/Currency.java index eafc5edb..94526cfb 100644 --- a/plugin-api/src/main/java/io/everytrade/server/model/Currency.java +++ b/plugin-api/src/main/java/io/everytrade/server/model/Currency.java @@ -166,11 +166,11 @@ public static List getFiats() { .collect(Collectors.toList()); } - public static Set getFiatsExcept(Currency exception) { + public static Set getFiatsExcept(Set exceptions) { return Arrays .stream(values()) .filter(Currency::isFiat) - .filter(it -> !exception.equals(it)) + .filter(it -> !exceptions.contains(it)) .collect(Collectors.toCollection(() -> EnumSet.noneOf(Currency.class))); } } From cca64af488fc85355e563d2e5d5de69aec997ba8 Mon Sep 17 00:00:00 2001 From: charvam Date: Tue, 20 Apr 2021 15:21:00 +0200 Subject: [PATCH 2/4] ET-907 Updated required ET version. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index fe7c47af..e4a3dcdf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ projectVersion=2.3.1 pf4jVersion=3.4.0 xchangeVersion=5.0.4 -requiredEverytradeVersion=>=20210303 +requiredEverytradeVersion=>=20210420 checkstyleVersion=8.34 spotbugsVersion=4.1.2 owaspDependencyCheckGradlePluginVersion=6.0.3 From 0a5f12798fdcbe2a8a2014d8fe6e36b0a6ab8002 Mon Sep 17 00:00:00 2001 From: charvam Date: Tue, 20 Apr 2021 15:33:57 +0200 Subject: [PATCH 3/4] ET-907 Updated version. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e4a3dcdf..da57833b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=2.3.1 +projectVersion=3.0.0 pf4jVersion=3.4.0 xchangeVersion=5.0.4 requiredEverytradeVersion=>=20210420 From 7c67e893c91b92aa1eb1df3b31f1a041fcefe0aa Mon Sep 17 00:00:00 2001 From: charvam Date: Tue, 20 Apr 2021 15:59:00 +0200 Subject: [PATCH 4/4] ET-907 Make API extension compatible. --- gradle.properties | 4 ++-- .../src/main/java/io/everytrade/server/model/Currency.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index da57833b..fe7c47af 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ -projectVersion=3.0.0 +projectVersion=2.3.1 pf4jVersion=3.4.0 xchangeVersion=5.0.4 -requiredEverytradeVersion=>=20210420 +requiredEverytradeVersion=>=20210303 checkstyleVersion=8.34 spotbugsVersion=4.1.2 owaspDependencyCheckGradlePluginVersion=6.0.3 diff --git a/plugin-api/src/main/java/io/everytrade/server/model/Currency.java b/plugin-api/src/main/java/io/everytrade/server/model/Currency.java index 94526cfb..ab04c406 100644 --- a/plugin-api/src/main/java/io/everytrade/server/model/Currency.java +++ b/plugin-api/src/main/java/io/everytrade/server/model/Currency.java @@ -166,6 +166,10 @@ public static List getFiats() { .collect(Collectors.toList()); } + public static Set getFiatsExcept(Currency exception) { + return getFiatsExcept(Set.of(exception)); + } + public static Set getFiatsExcept(Set exceptions) { return Arrays .stream(values())