better handle clearing swap form
This commit is contained in:
parent
5e113692f4
commit
986c6ce57a
|
@ -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 = ''
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
|
|
|
@ -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} />
|
||||
|
|
Loading…
Reference in New Issue