Skip to content

Commit

Permalink
refactor: avoid using deleteWalletFiles method in store
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Mar 21, 2024
1 parent 0f51219 commit 68a5c20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion electron/walletManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export class WalletManager {
this.walletProcess.on('exit', () => {
if (this.relaunch) {
actions.quitApp()
// actions.relaunch()
actions.relaunch()
} else {
actions.quitApp()
}
Expand Down
9 changes: 5 additions & 4 deletions src/components/DeleteWalletFilesModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
</template>

<script>
import { mapState, mapActions, mapMutations, mapGetters } from 'vuex'
import { mapState, mapMutations, mapGetters } from 'vuex'
import { sendClearWalletFiles } from '@/ipc/ipcMessages'
export default {
name: 'DeleteConfirmation',
Expand Down Expand Up @@ -72,9 +73,9 @@ export default {
this.error = null
},
methods: {
...mapActions({
deleteWalletFiles: 'deleteWalletFiles',
}),
deleteWalletFiles() {
sendClearWalletFiles()
},
...mapMutations({
close: 'closeDeleteWalletFilesModal',
}),
Expand Down
4 changes: 0 additions & 4 deletions src/store/wallet.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { api, eventProcessor } from '@/main'
import router from '@/router'
import { standardizeBalance } from '@/api'
import { sendClearWalletFiles } from '@/ipc/ipcMessages'
import {
calculateTimeAgo,
createNotification,
Expand Down Expand Up @@ -566,9 +565,6 @@ export default {
})
}
},
deleteWalletFiles() {
sendClearWalletFiles()
},
async deleteWallet(context) {
const request = await api.deleteWallet({
wallet_id: context.state.walletId,
Expand Down

0 comments on commit 68a5c20

Please sign in to comment.