From 1d47a1fbf2c24eab84e39e94a77d1dd87bc8ced7 Mon Sep 17 00:00:00 2001 From: mstfash Date: Sat, 5 Mar 2022 11:40:07 +0200 Subject: [PATCH] fix staking approval issue --- src/containers/Earn/Staking/Stake.tsx | 4 ++-- src/hooks/useStaking.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/containers/Earn/Staking/Stake.tsx b/src/containers/Earn/Staking/Stake.tsx index b643ee42..74d6caf1 100644 --- a/src/containers/Earn/Staking/Stake.tsx +++ b/src/containers/Earn/Staking/Stake.tsx @@ -25,8 +25,8 @@ const Stake = () => { const [depositApprovalState, approveDeposit] = useTokenApproval( parsedAmounts.stakingAmount, - geb?.contracts.stakingFirstResort.address, - geb?.contracts.stakingToken.address + geb?.contracts.stakingToken.address, + geb?.contracts.stakingFirstResort.address ) const stakingValue = parsedAmounts.stakingAmount diff --git a/src/hooks/useStaking.ts b/src/hooks/useStaking.ts index ed5e9636..4ba94f5f 100644 --- a/src/hooks/useStaking.ts +++ b/src/hooks/useStaking.ts @@ -441,6 +441,7 @@ export function useAddStaking(): { if (!library || !stakingAmount || !account || !geb) { return } + try { const stakingAmountBN = ethers.utils.parseEther(stakingAmount)