Skip to content

Enable direct token approve call from kyber network contract #1058

@ilanDoron

Description

@ilanDoron

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions