only set amountIn when swapping if amountOut is gt 0
This commit is contained in:
parent
9d7f8e5158
commit
5832b69902
|
@ -120,7 +120,9 @@ const SwapForm = () => {
|
|||
)
|
||||
|
||||
const handleSwitchTokens = useCallback(() => {
|
||||
if (amountIn?.gt(0)) {
|
||||
setAmountInFormValue(amountOut.toString())
|
||||
}
|
||||
const inputBank = mangoStore.getState().swap.inputBank
|
||||
const outputBank = mangoStore.getState().swap.outputBank
|
||||
set((s) => {
|
||||
|
|
Loading…
Reference in New Issue