diff --git a/core/src/apiKeyUtils.js b/core/src/apiKeyUtils.js
index 307ed6cb..e65772b0 100644
--- a/core/src/apiKeyUtils.js
+++ b/core/src/apiKeyUtils.js
@@ -49,8 +49,6 @@ export const testApiKey = async (apiKey) => {
let testRes = await api.request(testUrl, {
method: "GET"
});
- if (testRes === true) {
- return true;
- }
- return false;
+ return testRes === true;
+
}
diff --git a/core/src/components/app-view.js b/core/src/components/app-view.js
index 3f2b6877..07a0b84f 100644
--- a/core/src/components/app-view.js
+++ b/core/src/components/app-view.js
@@ -3,7 +3,7 @@ import { connect } from 'pwa-helpers'
import { store } from '../store.js'
import { Epml } from '../epml.js'
import { addTradeBotRoutes } from '../tradebot/addTradeBotRoutes.js'
-import { get, translate } from '../../translate/index.js'
+import { get, translate } from '../../translate'
import localForage from 'localforage'
import { decryptData, encryptData } from '../lockScreen.js'
import { setChatLastSeen } from '../redux/app/app-actions.js'
@@ -560,7 +560,7 @@ class AppView extends connect(store)(LitElement) {
if(el3) {
els['checklist'] = el3
}
-
+
return els
}
@@ -965,7 +965,7 @@ class AppView extends connect(store)(LitElement) {
await appDelay(1000)
if (this.isEmptyArray(this.tradeBotAvailableBtcQortal) === true) {
- return
+
} else {
const botbtcprice = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
const changebtcamount = parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount)
@@ -1009,7 +1009,7 @@ class AppView extends connect(store)(LitElement) {
}
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
- return
+
} else {
const checkBotBtcFunds = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount) * parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
const myBotBtcFunds = this.round(parseFloat(this.btcWalletBalance))
@@ -1162,7 +1162,7 @@ class AppView extends connect(store)(LitElement) {
await appDelay(1000)
if (this.isEmptyArray(this.tradeBotAvailableLtcQortal) === true) {
- return
+
} else {
const botltcprice = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
const changeltcamount = parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount)
@@ -1206,7 +1206,7 @@ class AppView extends connect(store)(LitElement) {
}
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
- return
+
} else {
const checkBotLtcFunds = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount) * parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
const myBotLtcFunds = this.round(parseFloat(this.ltcWalletBalance))
@@ -1348,7 +1348,7 @@ class AppView extends connect(store)(LitElement) {
await appDelay(1000)
if (this.isEmptyArray(this.tradeBotAvailableDogeQortal) === true) {
- return
+
} else {
const botdogeprice = this.round(parseFloat(this.tradeBotDogeBook[0].botDogePrice))
const changedogeamount = parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount)
@@ -1392,7 +1392,7 @@ class AppView extends connect(store)(LitElement) {
}
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
- return
+
} else {
const checkBotDogeFunds = this.round(parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount) * parseFloat(this.tradeBotDogeBook[0].botDogePrice))
const myBotDogeFunds = this.round(parseFloat(this.dogeWalletBalance))
@@ -1534,7 +1534,7 @@ class AppView extends connect(store)(LitElement) {
await appDelay(1000)
if (this.isEmptyArray(this.tradeBotAvailableDgbQortal) === true) {
- return
+
} else {
const botdgbprice = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
const changedgbamount = parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount)
@@ -1578,7 +1578,7 @@ class AppView extends connect(store)(LitElement) {
}
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
- return
+
} else {
const checkBotDgbFunds = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount) * parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
const myBotDgbFunds = this.round(parseFloat(this.dgbWalletBalance))
@@ -1720,7 +1720,7 @@ class AppView extends connect(store)(LitElement) {
await appDelay(1000)
if (this.isEmptyArray(this.tradeBotAvailableRvnQortal) === true) {
- return
+
} else {
const botrvnprice = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
const changervnamount = parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount)
@@ -1764,7 +1764,7 @@ class AppView extends connect(store)(LitElement) {
}
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
- return
+
} else {
const checkBotRvnFunds = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount) * parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
const myBotRvnFunds = this.round(parseFloat(this.rvnWalletBalance))
@@ -1906,7 +1906,7 @@ class AppView extends connect(store)(LitElement) {
await appDelay(1000)
if (this.isEmptyArray(this.tradeBotAvailableArrrQortal) === true) {
- return
+
} else {
const botarrrprice = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
const changearrramount = parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount)
@@ -1950,7 +1950,7 @@ class AppView extends connect(store)(LitElement) {
}
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
- return
+
} else {
const checkBotArrrFunds = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount) * parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
const myBotArrrFunds = this.round(parseFloat(this.arrrWalletBalance))
@@ -2243,7 +2243,7 @@ class AppView extends connect(store)(LitElement) {
this.helperMessage = this.renderHelperErr()
await errDelay(3000)
this.helperMessage = this.renderHelperPass()
- return
+
}
}
@@ -3365,4 +3365,4 @@ class AppView extends connect(store)(LitElement) {
}
}
-window.customElements.define('app-view', AppView)
\ No newline at end of file
+window.customElements.define('app-view', AppView)
diff --git a/core/src/components/beginner-tour/tour-component.js b/core/src/components/beginner-tour/tour-component.js
index f51ba3d6..5475235a 100644
--- a/core/src/components/beginner-tour/tour-component.js
+++ b/core/src/components/beginner-tour/tour-component.js
@@ -5,7 +5,7 @@ import '@material/mwc-icon';
import '@polymer/paper-spinner/paper-spinner-lite.js';
import '@vaadin/tooltip';
import '@material/mwc-button';
-import { get, translate } from '../../../translate/index.js';
+import { get, translate } from '../../../translate';
import '@polymer/paper-dialog/paper-dialog.js';
import { setNewTab } from '../../redux/app/app-actions.js';
import { store } from '../../store.js';
@@ -116,7 +116,7 @@ class TourComponent extends connect(store)(LitElement) {
_controlOpenWelcomeModal() {
this.isSynced = true
-
+
const seenWelcomeSync = JSON.parse(
localStorage.getItem('welcome-sync') || 'false'
);
@@ -280,7 +280,7 @@ class TourComponent extends connect(store)(LitElement) {
-
+
${key}
@@ -592,9 +592,9 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
>
${translate('general.close')}
-
+
-
+
` : ''}
-
+
`
}
diff --git a/plugins/plugins/core/components/frag-file-input.js b/plugins/plugins/core/components/frag-file-input.js
index 17744b88..3afa739c 100644
--- a/plugins/plugins/core/components/frag-file-input.js
+++ b/plugins/plugins/core/components/frag-file-input.js
@@ -3,7 +3,7 @@ import {css, html, LitElement} from 'lit'
import '@material/mwc-button'
import '@material/mwc-icon'
-import {translate} from '../../../../core/translate/index.js'
+import {translate} from '../../../../core/translate'
class FragFileInput extends LitElement {
static get properties () {
diff --git a/plugins/plugins/core/components/qortal-info-view.js b/plugins/plugins/core/components/qortal-info-view.js
index 9c97050b..99d3ed08 100644
--- a/plugins/plugins/core/components/qortal-info-view.js
+++ b/plugins/plugins/core/components/qortal-info-view.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
-import {get, translate} from '../../../../core/translate/index.js'
+import {get, translate} from '../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import '@material/mwc-button'
import '@material/mwc-icon'
diff --git a/plugins/plugins/core/components/time-elements/extended-time-element.js b/plugins/plugins/core/components/time-elements/extended-time-element.js
index fce17b2d..874a1a89 100644
--- a/plugins/plugins/core/components/time-elements/extended-time-element.js
+++ b/plugins/plugins/core/components/time-elements/extended-time-element.js
@@ -75,7 +75,7 @@ export default class ExtendedTimeElement extends HTMLElement {
}
}
getFormattedDate() {
- return;
+
}
}
const titleFormatter = makeFormatter({
diff --git a/plugins/plugins/core/components/time-elements/index.js b/plugins/plugins/core/components/time-elements/index.js
index 8b3dbe4c..961c29d9 100644
--- a/plugins/plugins/core/components/time-elements/index.js
+++ b/plugins/plugins/core/components/time-elements/index.js
@@ -240,7 +240,7 @@ class ExtendedTimeElement extends HTMLElement {
}
}
getFormattedDate() {
- return;
+
}
}
const titleFormatter = makeFormatter({
diff --git a/plugins/plugins/core/group-management/group-management.src.js b/plugins/plugins/core/group-management/group-management.src.js
index e1bf5032..9c1f6300 100644
--- a/plugins/plugins/core/group-management/group-management.src.js
+++ b/plugins/plugins/core/group-management/group-management.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import '../components/time-elements/index.js'
import '@material/mwc-button'
import '@material/mwc-dialog'
@@ -2491,7 +2491,7 @@ class GroupManagement extends LitElement {
})
if (this.bannedMembers.length === 0) {
- return
+
} else {
this.bannedMembers.map(a => {
let callTheBannedMember = a.offender
@@ -2542,7 +2542,7 @@ class GroupManagement extends LitElement {
})
if (this.groupInviteMembers.length === 0) {
- return
+
} else {
this.groupInviteMembers.map(a => {
let callTheInviteMember = a.invitee
@@ -2589,7 +2589,7 @@ class GroupManagement extends LitElement {
})
if (this.groupJoinMembers.length === 0) {
- return
+
} else {
this.groupJoinMembers.map(a => {
let callTheJoinMember = a.joiner
diff --git a/plugins/plugins/core/messaging/q-chat/q-chat.src.js b/plugins/plugins/core/messaging/q-chat/q-chat.src.js
index 86f956d4..506d7a7e 100644
--- a/plugins/plugins/core/messaging/q-chat/q-chat.src.js
+++ b/plugins/plugins/core/messaging/q-chat/q-chat.src.js
@@ -938,7 +938,7 @@ class Chat extends LitElement {
getChatHeadFromState(chatObj) {
if (chatObj === undefined) {
- return
+
} else {
this.chatHeadsObj = chatObj
this.setChatHeads(chatObj)
@@ -986,4 +986,4 @@ class Chat extends LitElement {
}
}
-window.customElements.define('q-chat', Chat)
\ No newline at end of file
+window.customElements.define('q-chat', Chat)
diff --git a/plugins/plugins/core/minting/minting-info.src.js b/plugins/plugins/core/minting/minting-info.src.js
index 9790b268..c392fe06 100644
--- a/plugins/plugins/core/minting/minting-info.src.js
+++ b/plugins/plugins/core/minting/minting-info.src.js
@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {registerTranslateConfig, translate, use} from '../../../../core/translate'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-dialog'
diff --git a/plugins/plugins/core/name-registration/name-registration.src.js b/plugins/plugins/core/name-registration/name-registration.src.js
index 69aac944..b91c8901 100644
--- a/plugins/plugins/core/name-registration/name-registration.src.js
+++ b/plugins/plugins/core/name-registration/name-registration.src.js
@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import isElectron from 'is-electron'
import '@material/mwc-button'
import '@material/mwc-dialog'
diff --git a/plugins/plugins/core/names-market/names-market.src.js b/plugins/plugins/core/names-market/names-market.src.js
index c23f0f9a..dfe7dbfb 100644
--- a/plugins/plugins/core/names-market/names-market.src.js
+++ b/plugins/plugins/core/names-market/names-market.src.js
@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import isElectron from 'is-electron'
import '../components/qortal-info-view.js'
import '@material/mwc-button'
diff --git a/plugins/plugins/core/node-management/node-management.src.js b/plugins/plugins/core/node-management/node-management.src.js
index 3716c024..f1740123 100644
--- a/plugins/plugins/core/node-management/node-management.src.js
+++ b/plugins/plugins/core/node-management/node-management.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-icon'
import '@material/mwc-textfield'
diff --git a/plugins/plugins/core/overview-page/overview-page.src.js b/plugins/plugins/core/overview-page/overview-page.src.js
index 6592a09f..bcb87967 100644
--- a/plugins/plugins/core/overview-page/overview-page.src.js
+++ b/plugins/plugins/core/overview-page/overview-page.src.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import {overviewStyle} from './overview-page-css.js'
import {asyncReplace} from 'lit/directives/async-replace.js'
import isElectron from 'is-electron'
@@ -247,17 +247,9 @@ class OverviewPage extends LitElement {
const findMyMintingRecipient = this.listAccounts.find((myKey) => myKey.recipientAccount === address)
const findRemovedSponsorsKey = this.listAccounts.filter((my) => my.address)
- if (findMyMintingAccount === undefined) {
- this.check1 = false
- } else {
- this.check1 = true
- }
+ this.check1 = findMyMintingAccount !== undefined;
- if (findMyMintingRecipient === undefined) {
- this.check2 = false
- } else {
- this.check2 = true
- }
+ this.check2 = findMyMintingRecipient !== undefined;
if (findRemovedSponsorsKey.length > 0) {
this.removeBlankKey(findRemovedSponsorsKey.publicKey)
@@ -611,7 +603,7 @@ class StartMintingNow extends LitElement {
this.getMintingAcccounts()
} catch (error) {
this.errorMsg = this.renderErrorMsg3()
- return
+
}
}
@@ -732,7 +724,7 @@ class StartMintingNow extends LitElement {
this.confirmRelationship(publicAddress)
} catch (error) {
this.errorMsg = error.data.message || this.renderErrorMsg4()
- return
+
}
}
diff --git a/plugins/plugins/core/puzzles/puzzles.src.js b/plugins/plugins/core/puzzles/puzzles.src.js
index d979bb0f..160de050 100644
--- a/plugins/plugins/core/puzzles/puzzles.src.js
+++ b/plugins/plugins/core/puzzles/puzzles.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {registerTranslateConfig, translate, use} from '../../../../core/translate'
import nacl from '../../../../crypto/api/deps/nacl-fast.js'
import Base58 from '../../../../crypto/api/deps/Base58.js'
import publicKeyToAddress from '../../../../crypto/api/wallet/publicKeyToAddress.js'
diff --git a/plugins/plugins/core/q-app/q-apps.src.js b/plugins/plugins/core/q-app/q-apps.src.js
index 64241b73..594e5523 100644
--- a/plugins/plugins/core/q-app/q-apps.src.js
+++ b/plugins/plugins/core/q-app/q-apps.src.js
@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import isElectron from 'is-electron'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@polymer/paper-dialog/paper-dialog.js'
diff --git a/plugins/plugins/core/qdn/browser/browser.src.js b/plugins/plugins/core/qdn/browser/browser.src.js
index c1701d82..319f6958 100644
--- a/plugins/plugins/core/qdn/browser/browser.src.js
+++ b/plugins/plugins/core/qdn/browser/browser.src.js
@@ -1,7 +1,7 @@
import { css, html, LitElement } from 'lit'
import { Epml } from '../../../../epml'
import isElectron from 'is-electron'
-import { get, registerTranslateConfig, translate, use } from '../../../../../core/translate/index.js'
+import { get, registerTranslateConfig, translate, use } from '../../../../../core/translate'
import ShortUniqueId from 'short-unique-id';
import FileSaver from 'file-saver'
import * as actions from '../../components/qdn-action-types'
@@ -1547,7 +1547,6 @@ class WebBrowser extends LitElement {
reason: errorMsg,
identifier: resource.identifier
})
- continue
}
} catch (error) {
@@ -1555,7 +1554,6 @@ class WebBrowser extends LitElement {
reason: "Unknown error",
identifier: resource.identifier
})
- continue
}
@@ -4164,7 +4162,7 @@ async function showModalAndWait(type, data) {
const modalContent = modal.querySelector('.modal-content')
modalContent.addEventListener('click', (e) => {
e.stopPropagation()
- return
+
})
const backdropClick = document.getElementById('backdrop')
backdropClick.addEventListener('click', () => {
diff --git a/plugins/plugins/core/qdn/data-management/data-management.src.js b/plugins/plugins/core/qdn/data-management/data-management.src.js
index 9a9a6f2a..64ea7202 100644
--- a/plugins/plugins/core/qdn/data-management/data-management.src.js
+++ b/plugins/plugins/core/qdn/data-management/data-management.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../../epml'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-icon'
diff --git a/plugins/plugins/core/qdn/publish/publish.src.js b/plugins/plugins/core/qdn/publish/publish.src.js
index fa3fd9c9..3e69cc74 100644
--- a/plugins/plugins/core/qdn/publish/publish.src.js
+++ b/plugins/plugins/core/qdn/publish/publish.src.js
@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-select'
diff --git a/plugins/plugins/core/qdn/websites.src.js b/plugins/plugins/core/qdn/websites.src.js
index 2881dd63..03c84627 100644
--- a/plugins/plugins/core/qdn/websites.src.js
+++ b/plugins/plugins/core/qdn/websites.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import '@material/mwc-dialog'
import '@material/mwc-icon'
import '@material/mwc-button'
diff --git a/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js b/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js
index 0859f509..149ffe14 100644
--- a/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js
+++ b/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js
@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import isElectron from 'is-electron'
import '@material/mwc-button'
import '@material/mwc-dialog'
@@ -480,20 +480,20 @@ class QortalLottery extends LitElement {
})
})
- await this.openLotteries.map(item => {
- const aTT = item.ATAddress
- const endHeight = item.sleepUntilHeight
- const newObj = {
- ATAddress: aTT,
- sleepUntilHeight: endHeight
- }
- this.openLotteriesAtArray.push(newObj)
- })
+ this.openLotteries.map(item => {
+ const aTT = item.ATAddress
+ const endHeight = item.sleepUntilHeight
+ const newObj = {
+ ATAddress: aTT,
+ sleepUntilHeight: endHeight
+ }
+ this.openLotteriesAtArray.push(newObj)
+ })
- await this.closedLotteries.map(item => {
- const myAT = item.ATAddress
- this.closedLotteriesAtArray.push(myAT)
- })
+ this.closedLotteries.map(item => {
+ const myAT = item.ATAddress
+ this.closedLotteriesAtArray.push(myAT)
+ })
const appDelay = ms => new Promise(res => setTimeout(res, ms))
await appDelay(1000)
@@ -502,37 +502,37 @@ class QortalLottery extends LitElement {
async getOpenLotteries() {
let prepareOpenLotteriesArray = []
- await this.openLotteriesAtArray.map(item => {
- parentEpml.request('apiCall', {
- url: `/transactions/address/${item.ATAddress}?limit=0&reverse=true`
- }).then(res => {
- this.openLotteriesFilterTx1 = []
- this.openLotteriesFilterTx2 = []
- this.openLotteriesFilterTx = res.filter(function (da) {
- return da.type === "DEPLOY_AT"
- })
- this.openLotteriesFilterTx2 = res.filter(function (pm) {
- return pm.type === "PAYMENT"
- })
- this.openLotteriesFilterTx.map(item2 => {
- const sleep = item.sleepUntilHeight
- const desc = item2.description
- const start = item2.blockHeight
- const ata = item2.aTAddress
- const amount = item2.tags
- const players = this.openLotteriesFilterTx2.length
- const obj = {
- description: desc,
- startBlock: start,
- endBlock: sleep,
- aTAddress: ata,
- joined: players,
- enter: amount
- }
- prepareOpenLotteriesArray.push(obj)
- })
- })
- })
+ this.openLotteriesAtArray.map(item => {
+ parentEpml.request('apiCall', {
+ url: `/transactions/address/${item.ATAddress}?limit=0&reverse=true`
+ }).then(res => {
+ this.openLotteriesFilterTx1 = []
+ this.openLotteriesFilterTx2 = []
+ this.openLotteriesFilterTx = res.filter(function (da) {
+ return da.type === "DEPLOY_AT"
+ })
+ this.openLotteriesFilterTx2 = res.filter(function (pm) {
+ return pm.type === "PAYMENT"
+ })
+ this.openLotteriesFilterTx.map(item2 => {
+ const sleep = item.sleepUntilHeight
+ const desc = item2.description
+ const start = item2.blockHeight
+ const ata = item2.aTAddress
+ const amount = item2.tags
+ const players = this.openLotteriesFilterTx2.length
+ const obj = {
+ description: desc,
+ startBlock: start,
+ endBlock: sleep,
+ aTAddress: ata,
+ joined: players,
+ enter: amount
+ }
+ prepareOpenLotteriesArray.push(obj)
+ })
+ })
+ })
const appDelay = ms => new Promise(res => setTimeout(res, ms))
await appDelay(2000)
this.openLotteriesArray = prepareOpenLotteriesArray
@@ -543,55 +543,55 @@ class QortalLottery extends LitElement {
async getFinishedLotteries() {
let prepareClosedLotteriesArray = []
- await this.closedLotteriesAtArray.map(item => {
- parentEpml.request('apiCall', {
- url: `/transactions/address/${item}?limit=0&reverse=true`
- }).then(res => {
- this.closedLotteriesFilterTx1 = []
- this.closedLotteriesFilterTx2 = []
- this.closedLotteriesFilterTx1 = res.filter(function (el) {
- return el.type === "DEPLOY_AT"
- })
- this.closedLotteriesFilterTx2 = res.filter(function (el) {
- return el.type === "AT"
- })
+ this.closedLotteriesAtArray.map(item => {
+ parentEpml.request('apiCall', {
+ url: `/transactions/address/${item}?limit=0&reverse=true`
+ }).then(res => {
+ this.closedLotteriesFilterTx1 = []
+ this.closedLotteriesFilterTx2 = []
+ this.closedLotteriesFilterTx1 = res.filter(function (el) {
+ return el.type === "DEPLOY_AT"
+ })
+ this.closedLotteriesFilterTx2 = res.filter(function (el) {
+ return el.type === "AT"
+ })
- this.closedLotteriesFilterTx2.map(item1 => {
- const twinner = item1.recipient
- const tjackpot = item1.amount
- const tendblock = item1.blockHeight
- this.closedLotteriesFilterTx1.map(item2 => {
- const tstartblock = item2.blockHeight
- const tdescription = item2.description
- parentEpml.request('apiCall', {
- url: `/names/address/${twinner}?limit=0&reverse=true`
- }).then(res => {
- if (res.length) {
- const winName = res[0].name
- const obj = {
- description: tdescription,
- startblock: tstartblock,
- endblock: tendblock,
- winner: winName,
- jackpot: tjackpot
- }
- prepareClosedLotteriesArray.push(obj)
- } else {
- const winName = twinner
- const obj = {
- description: tdescription,
- startblock: tstartblock,
- endblock: tendblock,
- winner: winName,
- jackpot: tjackpot
- }
- prepareClosedLotteriesArray.push(obj)
- }
- })
- })
- })
- })
- })
+ this.closedLotteriesFilterTx2.map(item1 => {
+ const twinner = item1.recipient
+ const tjackpot = item1.amount
+ const tendblock = item1.blockHeight
+ this.closedLotteriesFilterTx1.map(item2 => {
+ const tstartblock = item2.blockHeight
+ const tdescription = item2.description
+ parentEpml.request('apiCall', {
+ url: `/names/address/${twinner}?limit=0&reverse=true`
+ }).then(res => {
+ if (res.length) {
+ const winName = res[0].name
+ const obj = {
+ description: tdescription,
+ startblock: tstartblock,
+ endblock: tendblock,
+ winner: winName,
+ jackpot: tjackpot
+ }
+ prepareClosedLotteriesArray.push(obj)
+ } else {
+ const winName = twinner
+ const obj = {
+ description: tdescription,
+ startblock: tstartblock,
+ endblock: tendblock,
+ winner: winName,
+ jackpot: tjackpot
+ }
+ prepareClosedLotteriesArray.push(obj)
+ }
+ })
+ })
+ })
+ })
+ })
const appDelay = ms => new Promise(res => setTimeout(res, ms))
await appDelay(5000)
this.closedLotteriesArray = prepareClosedLotteriesArray
diff --git a/plugins/plugins/core/reward-share/reward-share.src.js b/plugins/plugins/core/reward-share/reward-share.src.js
index c58151b7..8613d5e9 100644
--- a/plugins/plugins/core/reward-share/reward-share.src.js
+++ b/plugins/plugins/core/reward-share/reward-share.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-textfield'
diff --git a/plugins/plugins/core/sponsorship-list/sponsorship-list.src.js b/plugins/plugins/core/sponsorship-list/sponsorship-list.src.js
index 8c940407..56ba7589 100644
--- a/plugins/plugins/core/sponsorship-list/sponsorship-list.src.js
+++ b/plugins/plugins/core/sponsorship-list/sponsorship-list.src.js
@@ -1,6 +1,6 @@
import {html, LitElement} from 'lit'
import {Epml} from '../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import {blocksNeed} from '../../utils/blocks-needed.js'
import {asyncReplace} from 'lit/directives/async-replace.js'
import {pageStyles} from './sponsorship-list-css.src.js'
@@ -721,13 +721,13 @@ class SponsorshipList extends LitElement {
}
const getTxnRequestResponse = (txnResponse) => {
-
+
const extraData = txnResponse && txnResponse.extraData;
const data = txnResponse && txnResponse.data;
const dataMessage = data && data.message;
const extraDataPrivateKey = extraData && extraData.rewardSharePrivateKey;
const txnSuccess = txnResponse && txnResponse.success;
-
+
if (extraDataPrivateKey && typeof dataMessage === 'string' &&
(dataMessage.includes('multiple') || dataMessage.includes('SELF_SHARE_EXISTS'))) {
this.privateRewardShareKey = extraDataPrivateKey;
diff --git a/plugins/plugins/core/streams/onNewBlock.js b/plugins/plugins/core/streams/onNewBlock.js
index da3ce393..70b4068d 100644
--- a/plugins/plugins/core/streams/onNewBlock.js
+++ b/plugins/plugins/core/streams/onNewBlock.js
@@ -19,11 +19,7 @@ let blockSocketReconnectInterval = MIN_RECONNECT_INTERVAL;
let nodeStatusSocketReconnectInterval = MIN_RECONNECT_INTERVAL;
parentEpml.subscribe('logged_in', loggedIn => {
- if (loggedIn === 'true') {
- isLoggedIn = true
- } else {
- isLoggedIn = false
- }
+ isLoggedIn = loggedIn === 'true';
})
@@ -39,7 +35,7 @@ const setAccountInfo = async (addr) => {
addressInfo: addressInfo
}
if (window.parent._.isEqual(oldAccountInfo, accountInfo) === true) {
- return
+
} else {
parentEpml.request('setAccountInfo', accountInfo)
oldAccountInfo = accountInfo
@@ -82,7 +78,7 @@ export const startConfigWatcher = () => {
let _newState = JSON.parse(c)
let newState = { node: _newState.node, knownNodes: _newState.knownNodes }
if (window.parent._.isEqual(oldState, newState) === true) {
- return
+
} else {
oldState = newState
nodeStateCall = true
diff --git a/plugins/plugins/core/streams/streams.js b/plugins/plugins/core/streams/streams.js
index 48d91546..fc4d9f71 100644
--- a/plugins/plugins/core/streams/streams.js
+++ b/plugins/plugins/core/streams/streams.js
@@ -36,7 +36,7 @@ const sortActiveChat = (activeChatObject, localChatHeads) => {
let oldChatHeads = JSON.parse(localChatHeads)
if (window.parent._.isEqual(oldChatHeads, activeChatObject) === true) {
- return
+
} else {
let oldActiveChats = objectToArray(oldChatHeads)
diff --git a/plugins/plugins/core/trade-bot/trade-bot-portal.src.js b/plugins/plugins/core/trade-bot/trade-bot-portal.src.js
index e16e50c6..e33c3774 100644
--- a/plugins/plugins/core/trade-bot/trade-bot-portal.src.js
+++ b/plugins/plugins/core/trade-bot/trade-bot-portal.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import Base58 from '../../../../crypto/api/deps/Base58.js'
import {decryptData, encryptData} from '../../../../core/src/lockScreen.js'
import {tradebotStyles} from './trade-bot-portal-css.js'
@@ -1830,7 +1830,7 @@ class TradeBotPortal extends LitElement {
this.autoHelperMessage = this.renderAutoHelperErr()
await errDelay(3000)
this.autoHelperMessage = this.renderAutoHelperPass()
- return
+
}
}
@@ -3314,4 +3314,4 @@ class TradeBotPortal extends LitElement {
}
}
-window.customElements.define('trade-bot-portal', TradeBotPortal)
\ No newline at end of file
+window.customElements.define('trade-bot-portal', TradeBotPortal)
diff --git a/plugins/plugins/core/trade-portal/charts/arrr-charts.js b/plugins/plugins/core/trade-portal/charts/arrr-charts.js
index 1389cda5..8ee8b7e5 100644
--- a/plugins/plugins/core/trade-portal/charts/arrr-charts.js
+++ b/plugins/plugins/core/trade-portal/charts/arrr-charts.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import * as Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting'
diff --git a/plugins/plugins/core/trade-portal/charts/btc-charts.js b/plugins/plugins/core/trade-portal/charts/btc-charts.js
index a72d19b1..1ab350e2 100644
--- a/plugins/plugins/core/trade-portal/charts/btc-charts.js
+++ b/plugins/plugins/core/trade-portal/charts/btc-charts.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import * as Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting'
diff --git a/plugins/plugins/core/trade-portal/charts/dgb-charts.js b/plugins/plugins/core/trade-portal/charts/dgb-charts.js
index 42da663a..369887f7 100644
--- a/plugins/plugins/core/trade-portal/charts/dgb-charts.js
+++ b/plugins/plugins/core/trade-portal/charts/dgb-charts.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import * as Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting'
diff --git a/plugins/plugins/core/trade-portal/charts/doge-charts.js b/plugins/plugins/core/trade-portal/charts/doge-charts.js
index 54c3cdb2..acd95eb4 100644
--- a/plugins/plugins/core/trade-portal/charts/doge-charts.js
+++ b/plugins/plugins/core/trade-portal/charts/doge-charts.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import * as Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting'
diff --git a/plugins/plugins/core/trade-portal/charts/ltc-charts.js b/plugins/plugins/core/trade-portal/charts/ltc-charts.js
index 1d6d9ab3..d4f3ec71 100644
--- a/plugins/plugins/core/trade-portal/charts/ltc-charts.js
+++ b/plugins/plugins/core/trade-portal/charts/ltc-charts.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import * as Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting'
diff --git a/plugins/plugins/core/trade-portal/charts/rvn-charts.js b/plugins/plugins/core/trade-portal/charts/rvn-charts.js
index 032de088..8fea7944 100644
--- a/plugins/plugins/core/trade-portal/charts/rvn-charts.js
+++ b/plugins/plugins/core/trade-portal/charts/rvn-charts.js
@@ -1,6 +1,6 @@
import {css, html, LitElement} from 'lit'
import {Epml} from '../../../../epml.js'
-import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
import '@polymer/paper-dialog/paper-dialog.js'
import * as Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting'
diff --git a/plugins/plugins/core/trade-portal/trade-portal.src.js b/plugins/plugins/core/trade-portal/trade-portal.src.js
index de0c8980..e8a99668 100644
--- a/plugins/plugins/core/trade-portal/trade-portal.src.js
+++ b/plugins/plugins/core/trade-portal/trade-portal.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import Base58 from '../../../../crypto/api/deps/Base58.js'
import {decryptData, encryptData} from '../../../../core/src/lockScreen.js'
import {tradeStyles} from './trade-portal-css.js'
@@ -953,11 +953,7 @@ class TradePortal extends LitElement {
const getSellButtonStatus = () => {
if (this.nodeInfo.isSynchronizing === true) {
this.sellBtnDisable = true
- } else if (this.nodeInfo.isSynchronizing === false) {
- this.sellBtnDisable = false
- } else {
- this.sellBtnDisable = true
- }
+ } else this.sellBtnDisable = this.nodeInfo.isSynchronizing !== false;
}
const getQortBtcPrice = () => {
@@ -1244,7 +1240,7 @@ class TradePortal extends LitElement {
this.tradeHelperMessage = this.renderTradeHelperErr()
await errDelay(3000)
this.tradeHelperMessage = this.renderTradeHelperPass()
- return
+
}
}
@@ -2833,4 +2829,4 @@ class TradePortal extends LitElement {
}
}
-window.customElements.define('trade-portal', TradePortal)
\ No newline at end of file
+window.customElements.define('trade-portal', TradePortal)
diff --git a/plugins/plugins/core/wallet/wallet-app.src.js b/plugins/plugins/core/wallet/wallet-app.src.js
index 78d638fc..0a9916b9 100644
--- a/plugins/plugins/core/wallet/wallet-app.src.js
+++ b/plugins/plugins/core/wallet/wallet-app.src.js
@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
+import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
import Base58 from '../../../../crypto/api/deps/Base58.js'
import {decryptData, encryptData} from '../../../../core/src/lockScreen.js'
import FileSaver from 'file-saver'
@@ -2955,7 +2955,7 @@ class MultiWallet extends LitElement {
this.walletHelperMessage = this.renderWalletHelperErr()
await errDelay(3000)
this.walletHelperMessage = this.renderWalletHelperPass()
- return
+
}
}
@@ -4766,7 +4766,7 @@ class MultiWallet extends LitElement {
await new Promise(resolve => setTimeout(resolve, 2000))
this.showWallet()
return
- } else if (res !== null && res !== "Synchronized") {
+ } else if (res !== "Synchronized") {
this.balanceString = res
await new Promise(resolve => setTimeout(resolve, 2000))
this.showWallet()
diff --git a/plugins/plugins/utils/publish-image.js b/plugins/plugins/utils/publish-image.js
index ed3b2c34..15af8a68 100644
--- a/plugins/plugins/utils/publish-image.js
+++ b/plugins/plugins/utils/publish-image.js
@@ -74,20 +74,20 @@ export const publishData = async ({
let nonce = null
const computPath =window.parent.location.origin + '/memory-pow/memory-pow.wasm.full'
await new Promise((res, rej) => {
-
+
worker.postMessage({convertedBytes, path: computPath});
-
+
worker.onmessage = e => {
-
+
worker.terminate()
-
+
nonce = e.data.nonce
res()
-
+
}
})
-
-
+
+
let response = await parentEpml.request("sign_arbitrary", {
nonce: selectedAddress.nonce,
arbitraryBytesBase58: transactionBytesBase58,
@@ -113,9 +113,9 @@ export const publishData = async ({
throw new Error('Error when signing');
}
-
-
-
+
+
+
let response = await parentEpml.request("sign_arbitrary_with_fee", {
nonce: selectedAddress.nonce,
arbitraryBytesBase58: transactionBytesBase58,
@@ -194,11 +194,11 @@ export const publishData = async ({
let fileBuffer = new Uint8Array(await file.arrayBuffer())
postBody = Buffer.from(fileBuffer).toString("base64")
}
-
+
}
-
+
let uploadDataUrl = `/arbitrary/${service}/${registeredName}${urlSuffix}?apiKey=${getApiKey()}`
- if (identifier != null && identifier.trim().length > 0) {
+ if (identifier.trim().length > 0) {
uploadDataUrl = `/arbitrary/${service}/${registeredName}/${identifier}${urlSuffix}?apiKey=${getApiKey()}`
}
@@ -234,7 +234,7 @@ export const publishData = async ({
if(tag5 != null && tag5 != "undefined"){
uploadDataUrl = uploadDataUrl + '&tags=' + encodeURIComponent(tag5)
}
-
+
let uploadDataRes = await parentEpml.request("apiCall", {
type: "api",
method: "POST",
@@ -250,5 +250,5 @@ export const publishData = async ({
} catch (error) {
throw new Error(error.message)
}
-
+
}
diff --git a/plugins/plugins/utils/publish-modal.js b/plugins/plugins/utils/publish-modal.js
index 54ea0ca4..76c60f67 100644
--- a/plugins/plugins/utils/publish-modal.js
+++ b/plugins/plugins/utils/publish-modal.js
@@ -1,4 +1,4 @@
-import {get} from '../../../core/translate/index.js'
+import {get} from '../../../core/translate'
export class ModalHelper {
constructor() {
diff --git a/plugins/plugins/utils/warning-modal.js b/plugins/plugins/utils/warning-modal.js
index 45e78210..0399591f 100644
--- a/plugins/plugins/utils/warning-modal.js
+++ b/plugins/plugins/utils/warning-modal.js
@@ -1,4 +1,4 @@
-import {get} from '../../../core/translate/index.js'
+import {get} from '../../../core/translate'
export class WarningModal {
constructor() {
diff --git a/scripts/afterPack.js b/scripts/afterPack.js
index 747e06db..73bda2a0 100644
--- a/scripts/afterPack.js
+++ b/scripts/afterPack.js
@@ -37,7 +37,7 @@ async function afterPack(context) {
if (electronPlatformName.includes("linux")) {
await doLinux(context);
- return;
+
}
}
diff --git a/splash/download.html b/splash/download.html
index f336d22d..e6608ad9 100644
--- a/splash/download.html
+++ b/splash/download.html
@@ -12,7 +12,7 @@
.center {
margin-top: 50%;
transform: translateY(-50%);
- width auto;
+ width: auto;
height: auto;
overflow: hidden;
}
@@ -28,8 +28,8 @@
}
@-webkit-keyframes spin {
- 0% { -webkit-transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(360deg); }
+ 0% { --webkit-transform: rotate(0deg); }
+ 100% { --webkit-transform: rotate(360deg); }
}
@keyframes spin {
@@ -49,4 +49,4 @@