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

Enable direct token approve call from kyber network contract #1058

Open
ilanDoron opened this issue Aug 11, 2020 · 0 comments
Open

Enable direct token approve call from kyber network contract #1058

ilanDoron opened this issue Aug 11, 2020 · 0 comments

Comments

@ilanDoron
Copy link
Contributor

Currently in kyber network token.safeApprove is called as part of the token listing process.

when adding token we approve to MAX_INT.
when removing token approving to 0.

when approving to MAX_INT the current value must be 0 or the approve call reverts.
with current issue. a token was migrated to a new contract and the allowance array was copied. so network already had allowance for this token and this reserve.
this caused the listing process to fail. since token.safeApprove was approving to non zero while the allowance was already non zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant