Recommand · August 23, 2021 0

Check if wallet is approved to spend token

I was wondering if there’s a way to check if a token is already approved for spending. I’m not asking how to approve the token for spending, I’ve figured that part out via reference: How to approve a token for spending on (Uniswap router contract). I’d like my script to check first before selling a token and then decide, based on the result, to either run approval first or skip it. That way it’s not approving a token that’s already approved each time it buys and sells the same token. Thanks for all your help anticipation.