From b30dfb62aab57effb2a9e34d479abfc534897843 Mon Sep 17 00:00:00 2001 From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com> Date: Sun, 20 Aug 2023 14:11:45 +0200 Subject: [PATCH] Fix tradefee --- plugins/plugins/core/trade-portal/trade-portal.src.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/plugins/core/trade-portal/trade-portal.src.js b/plugins/plugins/core/trade-portal/trade-portal.src.js index c77f6ffe..2a5cb7a7 100644 --- a/plugins/plugins/core/trade-portal/trade-portal.src.js +++ b/plugins/plugins/core/trade-portal/trade-portal.src.js @@ -708,7 +708,7 @@ class TradePortal extends LitElement { balance: "0", coinCode: "QORT", coinAmount: this.amountString, - tradeFee: "0.002" + tradeFee: "0.02" } let bitcoin = { @@ -2699,9 +2699,10 @@ class TradePortal extends LitElement { async sellAction() { this.isSellLoading = true this.sellBtnDisable = true + await this.tradeFee() const sellAmountInput = this.shadowRoot.getElementById('sellAmountInput').value const sellTotalInput = this.shadowRoot.getElementById('sellTotalInput').value - const fundingQortAmount = this.round(parseFloat(sellAmountInput) + 0.021) + const fundingQortAmount = this.round(parseFloat(sellAmountInput) + 0.001) const makeRequest = async () => { let _receivingAddress = null @@ -3032,10 +3033,11 @@ class TradePortal extends LitElement { } return Promise.reject(response) }).then((json) => { - this.listedCoins.get("QORTAL").tradeFee = (Number(json) + 100000) / 1e8 + this.listedCoins.get("QORTAL").tradeFee = (Number(json) * 2) / 1e8 }) } + getApiKey() { const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; let apiKey = myNode.apiKey;