mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-05 22:10:10 +00:00
It was the other way around
This commit is contained in:
parent
6520c01ca8
commit
3278aab28f
@ -43,9 +43,9 @@ const BookControl = ({
|
||||
if (fav.type === null) {
|
||||
setOrderType('any');
|
||||
} else if (fav.mode === 'fiat') {
|
||||
setOrderType(fav.type === 0 ? 'buy' : 'sell');
|
||||
setOrderType(fav.type === 1 ? 'buy' : 'sell');
|
||||
} else {
|
||||
setOrderType(fav.type === 0 ? 'swapout' : 'swapin');
|
||||
setOrderType(fav.type === 1 ? 'swapout' : 'swapin');
|
||||
}
|
||||
}, [fav.mode, fav.type]);
|
||||
|
||||
@ -62,14 +62,14 @@ const BookControl = ({
|
||||
const handleOrderTypeChange = (mouseEvent: React.MouseEvent, select: object): void => {
|
||||
if (select.props.value === 'sell') {
|
||||
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
||||
setFav({ ...fav, mode: 'fiat', type: 1, currency });
|
||||
setFav({ ...fav, mode: 'fiat', type: 0, currency });
|
||||
} else if (select.props.value === 'buy') {
|
||||
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
||||
setFav({ ...fav, mode: 'fiat', type: 0, currency });
|
||||
setFav({ ...fav, mode: 'fiat', type: 1, currency });
|
||||
} else if (select.props.value === 'swapin') {
|
||||
setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 });
|
||||
} else if (select.props.value === 'swapout') {
|
||||
setFav({ ...fav, mode: 'swap', type: 0, currency: 1000 });
|
||||
} else if (select.props.value === 'swapout') {
|
||||
setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 });
|
||||
} else {
|
||||
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
||||
setFav({ ...fav, mode: 'fiat', type: null, currency });
|
||||
|
Loading…
Reference in New Issue
Block a user