From ca6fa2d101b33eea55e4a8b55aed688d416a2f2e Mon Sep 17 00:00:00 2001 From: likho Date: Wed, 1 Mar 2023 14:27:35 +0200 Subject: [PATCH] Add check for domain for epicbox address --- lib/services/coins/epiccash/epiccash_wallet.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/services/coins/epiccash/epiccash_wallet.dart b/lib/services/coins/epiccash/epiccash_wallet.dart index 8785661c9..2801e0e2b 100644 --- a/lib/services/coins/epiccash/epiccash_wallet.dart +++ b/lib/services/coins/epiccash/epiccash_wallet.dart @@ -1816,6 +1816,11 @@ class EpicCashWallet extends CoinServiceAPI @override bool validateAddress(String address) { + //Invalid address that contains HTTP and epicbox domain + if ((address.startsWith("http://") || address.startsWith("https://")) && + address.contains("@")) { + return false; + } if (address.startsWith("http://") || address.startsWith("https://")) { if (Uri.tryParse(address) != null) { return true; @@ -1824,7 +1829,11 @@ class EpicCashWallet extends CoinServiceAPI String validate = validateSendAddress(address); if (int.parse(validate) == 1) { - return true; + //Check if address contrains a domain + if (address.contains("@")) { + return true; + } + return false; } else { return false; }