better handle clearing swap form

This commit is contained in:
tjs 2022-12-07 20:04:48 -05:00
parent 5e113692f4
commit 986c6ce57a
2 changed files with 7 additions and 1 deletions

View File

@ -101,12 +101,18 @@ const SwapForm = () => {
const setAmountInFormValue = useCallback((amountIn: string) => {
set((s) => {
s.swap.amountIn = amountIn
if (!parseFloat(amountIn)) {
s.swap.amountOut = ''
}
})
}, [])
const setAmountOutFormValue = useCallback((amountOut: string) => {
set((s) => {
s.swap.amountOut = amountOut
if (!parseFloat(amountOut)) {
s.swap.amountIn = ''
}
})
}, [])

View File

@ -63,7 +63,7 @@ function MyApp({ Component, pageProps }: AppProps) {
<ConnectionProvider endpoint={endpoint}>
<WalletProvider wallets={wallets} onError={onError}>
<EnhancedWalletProvider>
<ThemeProvider defaultTheme="Dark">
<ThemeProvider defaultTheme="Mango Classic">
<ViewportProvider>
<Layout>
<Component {...pageProps} />