From feac4df35131813c305fbfc0b96653a32ffba3f7 Mon Sep 17 00:00:00 2001 From: Zachary Thielemann Date: Sat, 25 Sep 2021 07:25:19 -0400 Subject: [PATCH] fix: approvals --- .../Market/OrderCard/components/RemoveLiquidity/Downgrade.tsx | 4 +++- src/components/Market/OrderCard/components/Swap/Downgrade.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Market/OrderCard/components/RemoveLiquidity/Downgrade.tsx b/src/components/Market/OrderCard/components/RemoveLiquidity/Downgrade.tsx index 95cafdd..0f61695 100644 --- a/src/components/Market/OrderCard/components/RemoveLiquidity/Downgrade.tsx +++ b/src/components/Market/OrderCard/components/RemoveLiquidity/Downgrade.tsx @@ -285,7 +285,9 @@ const Downgrade = () => { const handleApproval = useCallback( (token: string, spender: string, amount: string) => { onApprove(token, spender, amount) - .then() + .then(() => { + setApproved(true) + }) .catch((error) => { addNotif(0, `Approving ${token} for ${spender}`, error.message, '') }) diff --git a/src/components/Market/OrderCard/components/Swap/Downgrade.tsx b/src/components/Market/OrderCard/components/Swap/Downgrade.tsx index 7f2842e..caf071b 100644 --- a/src/components/Market/OrderCard/components/Swap/Downgrade.tsx +++ b/src/components/Market/OrderCard/components/Swap/Downgrade.tsx @@ -286,7 +286,9 @@ const Downgrade = () => { const handleApproval = useCallback( (token: string, spender: string, amount: string) => { onApprove(token, spender, amount) - .then() + .then(() => { + setApproved(true) + }) .catch((error) => { addNotif(0, `Approving ${token} for ${spender}`, error.message, '') })