Skip to content

Commit 7eab2a7

Browse files
authored
Merge pull request #164 from Polygant/release/1.3.6
Release/1.3.6
2 parents f873a7e + ce67a87 commit 7eab2a7

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

src/components/main/userOrders/orderRow.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
:data-thead="$t('common.price')"
7676
>
7777
<div v-if="order.type === 4" class="orders-table__td">
78-
{{ $t("common.stop") }}: {{ order.stop }}<br />
78+
{{ $t("common.stop") }}:
79+
{{ addSpaceFixDecimal(order.stop, coins[quote].decimals) }}<br />
7980
{{ $t("common.limit2") }}:
8081
{{ addSpaceFixDecimal(order.price, coins[quote].decimals) }}
8182
</div>
@@ -89,7 +90,8 @@
8990
:data-thead="$t('common.price')"
9091
>
9192
<div v-if="order.type === 4" class="orders-table__td">
92-
{{ $t("common.stop") }}: {{ order.stop }}<br />
93+
{{ $t("common.stop") }}:
94+
{{ addSpaceFixDecimal(order.stop, coins[quote].decimals) }}<br />
9395
{{ $t("common.limit2") }}:
9496
{{ addSpaceFixDecimal(order.price, coins[quote].decimals) }}
9597
</div>

src/components/modals/UpdateOrderModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export default {
214214
215215
methods: {
216216
toNumber(value) {
217-
return this.addSpaceFixDecimal(value.toString().replace(",", "."));
217+
return this.getFixedDecimal(value.toString().replace(",", "."));
218218
},
219219
220220
onSubmit() {

src/modules/exchange/pages/FastBuySell.vue

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,7 @@ export default {
327327
let fee =
328328
this.receiveAmount *
329329
this.coins[this.cur2]["fee"]["exchange"]["value"];
330-
fee = this.addSpaceFixDecimal(
331-
fee,
332-
this.coins[this.cur2]?.decimals || 8
333-
);
330+
fee = this.getFixedDecimal(fee, this.coins[this.cur2]?.decimals || 8);
334331
return this.getRegularNumber(fee);
335332
}
336333
@@ -355,10 +352,10 @@ export default {
355352
: 0;
356353
},
357354
cur1notEnough() {
358-
return this.addSpaceFixDecimal(this.currentBalance) < this.give;
355+
return this.getFixedDecimal(this.currentBalance) < this.give;
359356
},
360357
cur2notEnough() {
361-
return this.addSpaceFixDecimal(this.currentBalance) < this.get;
358+
return this.getFixedDecimal(this.currentBalance) < this.get;
362359
},
363360
limits() {
364361
const coin = this.coins[this.cur1];
@@ -381,8 +378,8 @@ export default {
381378
settledAmount() {
382379
const rest = this.isFiat(this.cur2) ? 2 : 8;
383380
return (
384-
this.addSpaceFixDecimal(this.receiveAmount, rest) -
385-
this.addSpaceFixDecimal(this.exchangeFee, rest)
381+
this.getFixedDecimal(this.receiveAmount, rest) -
382+
this.getFixedDecimal(this.exchangeFee, rest)
386383
).toFixed(rest);
387384
},
388385
},
@@ -536,11 +533,11 @@ export default {
536533
},
537534
setCur1AmountPercentHandler(percent) {
538535
const result =
539-
(this.addSpaceFixDecimal(this.currentBalance) / 100) * percent;
536+
(this.getFixedDecimal(this.currentBalance) / 100) * percent;
540537
this.processexchange(result, percent);
541538
},
542539
checkAndSetAmount(result, percent = null) {
543-
result = this.addSpaceFixDecimal(result);
540+
result = this.getFixedDecimal(result);
544541
if (Number.isNaN(result) || result === 0) return false;
545542
if (percent && this.give !== result) {
546543
this.give = result;
@@ -607,7 +604,7 @@ export default {
607604
}
608605
},
609606
checkAndSetAmountEx(result, percent = null) {
610-
result = this.addSpaceFixDecimal(result);
607+
result = this.getFixedDecimal(result);
611608
if (Number.isNaN(result) || result === 0) return false;
612609
if (percent && this.get !== result) {
613610
this.get = result;
@@ -811,8 +808,8 @@ export default {
811808
this.maintimer && clearTimeout(this.maintimer);
812809
813810
if (this.give !== "") {
814-
if (this.addSpaceFixDecimal(this.give) > 0.0) {
815-
qUANTITY = this.addSpaceFixDecimal(this.give);
811+
if (this.getFixedDecimal(this.give) > 0.0) {
812+
qUANTITY = this.getFixedDecimal(this.give);
816813
}
817814
}
818815
this.operation = opertype;
@@ -845,13 +842,13 @@ export default {
845842
if (
846843
!this.give ||
847844
this.give === "" ||
848-
this.addSpaceFixDecimal(this.give) === 0
845+
this.getFixedDecimal(this.give) === 0
849846
) {
850847
this.get = "";
851848
this.receiveAmount = 0;
852849
} else {
853850
this.receiveAmount = response.data["cost"]
854-
? this.addSpaceFixDecimal(
851+
? this.getFixedDecimal(
855852
response.data["cost"],
856853
this.coins[this.cur2]?.decimals || 8
857854
)
@@ -867,7 +864,7 @@ export default {
867864
!this.times &&
868865
this.balance[this.cur1] &&
869866
this.balance[this.cur1].actual >
870-
this.addSpaceFixDecimal(this.give)
867+
this.getFixedDecimal(this.give)
871868
) {
872869
this.times = true;
873870
@@ -926,8 +923,8 @@ export default {
926923
this.maintimer && clearTimeout(this.maintimer);
927924
928925
if (this.give !== "") {
929-
if (this.addSpaceFixDecimal(this.get) > 0.0) {
930-
qUANTITY = this.addSpaceFixDecimal(this.get);
926+
if (this.getFixedDecimal(this.get) > 0.0) {
927+
qUANTITY = this.getFixedDecimal(this.get);
931928
}
932929
}
933930
this.operation = opertype;
@@ -950,7 +947,7 @@ export default {
950947
if (
951948
!this.get ||
952949
this.get === "" ||
953-
this.addSpaceFixDecimal(this.get) === 0
950+
this.getFixedDecimal(this.get) === 0
954951
) {
955952
this.give = "";
956953
this.receiveAmount = 0;
@@ -969,7 +966,7 @@ export default {
969966
!this.times &&
970967
this.balance[this.cur2] &&
971968
this.balance[this.cur2].actual >
972-
this.addSpaceFixDecimal(this.get)
969+
this.getFixedDecimal(this.get)
973970
) {
974971
this.times = true;
975972

0 commit comments

Comments
 (0)