mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-03-27 15:55:55 +00:00
Fixx minting since
This commit is contained in:
parent
1ddd5464c1
commit
f167b11e51
@ -50,11 +50,8 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
slicedArray: { type: Array },
|
slicedArray: { type: Array },
|
||||||
allReceivedPayments: { type: Array },
|
allReceivedPayments: { type: Array },
|
||||||
allSendPayments: { type: Array },
|
allSendPayments: { type: Array },
|
||||||
actualBlockheight: { type: Number },
|
|
||||||
reduceBlockheight: { type: Number },
|
|
||||||
startMintBlockheight: { type: Number },
|
|
||||||
startMintTime: { type: String },
|
startMintTime: { type: String },
|
||||||
startMintBlock: { type: Array },
|
startMinting: { type: Array },
|
||||||
totalSent: { type: Number },
|
totalSent: { type: Number },
|
||||||
totalReceived: { type: Number },
|
totalReceived: { type: Number },
|
||||||
txtimestamp: { type: String },
|
txtimestamp: { type: String },
|
||||||
@ -507,11 +504,8 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
this.slicedArray = []
|
this.slicedArray = []
|
||||||
this.allReceivedPayments = []
|
this.allReceivedPayments = []
|
||||||
this.allSendPayments = []
|
this.allSendPayments = []
|
||||||
this.actualBlockheight = 0
|
|
||||||
this.reduceBlockheight = 0
|
|
||||||
this.startMintBlockheight = 0
|
|
||||||
this.startMintTime = ''
|
this.startMintTime = ''
|
||||||
this.startMintBlock = []
|
this.startMinting = []
|
||||||
this.totalSent = 0
|
this.totalSent = 0
|
||||||
this.totalReceived = 0
|
this.totalReceived = 0
|
||||||
this.txtimestamp = ''
|
this.txtimestamp = ''
|
||||||
@ -1397,7 +1391,7 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
this.displayLevel = this.addressResult.level
|
this.displayLevel = this.addressResult.level
|
||||||
this.isLoadingCompleteInfo = true
|
this.isLoadingCompleteInfo = true
|
||||||
this.shadowRoot.getElementById('userFullInfoDialog').open()
|
this.shadowRoot.getElementById('userFullInfoDialog').open()
|
||||||
await this.getStartMint()
|
await this.getStartMint(myAddress)
|
||||||
await this.getPaymentsGridItems()
|
await this.getPaymentsGridItems()
|
||||||
this.isLoadingCompleteInfo = false
|
this.isLoadingCompleteInfo = false
|
||||||
}
|
}
|
||||||
@ -1449,12 +1443,9 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
this.displayBalance = qortalBalanceInfo.toFixed(4)
|
this.displayBalance = qortalBalanceInfo.toFixed(4)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStartMint() {
|
async getStartMint(mintAddress) {
|
||||||
this.actualBlockheight = 0
|
|
||||||
this.reduceBlockheight = 0
|
|
||||||
this.startMintBlockheight = 0
|
|
||||||
this.startMintTime = ''
|
this.startMintTime = ''
|
||||||
this.startMintBlock = []
|
this.startMinting = []
|
||||||
const checkBlocks = this.addressResult.blocksMinted + this.addressResult.blocksMintedAdjustment
|
const checkBlocks = this.addressResult.blocksMinted + this.addressResult.blocksMintedAdjustment
|
||||||
const myNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const myNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
@ -1463,24 +1454,15 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
let noMinterString = get("explorerpage.exp16")
|
let noMinterString = get("explorerpage.exp16")
|
||||||
this.startMintTime = noMinterString
|
this.startMintTime = noMinterString
|
||||||
} else {
|
} else {
|
||||||
const blockheightUrl = `${nodeUrl}/blocks/height`
|
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
||||||
|
|
||||||
const currentBlockheight = await fetch(blockheightUrl).then(response => {
|
const startMinting = await fetch(rewardshareUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.actualBlockheight = currentBlockheight
|
this.startMinting = startMinting
|
||||||
this.reduceBlockheight = this.addressResult.blocksMinted + this.addressResult.blocksMintedAdjustment
|
|
||||||
this.startMintBlockheight = (this.actualBlockheight - this.reduceBlockheight)
|
|
||||||
const startMintUrl = `${nodeUrl}/blocks/byheight/${this.startMintBlockheight}?includeOnlineSignatures=false`
|
|
||||||
|
|
||||||
const startMintBlock = await fetch(startMintUrl).then(response => {
|
const mintString = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
||||||
return response.json()
|
|
||||||
})
|
|
||||||
|
|
||||||
this.startMintBlock = startMintBlock
|
|
||||||
|
|
||||||
const mintString = new Date(this.startMintBlock.timestamp).toLocaleDateString()
|
|
||||||
this.startMintTime = mintString
|
this.startMintTime = mintString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,11 +51,8 @@ class TraderInfoView extends LitElement {
|
|||||||
slicedArray: { type: Array },
|
slicedArray: { type: Array },
|
||||||
allReceivedPayments: { type: Array },
|
allReceivedPayments: { type: Array },
|
||||||
allSendPayments: { type: Array },
|
allSendPayments: { type: Array },
|
||||||
actualBlockheight: { type: Number },
|
|
||||||
reduceBlockheight: { type: Number },
|
|
||||||
startMintBlockheight: { type: Number },
|
|
||||||
startMintTime: { type: String },
|
startMintTime: { type: String },
|
||||||
startMintBlock: { type: Array },
|
startMinting: { type: Array },
|
||||||
totalSent: { type: Number },
|
totalSent: { type: Number },
|
||||||
totalReceived: { type: Number },
|
totalReceived: { type: Number },
|
||||||
txtimestamp: { type: String },
|
txtimestamp: { type: String },
|
||||||
@ -508,11 +505,8 @@ class TraderInfoView extends LitElement {
|
|||||||
this.slicedArray = []
|
this.slicedArray = []
|
||||||
this.allReceivedPayments = []
|
this.allReceivedPayments = []
|
||||||
this.allSendPayments = []
|
this.allSendPayments = []
|
||||||
this.actualBlockheight = 0
|
|
||||||
this.reduceBlockheight = 0
|
|
||||||
this.startMintBlockheight = 0
|
|
||||||
this.startMintTime = ''
|
this.startMintTime = ''
|
||||||
this.startMintBlock = []
|
this.startMinting = []
|
||||||
this.totalSent = 0
|
this.totalSent = 0
|
||||||
this.totalReceived = 0
|
this.totalReceived = 0
|
||||||
this.txtimestamp = ''
|
this.txtimestamp = ''
|
||||||
@ -1398,7 +1392,7 @@ class TraderInfoView extends LitElement {
|
|||||||
this.displayLevel = this.addressResult.level
|
this.displayLevel = this.addressResult.level
|
||||||
this.isLoadingCompleteInfo = true
|
this.isLoadingCompleteInfo = true
|
||||||
this.shadowRoot.getElementById('userFullInfoDialog').open()
|
this.shadowRoot.getElementById('userFullInfoDialog').open()
|
||||||
await this.getStartMint()
|
await this.getStartMint(myAddress)
|
||||||
await this.getPaymentsGridItems()
|
await this.getPaymentsGridItems()
|
||||||
this.isLoadingCompleteInfo = false
|
this.isLoadingCompleteInfo = false
|
||||||
}
|
}
|
||||||
@ -1450,12 +1444,9 @@ class TraderInfoView extends LitElement {
|
|||||||
this.displayBalance = qortalBalanceInfo.toFixed(4)
|
this.displayBalance = qortalBalanceInfo.toFixed(4)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStartMint() {
|
async getStartMint(mintAddress) {
|
||||||
this.actualBlockheight = 0
|
|
||||||
this.reduceBlockheight = 0
|
|
||||||
this.startMintBlockheight = 0
|
|
||||||
this.startMintTime = ''
|
this.startMintTime = ''
|
||||||
this.startMintBlock = []
|
this.startMinting = []
|
||||||
const checkBlocks = this.addressResult.blocksMinted + this.addressResult.blocksMintedAdjustment
|
const checkBlocks = this.addressResult.blocksMinted + this.addressResult.blocksMintedAdjustment
|
||||||
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]
|
||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
@ -1464,24 +1455,15 @@ class TraderInfoView extends LitElement {
|
|||||||
let noMinterString = get("explorerpage.exp16")
|
let noMinterString = get("explorerpage.exp16")
|
||||||
this.startMintTime = noMinterString
|
this.startMintTime = noMinterString
|
||||||
} else {
|
} else {
|
||||||
const blockheightUrl = `${nodeUrl}/blocks/height`
|
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
||||||
|
|
||||||
const currentBlockheight = await fetch(blockheightUrl).then(response => {
|
const startMinting = await fetch(rewardshareUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.actualBlockheight = currentBlockheight
|
this.startMinting = startMinting
|
||||||
this.reduceBlockheight = this.addressResult.blocksMinted + this.addressResult.blocksMintedAdjustment
|
|
||||||
this.startMintBlockheight = (this.actualBlockheight - this.reduceBlockheight)
|
|
||||||
const startMintUrl = `${nodeUrl}/blocks/byheight/${this.startMintBlockheight}?includeOnlineSignatures=false`
|
|
||||||
|
|
||||||
const startMintBlock = await fetch(startMintUrl).then(response => {
|
const mintString = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
||||||
return response.json()
|
|
||||||
})
|
|
||||||
|
|
||||||
this.startMintBlock = startMintBlock
|
|
||||||
|
|
||||||
const mintString = new Date(this.startMintBlock.timestamp).toLocaleDateString()
|
|
||||||
this.startMintTime = mintString
|
this.startMintTime = mintString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user