-
Notifications
You must be signed in to change notification settings - Fork 99
Conversation
in: 'query', | ||
description: 'could be hourly', | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aminlatifi
it's not related to conversion rate, but I think it was good to refactor this part
@aminlatifi but if you have any idea I can implement it ( I didn't find any good solution) |
src/utils/tokenHelper.js
Outdated
@@ -41,9 +41,32 @@ function getTokenBySymbol(symbol) { | |||
return tokensBySymbols[symbol] || { symbol }; | |||
} | |||
|
|||
const isSymbolInTokenWhitelist = symbol => { | |||
return Boolean( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a set which includes the symbols. The set should be initialized once when the application start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aminlatifi done
src/utils/tokenHelper.js
Outdated
const getValidSymbols = () => { | ||
const symbols = []; | ||
getWhiteListTokens().forEach(token => { | ||
if (!symbols.includes(token.symbol)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same set can be used here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aminlatifi done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comments
related to #587, Giveth/giveth-dapp#2286