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

add ocean token & any token balance to Account #158

Merged
merged 3 commits into from
Jul 15, 2020
Merged

Conversation

alexcos20
Copy link
Member

@alexcos20 alexcos20 commented Jul 15, 2020

closes #154

@alexcos20 alexcos20 self-assigned this Jul 15, 2020
@alexcos20 alexcos20 requested a review from 0x3bfc July 15, 2020 10:19
@0x3bfc 0x3bfc requested a review from kremalicious July 15, 2020 10:30
@kremalicious
Copy link
Contributor

Looks cool for OCEAN & ETH, that helps a lot.

As for all the other tokens I'm not sure yet where I would get the token address from for the tokens a user has in their wallet. Say user has 20 different tokens in their wallet, 3 of them are data tokens related to our market. How would I detect and display those tokens?

That was a bit of the thinking behind returning an object or array I can just iterate on in UI.

@alexcos20
Copy link
Member Author

When talking about an asset, then you can use ddo.datatoken to get dt address.
But just having a list with all dt, it's almost impossible.

There is a way: loop through factory events, get all dt created and check balance for each of them. But in production, will drain your infura key in a day.

@kremalicious
Copy link
Contributor

got it, sounds all good then

@0x3bfc
Copy link
Contributor

0x3bfc commented Jul 15, 2020

Looks cool for OCEAN & ETH, that helps a lot.

As for all the other tokens I'm not sure yet where I would get the token address from for the tokens a user has in their wallet. Say user has 20 different tokens in their wallet, 3 of them are data tokens related to our market. How would I detect and display those tokens?

That was a bit of the thinking behind returning an object or array I can just iterate on in UI.

Can we move this to the issues ? It is well know UX issue especially if the number of dataToken addresses is large.

@alexcos20 alexcos20 merged commit 1ebdff5 into develop Jul 15, 2020
@0x3bfc 0x3bfc deleted the feature/balances branch July 15, 2020 10:59
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.

Balance helper
3 participants