CW-615-Add-Check-For-Contract-Address (#1387)

* feat: Check if address is a valid Externally Owned Address

* feat: Check if the EVM address received when exchanging tokens is a valid EOA address

* move the contract address check to be only in the case of ThorChain [skip ci]

* some enhancements

* feat: Implement check for contract address for inputAddress when exchanging to ETH

* fix: Remove previous implementation and clean up current implementation for the check for contract address

* chore: Remove unneed space

* chore: Remove unneed space

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
Adegoke David
2024-04-25 03:14:11 +02:00
committed by GitHub
co-authored by OmarHatem
parent dcfb2b2b73
commit 2ac81250c2
30 changed files with 146 additions and 18 deletions
+2 -1
View File
@@ -1057,7 +1057,8 @@ Future<void> generatePubspec(
final inputFile = File(pubspecOutputPath);
final inputText = await inputFile.readAsString();
final inputLines = inputText.split('\n');
final dependenciesIndex = inputLines.indexWhere((line) => line.toLowerCase().contains('dependencies:'));
final dependenciesIndex =
inputLines.indexWhere((line) => line.toLowerCase().contains('dependencies:'));
var output = cwCore;
if (hasMonero) {