Open source personal finance application
refactor: remove unneeded code
ilkome25d6f92e2051
diff --git a/store/trns/actions.js b/store/trns/actions.jsindex e2a577fd..edf8ff37 100644--- a/store/trns/actions.js+++ b/store/trns/actions.js@@ -82,30 +82,11 @@ export default {},// init- async initTrns ({ rootState, dispatch, commit }) {+ async initTrns ({ rootState, dispatch }) {const uid = rootState.user.user.uidawait db.ref(`users/${uid}/trns`).on('value', (snapshot) => {const items = Object.freeze(snapshot.val())- if (items) {- for (const trnId of Object.keys(items)) {- if (!items[trnId].walletId || items[trnId].accountId) {- commit('app/setAppStatus', 'loading', { root: true })- const trn = items[trnId]- db.ref(`users/${uid}/trns/${trnId}`)- .set({- amount: trn.amount,- categoryId: trn.categoryId,- date: Number(trn.date),- description: trn.description || null,- edited: dayjs().valueOf(),- groups: trn.groups || null,- type: Number(trn.type),- walletId: trn.accountId || trn.walletId- })- }- }- }dispatch('setTrns', items)}, e => console.error(e))},