Switch swap type filter results

This commit is contained in:
koalasat
2025-02-13 11:50:28 +01:00
parent 11d1537fc6
commit 4e38be6cf8

View File

@ -45,7 +45,7 @@ const BookControl = ({
} else if (fav.mode === 'fiat') {
setOrderType(fav.type === 1 ? 'buy' : 'sell');
} else {
setOrderType(fav.type === 1 ? 'swapout' : 'swapin');
setOrderType(fav.type === 1 ? 'swapin' : 'swapout');
}
}, [fav.mode, fav.type]);
@ -67,9 +67,9 @@ const BookControl = ({
const currency = fav.currency === 1000 ? 0 : fav.currency;
setFav({ ...fav, mode: 'fiat', type: 1, currency });
} else if (select.props.value === 'swapin') {
setFav({ ...fav, mode: 'swap', type: 0, currency: 1000 });
} else if (select.props.value === 'swapout') {
setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 });
} else if (select.props.value === 'swapout') {
setFav({ ...fav, mode: 'swap', type: 0, currency: 1000 });
} else {
const currency = fav.currency === 1000 ? 0 : fav.currency;
setFav({ ...fav, mode: 'fiat', type: null, currency });