From bbf0e5e498989ef2e1e48799a75669867a18ac6f Mon Sep 17 00:00:00 2001 From: Zachary Fogg Date: Sat, 26 Nov 2022 10:45:51 -0500 Subject: [PATCH] needed to approve the use of BAO be the veBAO contract for increasing a veBAO lock amount works (#85) --- src/pages/_app.tsx | 4 +--- src/pages/vebao/components/Actions.tsx | 28 ++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index ce3a3be9..a7f23384 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,6 +1,5 @@ import '@/styles/globals.css' import '@fortawesome/fontawesome-svg-core/styles.css' - import { Web3ReactProvider } from '@web3-react/core' import type { AppProps } from 'next/app' import dynamic from 'next/dynamic' @@ -12,7 +11,6 @@ import { Web3Provider } from '@ethersproject/providers' import { QueryClientProvider } from '@tanstack/react-query' import queryClient from '@/utils/queryClient' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' - import fetcher from '@/bao/lib/fetcher' import Header from '@/components/Header' import Page from '@/components/Page' @@ -25,7 +23,7 @@ import TransactionProvider from '@/contexts/Transactions' import TxPopup from '@/components/TxPopup' import '@/components/TxPopup/styles.css' -console.log('v1.0.6') +console.log('v1.0.7') function getLibrary(provider: any): Web3Provider { const library = new Web3Provider(provider) diff --git a/src/pages/vebao/components/Actions.tsx b/src/pages/vebao/components/Actions.tsx index 7a42fac8..53b3c13e 100644 --- a/src/pages/vebao/components/Actions.tsx +++ b/src/pages/vebao/components/Actions.tsx @@ -149,7 +149,7 @@ const Actions = ({ baoBalance, lockInfo }: ActionProps) => {
- {isNaN(lockInfo && parseFloat(formatUnits(lockInfo.balance))) || (lockInfo && lockInfo.balance.lte(0)) ? ( + {isNaN(lockInfo && parseFloat(formatUnits(lockInfo.balance))) || lockInfo.balance.lte(0) ? (
{allowance && allowance.lte(0) ? ( <> @@ -209,7 +209,31 @@ const Actions = ({ baoBalance, lockInfo }: ActionProps) => { ) : (
- {pendingTx ? ( + {allowance && allowance.lte(0) ? ( + <> + {pendingTx ? ( + + ) : ( + + )} + + ) : pendingTx ? (