修正出售时, 价格设置错误的bug

This commit is contained in:
CounterFire2023 2024-07-03 16:41:42 +08:00
parent e0e11a7a4b
commit b4d4eb2882
2 changed files with 4 additions and 2 deletions

View File

@ -132,6 +132,7 @@ const message = inject("$message");
import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
import {priceCalculated, timeFormat, royaltiesPrice, feePrice, totalPrice} from "@/configs/priceCalculate.js";
import {BlockChain} from "@/components/chain/BlockChain";
import { ethers } from "ethers"
const props = defineProps({
sellDialogVisible: {
type: Boolean,
@ -179,7 +180,7 @@ const sellConfirm = async () => {
contractAddress: props.sellDataArr.contract_address,
tokenId: props.sellDataArr.token_id,
currencyAddress: currency,
currencyAmount: BigInt(totalPrice(priceValue.value) * 1e18),
currencyAmount: ethers.utils.parseEther(totalPrice(priceValue.value)).toString(),
orderExpiry: orderData,
};
const bc = new BlockChain();
@ -193,6 +194,7 @@ const sellConfirm = async () => {
}, 2000);
}
} catch (e) {
console.log(e.message)
message.error("Your product failed to be listed");
}
} else {

View File

@ -44,7 +44,7 @@ export const feePrice = (price) => {
}
export const totalPrice = (price) => {
return Number(Number(price) + Number(price) * 0.02).toFixed(5)
return Number(Number(price) + Number(price) * 0.04).toFixed(5)
}
// 处理时间回显