mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
Add check for domain for epicbox address
This commit is contained in:
parent
47e63cca68
commit
ca6fa2d101
1 changed files with 10 additions and 1 deletions
|
@ -1816,6 +1816,11 @@ class EpicCashWallet extends CoinServiceAPI
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool validateAddress(String address) {
|
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 (address.startsWith("http://") || address.startsWith("https://")) {
|
||||||
if (Uri.tryParse(address) != null) {
|
if (Uri.tryParse(address) != null) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1824,7 +1829,11 @@ class EpicCashWallet extends CoinServiceAPI
|
||||||
|
|
||||||
String validate = validateSendAddress(address);
|
String validate = validateSendAddress(address);
|
||||||
if (int.parse(validate) == 1) {
|
if (int.parse(validate) == 1) {
|
||||||
return true;
|
//Check if address contrains a domain
|
||||||
|
if (address.contains("@")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue