Commit f6e6db64 authored by Jack Short's avatar Jack Short Committed by GitHub

fix: pwat stack overflow (#6952)

parent dab445f2
...@@ -75,5 +75,7 @@ export function useRevokeTokenAllowance( ...@@ -75,5 +75,7 @@ export function useRevokeTokenAllowance(
token: Token | undefined, token: Token | undefined,
spender: string spender: string
): () => Promise<{ response: ContractTransaction; info: ApproveTransactionInfo }> { ): () => Promise<{ response: ContractTransaction; info: ApproveTransactionInfo }> {
return useUpdateTokenAllowance(token ? CurrencyAmount.fromRawAmount(token, 0) : undefined, spender) const amount = useMemo(() => (token ? CurrencyAmount.fromRawAmount(token, 0) : undefined), [token])
return useUpdateTokenAllowance(amount, spender)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment