mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-23 19:37:52 +00:00
fixed sell order foreign amount parsing
This commit is contained in:
parent
bbad09b5f5
commit
f9b1e2784f
@ -3522,6 +3522,8 @@ export const createSellOrder = async (data, isFromExtension) => {
|
|||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const parsedForeignAmount = Number(data.foreignAmount)?.toFixed(8)
|
||||||
|
|
||||||
const receivingAddress = await getUserWalletFunc(data.foreignBlockchain);
|
const receivingAddress = await getUserWalletFunc(data.foreignBlockchain);
|
||||||
try {
|
try {
|
||||||
const resPermission = await getUserPermission(
|
const resPermission = await getUserPermission(
|
||||||
@ -3530,7 +3532,7 @@ export const createSellOrder = async (data, isFromExtension) => {
|
|||||||
"Do you give this application permission to perform a sell order?",
|
"Do you give this application permission to perform a sell order?",
|
||||||
text2: `${data.qortAmount}${" "}
|
text2: `${data.qortAmount}${" "}
|
||||||
${`QORT`}`,
|
${`QORT`}`,
|
||||||
text3: `FOR ${data.foreignAmount} ${data.foreignBlockchain}`,
|
text3: `FOR ${parsedForeignAmount} ${data.foreignBlockchain}`,
|
||||||
fee: "0.02",
|
fee: "0.02",
|
||||||
},
|
},
|
||||||
isFromExtension
|
isFromExtension
|
||||||
@ -3550,9 +3552,9 @@ export const createSellOrder = async (data, isFromExtension) => {
|
|||||||
{
|
{
|
||||||
creatorPublicKey: userPublicKey,
|
creatorPublicKey: userPublicKey,
|
||||||
qortAmount: parseFloat(data.qortAmount),
|
qortAmount: parseFloat(data.qortAmount),
|
||||||
fundingQortAmount: parseFloat(data.qortAmount) + 0.001,
|
fundingQortAmount: parseFloat(data.qortAmount) + 0.01,
|
||||||
foreignBlockchain: data.foreignBlockchain,
|
foreignBlockchain: data.foreignBlockchain,
|
||||||
foreignAmount: parseFloat(data.foreignAmount),
|
foreignAmount: parseFloat(parsedForeignAmount),
|
||||||
tradeTimeout: 120,
|
tradeTimeout: 120,
|
||||||
receivingAddress: receivingAddress.address,
|
receivingAddress: receivingAddress.address,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user