Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing logic check on getTokenPriceInNativeAsset function #488

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

lgahdl
Copy link
Contributor

@lgahdl lgahdl commented Jul 17, 2023

No description provided.

Comment on lines 36 to 37
isUndefined(data[tokenAddress.toLowerCase()]) ||
isUndefined(data[tokenAddress.toLowerCase()][this.nativeAssetId])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need loadash for this? Why not simply check for undefined?

Suggested change
isUndefined(data[tokenAddress.toLowerCase()]) ||
isUndefined(data[tokenAddress.toLowerCase()][this.nativeAssetId])
data[tokenAddress.toLowerCase()] === undefined ||
data[tokenAddress.toLowerCase()][this.nativeAssetId] === undefined

using === undefined instead of lodash
@brunoguerios brunoguerios merged commit 1bd16e0 into develop Jul 17, 2023
3 checks passed
@brunoguerios brunoguerios deleted the fix-get-token-price-native-asset branch July 17, 2023 18:27
@johngrantuk johngrantuk mentioned this pull request Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants