fixed types
Some checks failed
Deploy FrontEnd / deploy-staging (push) Has been cancelled
Deploy FrontEnd / deploy-production (push) Has been cancelled
CI script / lint (push) Has been cancelled
CI script / build (push) Has been cancelled
CI script / SonarCloud (push) Has been cancelled

This commit is contained in:
hueso
2024-10-09 23:16:53 -03:00
parent fd61376b36
commit 135a01b7fd
2 changed files with 4 additions and 4 deletions

View File

@@ -17,9 +17,9 @@ const Tokens: { [key in NetworkEnum]: {[key in TokenEnum] :string} } = {
};
export const getTokenByAddress = (address: string) => {
for ( let network in NetworkEnum ) {
for (const token of Object.keys(Tokens[network])) {
if (address === Tokens[network][token as TokenEnum]) {
for ( const [, network] of Object.entries(NetworkEnum) ) {
for (const token of Object.keys(Tokens[network as NetworkEnum])) {
if (address === Tokens[network as NetworkEnum][token as TokenEnum]) {
return token as TokenEnum;
}
}