Skip to content

Commit

Permalink
FIx: clearTransaction did not reset state
Browse files Browse the repository at this point in the history
  • Loading branch information
asymworks committed Dec 12, 2020
1 parent 43ee883 commit 3b48c0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/store/modules/ledger.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const ledgerModule: Module<LedgerState, RootState> = {
): Promise<TransactionClearanceSchema[]> {
commit('loading');
return transactionService.clearTransaction(id, data)
.then((response) => {
commit('done');
return response;
})
.catch((error: ApiError) => { throw error; });
},
createTransaction(
Expand Down Expand Up @@ -178,6 +182,9 @@ const ledgerModule: Module<LedgerState, RootState> = {
clear(state: LedgerState) {
state.ledger = [];
},
done(state: LedgerState) {
state.status = { loaded: true };
},
error(state: LedgerState, error: string) {
// eslint-disable-next-line no-console
console.error(error);
Expand Down

0 comments on commit 3b48c0a

Please sign in to comment.