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

User model not returning allowances #154

Closed
janklimo opened this issue Mar 21, 2022 · 3 comments
Closed

User model not returning allowances #154

janklimo opened this issue Mar 21, 2022 · 3 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@janklimo
Copy link
Contributor

This will return zeros if a user just gave jar approval:

const allZeros: boolean =
toAdd.depositTokenBalance === "0" &&
toAdd.pAssetBalance === "0" &&
toAdd.pStakedBalance === "0" &&
toAdd.picklePending === "0";

@janklimo janklimo added the type: bug 🐛 Something isn't working label Mar 21, 2022
@robstryker
Copy link
Contributor

I'm sorry, but I don't understand how that's wrong? If a user just gave jar approval, he probably has all zeros, no? I'm lost.

@robstryker
Copy link
Contributor

I've added checks to ensure everything is zero, including allowances, now. So if the field just doesn't exist, you can assume it's all zeros.

@janklimo
Copy link
Contributor Author

That's correct, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants