-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Use burner-core for token balances #223
base: master
Are you sure you want to change the base?
Conversation
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.
Uses burner-core 0.0.4
d037b1d
to
22de168
Compare
Updated this to use the newest packages, and rebased to the recent changes with burner-core |
78a95b2
to
42650ba
Compare
@@ -23,6 +24,9 @@ if (process.env.REACT_APP_MODE === 'local') { | |||
} | |||
|
|||
const assets = [mainAsset, dai, eth]; | |||
if (token) { | |||
assets.unshift(token); |
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.
Mind elaborating what this does?
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.
Assets is an array of all tokens/coins we will display in the app. If the token variable is set here, then we want to add that to the array so we can display it in the list of tokens.
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.
OK, I believe a comment would clear that up nicely. But up to you.
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.
Actually let's merge it and comment it later.
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.
I've just taken a look and left some comments. Looks good. Haven't tested locally.
42650ba
to
8273d41
Compare
8273d41
to
7f6aa5a
Compare
Thanks for the review @TimDaub, you caught some good issues! I've addressed all the issues. This PR hasn't actually been tested on a token in a bit, I'll try to do a local test soon. |
OK let me know how it goes and feel free to merge after testing! Thx |
PR #211 integrated burner-core for reading the main 3 assets (xDai, Dai and Eth), this PR expands on that by using burner-core to read the balance of an additional token.
The largest impact on the codebase is the removal of the ERC20TOKEN and ERC20VENDOR variables, replacing them with data from assets.js, as well as hardcoded contract names.