mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-08 07:11:35 +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) {
|
if (fav.type === null) {
|
||||||
setOrderType('any');
|
setOrderType('any');
|
||||||
} else if (fav.mode === 'fiat') {
|
} else if (fav.mode === 'fiat') {
|
||||||
setOrderType(fav.type === 0 ? 'buy' : 'sell');
|
setOrderType(fav.type === 1 ? 'buy' : 'sell');
|
||||||
} else {
|
} else {
|
||||||
setOrderType(fav.type === 0 ? 'swapout' : 'swapin');
|
setOrderType(fav.type === 1 ? 'swapout' : 'swapin');
|
||||||
}
|
}
|
||||||
}, [fav.mode, fav.type]);
|
}, [fav.mode, fav.type]);
|
||||||
|
|
||||||
@ -62,14 +62,14 @@ const BookControl = ({
|
|||||||
const handleOrderTypeChange = (mouseEvent: React.MouseEvent, select: object): void => {
|
const handleOrderTypeChange = (mouseEvent: React.MouseEvent, select: object): void => {
|
||||||
if (select.props.value === 'sell') {
|
if (select.props.value === 'sell') {
|
||||||
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
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') {
|
} else if (select.props.value === 'buy') {
|
||||||
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
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') {
|
} 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 });
|
setFav({ ...fav, mode: 'swap', type: 0, currency: 1000 });
|
||||||
|
} else if (select.props.value === 'swapout') {
|
||||||
|
setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 });
|
||||||
} else {
|
} else {
|
||||||
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
const currency = fav.currency === 1000 ? 0 : fav.currency;
|
||||||
setFav({ ...fav, mode: 'fiat', type: null, currency });
|
setFav({ ...fav, mode: 'fiat', type: null, currency });
|
||||||
|
Loading…
Reference in New Issue
Block a user