Cleanup code

This commit is contained in:
AlphaX-Projects
2024-03-27 12:48:38 +01:00
parent 1c587325e8
commit 42201341c1
116 changed files with 356 additions and 452 deletions

View File

@@ -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;
}

View File

@@ -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)
window.customElements.define('app-view', AppView)

View File

@@ -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) {
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;" /></span>
<p style="margin:0px;padding:0px">${get("tour.tour4")}</p>
</div>
`,
},
});
@@ -397,7 +397,7 @@ class TourComponent extends connect(store)(LitElement) {
class="close-button"
@click=${()=> {
this.onClose()
}}
>
${translate("general.close")}

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {translate} from '../../translate/index.js'
import {translate} from '../../translate'
import isElectron from 'is-electron'
import '@polymer/paper-icon-button/paper-icon-button.js'

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {get} from '../../../translate/index.js'
import {get} from '../../../translate'
import '@material/mwc-icon'
import '@vaadin/tooltip';
@@ -206,11 +206,9 @@ class ChatSideNavHeads extends LitElement {
if(changedProperties.has('chatInfo')){
return true
}
if(changedProperties.has('isImageLoaded')){
return true
}
return !!changedProperties.has('isImageLoaded');
return false
}
getUrl(chatUrl) {

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit';
import {translate,} from '../../../translate/index.js'
import {translate,} from '../../../translate'
import '@material/mwc-button';
import '@material/mwc-dialog';
import '@material/mwc-checkbox';

View File

@@ -1,5 +1,5 @@
import { LitElement, html, css } from 'lit';
import { get, translate } from '../../../translate/index.js'
import { get, translate } from '../../../translate'
import axios from 'axios';
import '@material/mwc-menu';
import '@material/mwc-list/mwc-list-item.js';

View File

@@ -8,7 +8,7 @@ import '@polymer/iron-icons/iron-icons.js';
import { store } from '../../store.js';
import { setNewTab } from '../../redux/app/app-actions.js';
import '@material/mwc-icon';
import { get, translate } from '../../../translate/index.js';
import { get, translate } from '../../../translate';
import { repeat } from 'lit/directives/repeat.js';
import '../../../../plugins/plugins/core/components/TimeAgo.js';
import '../notification-view/popover.js';
@@ -94,11 +94,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
const res = await fetch(endpoint);
const getNames = await res.json();
if (Array.isArray(getNames) && getNames.length > 0) {
this.hasName = true;
} else {
this.hasName = false;
}
this.hasName = Array.isArray(getNames) && getNames.length > 0;
} catch (error) {
return '';
}
@@ -132,7 +128,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
state.app.accountInfo.names.length > 0
) {
this.hasName = true;
}
}
}
handleBlur() {

View File

@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {store} from '../../store'
import {connect} from 'pwa-helpers'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
class CoreSyncStatus extends connect(store)(LitElement) {
static get properties() {
@@ -201,4 +201,4 @@ class CoreSyncStatus extends connect(store)(LitElement) {
}
customElements.define('core-sync-status', CoreSyncStatus)
customElements.define('core-sync-status', CoreSyncStatus)

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit';
import {translate,} from '../../../translate/index.js'
import {translate,} from '../../../translate'
import axios from 'axios'
import '@material/mwc-menu';
import '@material/mwc-list/mwc-list-item.js'

View File

@@ -2,7 +2,7 @@
import { css, html, LitElement } from 'lit';
import { createPopper } from '@popperjs/core';
import '@material/mwc-icon';
import { translate } from '../../../translate/index.js'
import { translate } from '../../../translate'
import { store } from '../../store';
import { connect } from 'pwa-helpers';
import { setNewTab, setSideEffectAction } from '../../redux/app/app-actions';

View File

@@ -5,7 +5,7 @@ import {friendsViewStyles} from './friends-view-css';
import {connect} from 'pwa-helpers';
import {store} from '../../store';
import './feed-item'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import '@polymer/paper-spinner/paper-spinner-lite.js'
@@ -216,7 +216,7 @@ this.getFeedOnInterval()
observerHandler(entries) {
if (!entries[0].isIntersecting) {
return;
} else {
if (this.feedToRender.length < 20) {
return;
@@ -375,7 +375,7 @@ this.getFeedOnInterval()
return false;
});
}
async loadAndMergeData() {
let allData = this.feed

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import '@material/mwc-icon'
import './friends-side-panel.js'
import '@vaadin/tooltip'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
class FriendsSidePanelParent extends LitElement {
static get properties() {

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit';
import '@material/mwc-icon';
import './friends-view'
import './friends-feed'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
class FriendsSidePanel extends LitElement {
static get properties() {

View File

@@ -13,7 +13,7 @@ import './ChatSideNavHeads';
import '../../../../plugins/plugins/core/components/ChatSearchResults'
import './add-friends-modal'
import {translate,} from '../../../translate/index.js'
import {translate,} from '../../../translate'
import {store} from '../../store';
import {friendsViewStyles} from './friends-view-css';
import {parentEpml} from '../show-plugin';
@@ -125,7 +125,7 @@ class FriendsView extends connect(store)(LitElement) {
name
};
}
this.isOpenAddFriendsModal = true
this.openSidePanel()
}
@@ -165,7 +165,7 @@ class FriendsView extends connect(store)(LitElement) {
observerHandler(entries) {
if (!entries[0].isIntersecting) {
return;
} else {
if (this.friendList.length < 20) {
return;

View File

@@ -1,6 +1,6 @@
import { LitElement, html, css } from 'lit';
import { render } from 'lit/html.js';
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate/index.js'
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate'
import '@material/mwc-button';
import '@material/mwc-icon';
import '@vaadin/tooltip';
@@ -274,7 +274,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
this.requestUpdate();
}
}
async firstUpdated() {
@@ -549,12 +549,12 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
<div
style="display:flex;justify-content:center;flex-direction:column;gap:25px"
>
<div
style="display:flex;gap:15px;align-items:center"
>
<p
style="color: var(--black);font-size:16px"
>
${key}
@@ -592,9 +592,9 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
>
${translate('general.close')}
</button>
<div style="display:flex;gap:10px;align-items:center">
<button
?disabled="${this.isLoading}"
class="modal-button"
@@ -718,7 +718,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
class="input"
.value=${this.newFieldName}
@change=${(e) => {
this.newFieldName = e.target.value
this.newFieldName = e.target.value
}}
/>
<input

View File

@@ -6,7 +6,7 @@ import { store } from '../../store.js';
import WebWorker2 from '../WebWorkerFile.js';
import '@polymer/paper-spinner/paper-spinner-lite.js';
import '@vaadin/tooltip';
import { get, translate } from '../../../translate/index.js'
import { get, translate } from '../../../translate'
import ShortUniqueId from 'short-unique-id';
import '@polymer/paper-dialog/paper-dialog.js';
@@ -814,11 +814,7 @@ class ProfileQdn extends connect(store)(LitElement) {
const findIndex = friendList.findIndex(
(friend) => friend.name === name
);
if (findIndex !== -1) {
this.isFriend = true;
} else {
this.isFriend = false;
}
this.isFriend = findIndex !== -1;
} catch (error) {}
}
render() {

View File

@@ -6,12 +6,12 @@ import { store } from '../../store.js';
import WebWorker from '../WebWorkerFile.js';
import '@polymer/paper-spinner/paper-spinner-lite.js';
import '@vaadin/tooltip';
import { get, translate } from '../../../translate/index.js'
import { get, translate } from '../../../translate'
import ShortUniqueId from 'short-unique-id';
import {
decryptGroupData,
encryptDataGroup,
objectToBase64,
uint8ArrayToObject,
@@ -331,7 +331,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
nameObject = store.getState().app.accountInfo.names[0];
} catch (error) {
}
if (!nameObject) {
this.name = null;

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
import {registerTranslateConfig, translate, use} from '../../translate'
registerTranslateConfig({
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())

View File

@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {get, translate} from '../../../translate/index.js'
import {get, translate} from '../../../translate'
import {createWallet} from '../../../../crypto/api/createWallet.js'
import {doLogin, doLogout, doSelectAddress} from '../../redux/app/app-actions.js'

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {checkApiKey} from '../../apiKeyUtils.js'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import '@material/mwc-button'
import '@material/mwc-checkbox'

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {stateAwait} from '../../stateAwait.js'
import {get} from '../../../translate/index.js'
import {get} from '../../../translate'
import '@material/mwc-button'
import '@material/mwc-icon'

View File

@@ -1255,11 +1255,11 @@ function hexToRgb(hex) {
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null
};
}
function clamp(number, min, max) {
return Math.min(Math.max(number, min), max)
};
}
function isInArray(value, array) {
return array.indexOf(value) > -1

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import '@material/mwc-button'

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {doLogout} from '../../redux/app/app-actions.js'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import '@polymer/paper-dialog/paper-dialog.js'
import '@material/mwc-button'

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
import {registerTranslateConfig, translate, use} from '../../translate'
registerTranslateConfig({
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())

View File

@@ -8,7 +8,7 @@ import '@polymer/iron-icons/iron-icons.js';
import {store} from '../../store.js';
import {setNewNotification} from '../../redux/app/app-actions.js';
import '@material/mwc-icon';
import {get, translate} from '../../../translate/index.js'
import {get, translate} from '../../../translate'
import {repeat} from 'lit/directives/repeat.js';
import '../../../../plugins/plugins/core/components/TimeAgo.js';
import './popover.js';
@@ -20,7 +20,6 @@ class NotificationBellGeneral extends connect(store)(LitElement) {
showNotifications: { type: Boolean },
notificationCount: { type: Boolean },
theme: { type: String, reflect: true },
notifications: { type: Array },
currentNotification: { type: Object },
};

View File

@@ -111,11 +111,7 @@ class NotificationBell extends connect(store)(LitElement) {
}
this.notifications = notificationsToShow
if (this.notifications.length === 0) {
this.notificationCount = false
} else {
this.notificationCount = true
}
this.notificationCount = this.notifications.length !== 0;
if (!this.initialFetch) this.initialFetch = true
} catch (error) {

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {get, translate} from '../../translate/index.js'
import {get, translate} from '../../translate'
import snackbar from '../functional-components/snackbar.js'
import '@polymer/paper-icon-button/paper-icon-button.js'
@@ -118,7 +118,7 @@ class SearchModal extends LitElement {
dismiss: true
})
this.shadowRoot.getElementById('searchContent').value = this.searchContentString
return
} else {
let sendInfoAddress = this.shadowRoot.getElementById('searchContent').value
const infoDialog = document.getElementById('main-app').shadowRoot.querySelector('app-view').shadowRoot.querySelector('user-info-view')

View File

@@ -1,7 +1,7 @@
import { LitElement, html, css } from 'lit'
import { connect } from 'pwa-helpers'
import { store } from '../../store.js'
import { get, translate } from '../../../translate/index.js'
import { get, translate } from '../../../translate'
class AccountView extends connect(store)(LitElement) {
static get properties() {
@@ -136,4 +136,4 @@ class AccountView extends connect(store)(LitElement) {
}
}
window.customElements.define('account-view', AccountView)
window.customElements.define('account-view', AccountView)

View File

@@ -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 snackbar from '../../functional-components/snackbar.js'
import FileSaver from 'file-saver'

View File

@@ -3,7 +3,7 @@ import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {allowShowSyncIndicator, removeShowSyncIndicator} from '../../redux/app/app-actions.js'
import {doSetQChatNotificationConfig} from '../../redux/user/user-actions.js'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import isElectron from 'is-electron'
import '@material/mwc-checkbox'

View File

@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import '@material/mwc-textfield'
import '@material/mwc-icon'

View File

@@ -10,7 +10,7 @@ import {
removeQAPPAutoLists,
setIsOpenDevDialog
} from '../../redux/app/app-actions.js'
import {get, translate} from '../../../translate/index.js'
import {get, translate} from '../../../translate'
import snackbar from '../../functional-components/snackbar.js'
import FileSaver from 'file-saver'

View File

@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {translate} from '../../../translate/index.js'
import {translate} from '../../../translate'
import '@polymer/paper-dialog/paper-dialog.js'
import '@material/mwc-button'

View File

@@ -8,7 +8,7 @@ import {repeat} from 'lit/directives/repeat.js';
import ShortUniqueId from 'short-unique-id';
import {setIsOpenDevDialog, setNewTab} from '../redux/app/app-actions.js'
import FileSaver from 'file-saver'
import {get, registerTranslateConfig, translate, use} from '../../translate/index.js'
import {get, registerTranslateConfig, translate, use} from '../../translate'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-icon'
@@ -1995,11 +1995,7 @@ class NavBar extends connect(store)(LitElement) {
this.myPluginNameRes = res
})
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0) {
myPluginName = false
} else {
myPluginName = true
}
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
return myPluginName
}
@@ -2060,11 +2056,7 @@ class NavBar extends connect(store)(LitElement) {
this.myPluginNameRes = res
})
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0 ) {
myPluginName = false
} else {
myPluginName = true
}
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
return myPluginName
}

View File

@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit';
import {connect} from 'pwa-helpers';
import {store} from '../store.js';
import {get, translate} from '../../translate/index.js'
import {get, translate} from '../../translate'
import {asyncReplace} from 'lit/directives/async-replace.js';
import '../functional-components/my-button.js';
@@ -293,7 +293,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
this.getMintingAcccounts();
} catch (error) {
this.errorMsg = this.renderErrorMsg3();
return;
}
}
@@ -426,7 +426,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
} catch (error) {
console.log({ error })
this.errorMsg = (error && error.data && error.data.message) ? error.data.message : this.renderErrorMsg4();
return;
}
};

View File

@@ -1,5 +1,5 @@
import {css, html, LitElement} from 'lit'
import {translate} from '../../translate/index.js'
import {translate} from '../../translate'
import '@polymer/paper-icon-button/paper-icon-button.js'
import '@polymer/iron-icons/image-icons.js'
import '@polymer/iron-icons/iron-icons.js'

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {render} from 'lit/html.js'
import {connect} from 'pwa-helpers'
import {store} from '../../store.js'
import {get, translate} from '../../../translate/index.js'
import {get, translate} from '../../../translate'
import '@polymer/paper-dialog/paper-dialog.js'
import '@material/mwc-button'

View File

@@ -3,7 +3,7 @@ import {css, html, LitElement} from 'lit'
import '@material/mwc-button'
import '@material/mwc-icon'
import {translate} from '../../translate/index.js'
import {translate} from '../../translate'
class FragFileInput extends LitElement {
static get properties () {

View File

@@ -1,7 +1,7 @@
import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../store.js'
import {get, translate} from '../../translate/index.js'
import {get, translate} from '../../translate'
import {listenForRequest} from '../transactionRequest.js'

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../store.js'
import {testApiKey} from '../apiKeyUtils.js'
import {get, translate} from '../../translate/index.js'
import {get, translate} from '../../translate'
import '@material/mwc-dialog'
import '@material/mwc-button'

View File

@@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
import {connect} from 'pwa-helpers'
import {store} from '../store.js'
import {doAddNode, doEditNode, doLoadNodeConfig, doRemoveNode, doSetNode} from '../redux/app/app-actions.js'
import {get, registerTranslateConfig, translate, use} from '../../translate/index.js'
import {get, registerTranslateConfig, translate, use} from '../../translate'
import snackbar from './snackbar.js'
import '../components/language-selector.js'
import '../custom-elements/frag-file-input.js'