Open lbhsot opened 1 year ago
Bug Description https://github.com/Uniswap/interface/blob/91c20135227b13dc8d75b6be974fb261e9ab6cfd/src/pages/RemoveLiquidity/index.tsx#L121 in onAttemptToApprove method uniswap allow using token approve instead of permit2 when error occur. https://github.com/Uniswap/interface/blob/91c20135227b13dc8d75b6be974fb261e9ab6cfd/src/hooks/usePermit2Allowance.ts#L113 in isePermit2Allowance the only way to approve token is using permit2
onAttemptToApprove
isePermit2Allowance
Steps to Reproduce
eth_signTypedData_v4
Expected Behavior same behaviour between Swap Flow and Remove Liquidity Flow. and all usage of permit2 behave same
Another question:
https://github.com/Uniswap/interface/blob/91c20135227b13dc8d75b6be974fb261e9ab6cfd/src/hooks/usePermit2Allowance.ts#L152
If the token is approved, why still need use permit2 to approve token?
@LunrEclipse @cbachmeier @zzmp @JackShort anyone can help?
Bug Description https://github.com/Uniswap/interface/blob/91c20135227b13dc8d75b6be974fb261e9ab6cfd/src/pages/RemoveLiquidity/index.tsx#L121 in
onAttemptToApprove
method uniswap allow using token approve instead of permit2 when error occur. https://github.com/Uniswap/interface/blob/91c20135227b13dc8d75b6be974fb261e9ab6cfd/src/hooks/usePermit2Allowance.ts#L113 inisePermit2Allowance
the only way to approve token is using permit2Steps to Reproduce
Remove Liquidity Flow
eth_signTypedData_v4
to cobo argusSwap Flow
eth_signTypedData_v4
to cobo argusExpected Behavior same behaviour between Swap Flow and Remove Liquidity Flow. and all usage of permit2 behave same