diff --git a/src/components/Dialogs/sellDialog.vue b/src/components/Dialogs/sellDialog.vue index 61608a5..91c552e 100644 --- a/src/components/Dialogs/sellDialog.vue +++ b/src/components/Dialogs/sellDialog.vue @@ -134,6 +134,7 @@ import {DownOutlined, UpOutlined} from "@ant-design/icons-vue"; // import LoadingDialog from "@/components/Dialogs/loadingDialog.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, @@ -182,7 +183,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(); @@ -196,6 +197,7 @@ const sellConfirm = async () => { }, 2000); } } catch (e) { + console.log(e.message) message.error("Your product failed to be listed"); } } else { diff --git a/src/configs/priceCalculate.js b/src/configs/priceCalculate.js index 221e8f3..74e8c72 100644 --- a/src/configs/priceCalculate.js +++ b/src/configs/priceCalculate.js @@ -44,7 +44,7 @@ export const feePrice = (price) => { } export const totalPrice = (price) => { - return Number(Number(price) + Number(price) * 0.02 + Number(price) * 0.02).toFixed(5) + return Number(Number(price) + Number(price) * 0.04).toFixed(5) } // 处理时间回显