From b1c493771df8c675f82fd0a692eab8bce9897b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Ro=C4=8Dek?= Date: Thu, 29 Aug 2024 15:38:34 +0200 Subject: [PATCH] BATM-6591: changed log when address is invalid for EGLD, ADA and BNB --- .../bitcoin/BinanceCoinAddressValidator.java | 2 +- .../cardano/CardanoAddressValidator.java | 4 ++-- .../extra/elrond/ElrondAddressValidator.java | 19 ++++++++++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/bitcoin/BinanceCoinAddressValidator.java b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/bitcoin/BinanceCoinAddressValidator.java index c0f85f357..836a42763 100644 --- a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/bitcoin/BinanceCoinAddressValidator.java +++ b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/bitcoin/BinanceCoinAddressValidator.java @@ -36,7 +36,7 @@ public boolean isAddressValid(String address) { } return true; } catch (AddressFormatException e) { - log.error("Cannot decode Bech32 address", e); + log.info("Invalid BNB address format."); return false; } } diff --git a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/cardano/CardanoAddressValidator.java b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/cardano/CardanoAddressValidator.java index e1f2ce97f..49216e720 100644 --- a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/cardano/CardanoAddressValidator.java +++ b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/cardano/CardanoAddressValidator.java @@ -1,5 +1,5 @@ /************************************************************************************* - * Copyright (C) 2014-2020 GENERAL BYTES s.r.o. All rights reserved. + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. * * This software may be distributed and modified under the terms of the GNU * General Public License version 2 (GPL2) as published by the Free Software @@ -43,7 +43,7 @@ public boolean isAddressValid(String address) { } return false; } catch (AddressFormatException e) { - log.error("Cannot decode address", e); + log.info("Invalid ADA address format."); return false; } } diff --git a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/elrond/ElrondAddressValidator.java b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/elrond/ElrondAddressValidator.java index 2e2982f90..fc42b24ef 100644 --- a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/elrond/ElrondAddressValidator.java +++ b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/elrond/ElrondAddressValidator.java @@ -1,3 +1,20 @@ +/************************************************************************************* + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. + * + * This software may be distributed and modified under the terms of the GNU + * General Public License version 2 (GPL2) as published by the Free Software + * Foundation and appearing in the file GPL2.TXT included in the packaging of + * this file. Please note that GPL2 Section 2[b] requires that all works based + * on this software must also be made publicly available under the terms of + * the GPL2 ("Copyleft"). + * + * Contact information + * ------------------- + * + * GENERAL BYTES s.r.o. + * Web : http://www.generalbytes.com + * + ************************************************************************************/ package com.generalbytes.batm.server.extensions.extra.elrond; import com.generalbytes.batm.server.coinutil.AddressFormatException; @@ -19,7 +36,7 @@ public boolean isAddressValid(String address) { } return true; } catch (AddressFormatException e) { - log.error("Cannot decode Bech32 address", e); + log.info("Invalid EGLD address format."); return false; } }