Skip to content

Commit

Permalink
refactor: remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Jan 25, 2024
1 parent 16a316a commit eea073f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/dist-electron/
/tests/unit/coverage/
/src/locales/**

/src/components.d.ts
.witnet-rust-testnet-*-wallet
genesis_block.json
8 changes: 5 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { useIdle } from '@vueuse/core'
const loading = ref(true)
const transitionName: Ref<string> = ref('no-transition')
const route = useRoute()
const polling = ref()
let polling: null | ReturnType<typeof setInterval>
const store = useStore()
const { idle } = useIdle(5 * 50 * 1000) // 5 min
Expand Down Expand Up @@ -68,10 +68,12 @@ onMounted(() => {
}
})
onBeforeUnmount(() => {
clearInterval(polling.value)
if (polling) {
clearInterval(polling)
}
})
const pollData = () => {
polling.value = setInterval(() => {
polling = setInterval(() => {
store.commit('checkNetworkStatus')
}, 3000)
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/SendTransaction/DeployDataRequest.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<el-dialog
v-model="dialogVisible"
:value="true"
class="dialog"
:title="title"
:show-close="true"
Expand Down Expand Up @@ -63,7 +63,6 @@ export default {
return {
variablesUpdated: false,
stage: 0,
dialogVisible: true,
}
},
computed: {
Expand Down
3 changes: 0 additions & 3 deletions src/store/uiInteractions.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ export default {
},
receiveTransactionClicked(state) {
state.receiveTransactionClicked = true
console.log(
`receive transaction clicked ${state.receiveTransactionClicked}`,
)
},
clearTransactionClicked(state) {
state.receiveTransactionClicked = false
Expand Down
23 changes: 3 additions & 20 deletions src/store/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ export default {
if (localeFromStorage) {
locale.value = localeFromStorage
} else {
const isLocalLanguage = Object.values(LANGUAGES).find(language => {
return language.locale === locale.value
})
const isLocalLanguage = Object.values(LANGUAGES).find(
language => language.locale === locale.value,
)
locale.value = isLocalLanguage ? locale.value : 'en'
}
},
Expand Down Expand Up @@ -1118,23 +1118,6 @@ export default {
? context.commit('setUnit', unit)
: context.commit('setUnit', defaultUnit)
},
// getLocale: async function (context) {
// const localeFromStorage = localStorageWrapper.getLanguageSettings()
// if (localeFromStorage) {
// context.commit('setLanguage', {
// locale: localeFromStorage,
// })
// } else {
// const isLocalLanguage = Object.values(LANGUAGES).find(language => {
// return language.locale === i18n.locale
// })
// context.commit('setLanguage', {
// locale: isLocalLanguage ? i18n.locale : 'en',
// })
// }
// Set element locale
// elementLocale.use(LANGUAGES[payload.i18n.locale].elementLocale)
// },
getTheme: async function (context) {
const theme = localStorageWrapper.getThemeSettings()
const defaultTheme = DEFAULT_THEME
Expand Down
54 changes: 0 additions & 54 deletions src/typings/idle-vue/index.d.ts

This file was deleted.

0 comments on commit eea073f

Please sign in to comment.