Conversation
|
@SamuelQZQ I believe all type issues are now fixed. Right after confirmed that everything is good I will proceed to struct types |
|
@21Chani seems like you remove two |
Lol I have posted giga comments about it and then realized that yeah, was checking for invalid types, lol, it took me a while to understand that the file was doing verification only for errors, since the ts-expect error was saying was not necessary anymore, I thought the right was remove it lmao. Types has been fixed and the expect line has been returned 🫡 |
This PR will:
Refactor types aiming a new cleaner approach to make life easier when messing with abi type conversion.
Motivation
At #237 I found myself dealing with a lot troubles having to manage a refactor in files that shouldn't be touched in the pr, because of that I am splitting those small tasks to it's own pr's like this one.
Approaches explanation
I wanted to remove type conversions like this one that was being "recreated" in 3 files:

So I have created a map type for it that will provide type reusability and also easier type reading.

But I had to make it generic with
HighValuebecause I found that sometimes the api needs to usestringinstead ofAnyNumber, so, instead of creating two separated types, you just need to provide the type in generics of the type of Number return you want to manage.Example:
or