From 11b25eb380aa419e778050a90e29faf829ac5ff0 Mon Sep 17 00:00:00 2001 From: RXRD <118821868+RiXelanya@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:44:13 +0700 Subject: [PATCH] fix: price formatting (#967) Update StakingServiceTab.vue --- .../Dashboard/Customer/Home/MyTest/StakingServiceTab.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/Dashboard/Customer/Home/MyTest/StakingServiceTab.vue b/src/views/Dashboard/Customer/Home/MyTest/StakingServiceTab.vue index 878ec669..fbfedf39 100644 --- a/src/views/Dashboard/Customer/Home/MyTest/StakingServiceTab.vue +++ b/src/views/Dashboard/Customer/Home/MyTest/StakingServiceTab.vue @@ -7,7 +7,7 @@ ) template(v-slot:[`item.id`]="{ item }") .customer-staking-tab__id - div {{ formatId(item.request.hash) }} + div {{ "N/A" }} template(v-slot:[`item.country`]="{ item }") .customer-staking-tab__country @@ -105,6 +105,7 @@ import { queryLastOrderHashByCustomer, queryServiceById, queryLabById, queryOrde import { fmtReferenceFromHex } from "@/common/lib/string-format" import { queryGetServiceOfferById } from "@/common/lib/polkadot-provider/query/service-request" import { formatPrice } from "@/common/lib/price-format" +import Web3 from "web3" export default { @@ -229,7 +230,7 @@ export default { }, setAmount(amount) { - const formatedAmount = this.web3.utils.fromWei(String(amount.replaceAll(",", "")), "ether") + const formatedAmount = Web3.utils.fromWei(String(amount.replaceAll(",", "")), "ether") return formatedAmount },