diff --git a/src/main/Browser/Pages/EasyTrading/components/EasyOrder/EasyOrder.js b/src/main/Browser/Pages/EasyTrading/components/EasyOrder/EasyOrder.js
index 0b144b65..8ae33257 100644
--- a/src/main/Browser/Pages/EasyTrading/components/EasyOrder/EasyOrder.js
+++ b/src/main/Browser/Pages/EasyTrading/components/EasyOrder/EasyOrder.js
@@ -30,6 +30,8 @@ const EasyOrder = () => {
totalPrice: null,
});
+
+
const [order, setOrder] = useState({
tradeFee: new BN(0),
stopLimit: false,
@@ -76,6 +78,12 @@ const EasyOrder = () => {
type: selected?.type ==="ask" ? "bid" : "ask"
})
+ setAlert({
+ submit: false,
+ reqAmount: null,
+ totalPrice: null,
+ })
+
}
const [options, setOptions] = useState({
@@ -99,6 +107,7 @@ const EasyOrder = () => {
pricePerUnit: new BN(bestPrice)
})
}
+
useEffect(() => {
bestPriceHandler()
}, [orderBook, selected])
@@ -110,11 +119,12 @@ const EasyOrder = () => {
const reqAmount = new BN(value);
let range = "baseRange"
if (selected.type === "bid") range = "quoteRange"
+
if (reqAmount.isZero() && reqAmount.isLessThan(selected.pair[range].min)) {
newAlert =
@@ -123,7 +133,7 @@ const EasyOrder = () => {
if (!reqAmount.mod(selected.pair[range].step).isZero()) {
newAlert =
}
setAlert({...alert, reqAmount: newAlert});
@@ -147,18 +157,17 @@ const EasyOrder = () => {
newAlert =
}
-
if (!totalPrice.mod(selected.pair[range].step).isZero()) {
newAlert =
}
setAlert({...alert, totalPrice: newAlert});
@@ -262,6 +271,11 @@ const EasyOrder = () => {
pricePerUnit: new BN(0),
totalPrice: new BN(0),
})
+ setAlert({
+ submit: false,
+ reqAmount: null,
+ totalPrice: null,
+ })
}
const sellOnChangeHandler = (e) => {
const newSell = e.value;
@@ -281,6 +295,11 @@ const EasyOrder = () => {
pricePerUnit: new BN(0),
totalPrice: new BN(0),
})
+ setAlert({
+ submit: false,
+ reqAmount: null,
+ totalPrice: null,
+ })
}
const showBestPrice = () => {
if (order.pricePerUnit.isZero()) return 0
@@ -288,18 +307,14 @@ const EasyOrder = () => {
return new BN(1).dividedBy(order.pricePerUnit).decimalPlaces(selected.pair?.baseAssetPrecision).toFormat()
}
- useEffect(() => {
+/* useEffect(() => {
if (order.totalPrice.isGreaterThan(userAccount?.wallets[selected?.sell]?.free)) {
return setAlert({
...alert,
totalPrice: t('orders.notEnoughBalance')
})
}
- return setAlert({
- ...alert,
- totalPrice: null
- })
- }, [order.totalPrice])
+ }, [order.totalPrice])*/
return (
diff --git a/src/store/sagas/global.js b/src/store/sagas/global.js
index e370348f..3bf4294c 100644
--- a/src/store/sagas/global.js
+++ b/src/store/sagas/global.js
@@ -185,16 +185,16 @@ export function* loadConfig(action) {
}
const assetsScope = {
- TBTC: {min: 0.0000001, step: 0.0000001},
- BTC: {min: 0.0000001, step: 0.0000001},
- TETH: {min: 0.0000001, step: 0.0000001},
- ETH: {min: 0.0000001, step: 0.0000001},
- TBNB: {min: 0.00001, step: 0.00001},
- BNB: {min: 0.00001, step: 0.00001},
+ TBTC: {min: 0.000001, step: 0.000001},
+ BTC: {min: 0.000001, step: 0.000001},
+ TETH: {min: 0.000001, step: 0.000001},
+ ETH: {min: 0.000001, step: 0.000001},
+ TBNB: {min: 0.0001, step: 0.0001},
+ BNB: {min: 0.0001, step: 0.0001},
USDT: {min: 0.01, step: 0.01},
IRT: {min: 50000, step: 1000},
- TRX: {min: 0.0000001, step: 0.0000001},
- SOL: {min: 0.000001, step: 0.000001},
- TON: {min: 0.00001, step: 0.00001},
- DOGE: {min: 0.00001, step: 0.00001},
+ TRX: {min: 0.000001, step: 0.000001},
+ SOL: {min: 0.00001, step: 0.00001},
+ TON: {min: 0.0001, step: 0.0001},
+ DOGE: {min: 0.0001, step: 0.0001},
}
\ No newline at end of file