mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-14 11:15:50 +00:00
Fix lit import and delete not needed console logs
This commit is contained in:
parent
10d47b4f18
commit
aa5842b940
@ -1,4 +1,5 @@
|
|||||||
import { LitElement, html, css} from 'lit-element';
|
import { LitElement, html, css } from 'lit';
|
||||||
|
import { render } from 'lit/html.js';
|
||||||
import { get, translate } from 'lit-translate';
|
import { get, translate } from 'lit-translate';
|
||||||
import { Epml } from '../../../epml';
|
import { Epml } from '../../../epml';
|
||||||
import snackbar from './snackbar.js'
|
import snackbar from './snackbar.js'
|
||||||
@ -336,7 +337,6 @@ class ChatModals extends LitElement {
|
|||||||
dismiss: true
|
dismiss: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log({ret})
|
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,18 +342,8 @@ class ChatPage extends LitElement {
|
|||||||
// TODO: Determine number of initial messages by screen height...
|
// TODO: Determine number of initial messages by screen height...
|
||||||
this._messages.length <= 15 ? adjustMessages() : this._initialMessages = this._messages.splice(this._messages.length - 15);
|
this._messages.length <= 15 ? adjustMessages() : this._initialMessages = this._messages.splice(this._messages.length - 15);
|
||||||
|
|
||||||
|
|
||||||
this.messagesRendered = this._initialMessages
|
this.messagesRendered = this._initialMessages
|
||||||
|
|
||||||
// try {
|
|
||||||
// const viewElement = this.shadowRoot.querySelector('chat-scroller')
|
|
||||||
// console.log({viewElement})
|
|
||||||
// // viewElement.scrollTop = this.viewElement.scrollHeight + 50
|
|
||||||
// } catch (error) {
|
|
||||||
// console.error(error)
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
this.isLoadingMessages = false
|
this.isLoadingMessages = false
|
||||||
setTimeout(() => this.downElementObserver(), 500)
|
setTimeout(() => this.downElementObserver(), 500)
|
||||||
} else {
|
} else {
|
||||||
@ -551,7 +541,6 @@ class ChatPage extends LitElement {
|
|||||||
// Error Event
|
// Error Event
|
||||||
directSocket.onerror = (e) => {
|
directSocket.onerror = (e) => {
|
||||||
clearTimeout(directSocketTimeout)
|
clearTimeout(directSocketTimeout)
|
||||||
console.log(`[DIRECT-SOCKET ==> ${cid}]: ${e.type}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const pingDirectSocket = () => {
|
const pingDirectSocket = () => {
|
||||||
@ -613,7 +602,6 @@ class ChatPage extends LitElement {
|
|||||||
// Error Event
|
// Error Event
|
||||||
groupSocket.onerror = (e) => {
|
groupSocket.onerror = (e) => {
|
||||||
clearTimeout(groupSocketTimeout)
|
clearTimeout(groupSocketTimeout)
|
||||||
console.log(`[GROUP-SOCKET ==> ${groupId}]: ${e.type}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const pingGroupSocket = () => {
|
const pingGroupSocket = () => {
|
||||||
|
@ -588,57 +588,42 @@ class GroupManagement extends LitElement {
|
|||||||
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;
|
||||||
const url = `${nodeUrl}/transactions/unitfee?txType=CREATE_GROUP`;
|
const url = `${nodeUrl}/transactions/unitfee?txType=CREATE_GROUP`;
|
||||||
await fetch(url)
|
await fetch(url).then((response) => {
|
||||||
.then((response) => {
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}
|
}
|
||||||
return Promise.reject(response);
|
return Promise.reject(response);
|
||||||
})
|
}).then((json) => {
|
||||||
.then((json) => {
|
|
||||||
this.createFee = (Number(json) / 1e8).toFixed(8);
|
this.createFee = (Number(json) / 1e8).toFixed(8);
|
||||||
})
|
})
|
||||||
.catch((response) => {
|
|
||||||
console.log(response.status, response.statusText, 'Need Core Update');
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async unitJoinFee() {
|
async unitJoinFee() {
|
||||||
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;
|
||||||
const url = `${nodeUrl}/transactions/unitfee?txType=JOIN_GROUP`;
|
const url = `${nodeUrl}/transactions/unitfee?txType=JOIN_GROUP`;
|
||||||
await fetch(url)
|
await fetch(url).then((response) => {
|
||||||
.then((response) => {
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}
|
}
|
||||||
return Promise.reject(response);
|
return Promise.reject(response);
|
||||||
})
|
}).then((json) => {
|
||||||
.then((json) => {
|
|
||||||
this.joinFee = (Number(json) / 1e8).toFixed(8);
|
this.joinFee = (Number(json) / 1e8).toFixed(8);
|
||||||
})
|
})
|
||||||
.catch((response) => {
|
|
||||||
console.log(response.status, response.statusText, 'Need Core Update');
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async unitLeaveFee() {
|
async unitLeaveFee() {
|
||||||
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;
|
||||||
const url = `${nodeUrl}/transactions/unitfee?txType=LEAVE_GROUP`;
|
const url = `${nodeUrl}/transactions/unitfee?txType=LEAVE_GROUP`;
|
||||||
await fetch(url)
|
await fetch(url).then((response) => {
|
||||||
.then((response) => {
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}
|
}
|
||||||
return Promise.reject(response);
|
return Promise.reject(response);
|
||||||
})
|
}).then((json) => {
|
||||||
.then((json) => {
|
|
||||||
this.leaveFee = (Number(json) / 1e8).toFixed(8);
|
this.leaveFee = (Number(json) / 1e8).toFixed(8);
|
||||||
})
|
})
|
||||||
.catch((response) => {
|
|
||||||
console.log(response.status, response.statusText, 'Need Core Update');
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resetDefaultSettings() {
|
resetDefaultSettings() {
|
||||||
|
@ -136,7 +136,6 @@ class GroupTransaction extends LitElement {
|
|||||||
let splitedUrl = decodeTempUrl.split('?')
|
let splitedUrl = decodeTempUrl.split('?')
|
||||||
let myGroupId = splitedUrl[1]
|
let myGroupId = splitedUrl[1]
|
||||||
this.addMintingAccountMessage = myGroupId
|
this.addMintingAccountMessage = myGroupId
|
||||||
console.log(myGroupId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getGroupIdFromURL()
|
getGroupIdFromURL()
|
||||||
|
@ -288,19 +288,14 @@ class NameRegistration extends LitElement {
|
|||||||
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;
|
||||||
const url = `${nodeUrl}/transactions/unitfee?txType=REGISTER_NAME`;
|
const url = `${nodeUrl}/transactions/unitfee?txType=REGISTER_NAME`;
|
||||||
await fetch(url)
|
await fetch(url).then((response) => {
|
||||||
.then((response) => {
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}
|
}
|
||||||
return Promise.reject(response);
|
return Promise.reject(response);
|
||||||
})
|
}).then((json) => {
|
||||||
.then((json) => {
|
|
||||||
this.fee = (Number(json) / 1e8).toFixed(2);
|
this.fee = (Number(json) / 1e8).toFixed(2);
|
||||||
})
|
})
|
||||||
.catch((response) => {
|
|
||||||
console.log(response.status, response.statusText, this.renderCoreText());
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
|
@ -437,7 +437,6 @@ class Puzzles extends LitElement {
|
|||||||
|
|
||||||
let _guessAddress = publicKeyToAddress(_keyPair.publicKey)
|
let _guessAddress = publicKeyToAddress(_keyPair.publicKey)
|
||||||
|
|
||||||
console.log("Guess '" + _guessAddress + "' vs puzzle's address '" + this.selectedPuzzle.address + "'")
|
|
||||||
if (_guessAddress !== this.selectedPuzzle.address) {
|
if (_guessAddress !== this.selectedPuzzle.address) {
|
||||||
this.error = true
|
this.error = true
|
||||||
this.message = this.renderErr1Text()
|
this.message = this.renderErr1Text()
|
||||||
|
@ -140,7 +140,6 @@ class WebBrowser extends LitElement {
|
|||||||
url: `/render/authorize/${this.name}?apiKey=${this.getApiKey()}`,
|
url: `/render/authorize/${this.name}?apiKey=${this.getApiKey()}`,
|
||||||
method: "POST"
|
method: "POST"
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
// Authorization problem - API key incorrect?
|
// Authorization problem - API key incorrect?
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,6 @@ class SponsorshipList extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log({error})
|
|
||||||
|
|
||||||
this.isPageLoading = false
|
this.isPageLoading = false
|
||||||
}
|
}
|
||||||
|
@ -1270,7 +1270,6 @@ class TradePortal extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetchWalletAddress(coin) {
|
async fetchWalletAddress(coin) {
|
||||||
console.log("fetchWalletAddress: " + coin)
|
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case 'PIRATECHAIN':
|
case 'PIRATECHAIN':
|
||||||
let res = await parentEpml.request('apiCall', {
|
let res = await parentEpml.request('apiCall', {
|
||||||
|
@ -4449,7 +4449,7 @@ class MultiWallet extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const arrrSortedTransactions = arrrTxs.sort(arrrCompareFn)
|
const arrrSortedTransactions = arrrTxs.sort(arrrCompareFn)
|
||||||
console.log(arrrSortedTransactions)
|
|
||||||
if (this._selectedWallet == coin) {
|
if (this._selectedWallet == coin) {
|
||||||
this.wallets.get(this._selectedWallet).transactions = arrrSortedTransactions
|
this.wallets.get(this._selectedWallet).transactions = arrrSortedTransactions
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user