[v0.32.0] loadApprovalStatusForOrder still forcing user to choose custom spending cap
I just upgraded to v0.32.0 and read the release notes. I thought it was supposed to now set the minimal viable approval now but I still get MetaMask asking to set a custom spending cap for WETH or choose max.
Here is part of my code for V4 SDK:
const approvalStatusForTaker = await swapSdkV4?.loadApprovalStatusForOrder(order_data, 'TAKER');
if (!approvalStatusForTaker?.contractApproved) {
const approvalTx = await swapSdkV4?.approveTokenOrNftByAsset(ethToSwapTaker, walletAddressTaker);
const approvalTxReceipt = await approvalTx?.wait();
}
Is this supposed to happen? It seems the same as the previous release. Thanks!
Facing the same issue here, although i'm using V3 of the SDK. It looks like if the user approves anything other than default i.e. a custom amount or using MAX, the return value from loadApprovalStatus still returns false.
which ERC20 are you guys using? I had this issue, with USDT, and I notice that they have a different way to manage approval, with a spending cap and the allowance returns a number instead of a flag, for this case I used the contract directly to check the remaining spending cap