Browse Source

Fix tradefee

resolve-20231003
AlphaX-Projects 1 year ago
parent
commit
b30dfb62aa
  1. 8
      plugins/plugins/core/trade-portal/trade-portal.src.js

8
plugins/plugins/core/trade-portal/trade-portal.src.js

@ -708,7 +708,7 @@ class TradePortal extends LitElement {
balance: "0", balance: "0",
coinCode: "QORT", coinCode: "QORT",
coinAmount: this.amountString, coinAmount: this.amountString,
tradeFee: "0.002" tradeFee: "0.02"
} }
let bitcoin = { let bitcoin = {
@ -2699,9 +2699,10 @@ class TradePortal extends LitElement {
async sellAction() { async sellAction() {
this.isSellLoading = true this.isSellLoading = true
this.sellBtnDisable = true this.sellBtnDisable = true
await this.tradeFee()
const sellAmountInput = this.shadowRoot.getElementById('sellAmountInput').value const sellAmountInput = this.shadowRoot.getElementById('sellAmountInput').value
const sellTotalInput = this.shadowRoot.getElementById('sellTotalInput').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 () => { const makeRequest = async () => {
let _receivingAddress = null let _receivingAddress = null
@ -3032,10 +3033,11 @@ class TradePortal extends LitElement {
} }
return Promise.reject(response) return Promise.reject(response)
}).then((json) => { }).then((json) => {
this.listedCoins.get("QORTAL").tradeFee = (Number(json) + 100000) / 1e8 this.listedCoins.get("QORTAL").tradeFee = (Number(json) * 2) / 1e8
}) })
} }
getApiKey() { getApiKey() {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
let apiKey = myNode.apiKey; let apiKey = myNode.apiKey;

Loading…
Cancel
Save