From eea073f67177177bfbd9d301e49a17c13c0e7b5a Mon Sep 17 00:00:00 2001 From: gabaldon Date: Thu, 25 Jan 2024 18:31:38 +0100 Subject: [PATCH] refactor: remove unnecessary code --- .eslintignore | 2 +- src/App.vue | 8 +-- .../SendTransaction/DeployDataRequest.vue | 3 +- src/store/uiInteractions.js | 3 -- src/store/wallet.js | 23 ++------ src/typings/idle-vue/index.d.ts | 54 ------------------- 6 files changed, 10 insertions(+), 83 deletions(-) delete mode 100644 src/typings/idle-vue/index.d.ts diff --git a/.eslintignore b/.eslintignore index 8a3b6757b..48cbc6a7a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,6 +4,6 @@ /dist-electron/ /tests/unit/coverage/ /src/locales/** - +/src/components.d.ts .witnet-rust-testnet-*-wallet genesis_block.json \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index b96fc67f1..fa32144a1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,7 +37,7 @@ import { useIdle } from '@vueuse/core' const loading = ref(true) const transitionName: Ref = ref('no-transition') const route = useRoute() -const polling = ref() +let polling: null | ReturnType const store = useStore() const { idle } = useIdle(5 * 50 * 1000) // 5 min @@ -68,10 +68,12 @@ onMounted(() => { } }) onBeforeUnmount(() => { - clearInterval(polling.value) + if (polling) { + clearInterval(polling) + } }) const pollData = () => { - polling.value = setInterval(() => { + polling = setInterval(() => { store.commit('checkNetworkStatus') }, 3000) } diff --git a/src/components/SendTransaction/DeployDataRequest.vue b/src/components/SendTransaction/DeployDataRequest.vue index 16d670a75..013474e0b 100644 --- a/src/components/SendTransaction/DeployDataRequest.vue +++ b/src/components/SendTransaction/DeployDataRequest.vue @@ -1,6 +1,6 @@