Why calling paraswap.approveToken(...) multiple times does not fail?

Viewed 6

Suppose I'm calling this block for the same wallet and token address.

// paraswap.getAllowance(USER_ADDRESS, tokensOfInterest[0].address)
//     .catch(err => log(err))
//     .then(allowance =>
//         paraswap.approveToken(AMOUNT, tokensOfInterest[0].address).then(txHash => ({ allowance, txHash })))
//     .then(({ allowance, txHash }) => {
//         log('Allowance,', allowance)
//         log('txHash', txHash)
//     })

It keeps use fees. Proof: enter image description here

My question is why is the transaction not failing, and is the catch block not called?

0 Answers
Related