Skip to content

Commit

Permalink
Remove functions normalizeAccount and CalculateStartingBalance
Browse files Browse the repository at this point in the history
Since no changes were made to the default functions, they should be deleted from this specific bank (SPK_WORMS_ALZEY_RIED_MALADE51WOR).
  • Loading branch information
DirgoSalga committed Sep 25, 2024
1 parent 94f67b6 commit 5a84b18
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/app-gocardless/banks/spk-worms-alzey-ried-malade51wor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,6 @@ export default {

accessValidForDays: 90,

normalizeAccount(account) {
return {
account_id: account.id,
institution: account.institution,
mask: account.iban.slice(-4),
iban: account.iban,
name: [account.name, printIban(account)].join(' '),
official_name: account.product,
type: 'checking',
};
},

normalizeTransaction(transaction, _booked) {
const date = transaction.bookingDate || transaction.valueDate;
if (!date) {
Expand All @@ -39,14 +27,4 @@ export default {
date: transaction.bookingDate || transaction.valueDate,
};
},

calculateStartingBalance(sortedTransactions = [], balances = []) {
const currentBalance = balances.find(
(balance) => 'interimAvailable' === balance.balanceType,
);

return sortedTransactions.reduce((total, trans) => {
return total - amountToInteger(trans.transactionAmount.amount);
}, amountToInteger(currentBalance.balanceAmount.amount));
},
};

0 comments on commit 5a84b18

Please sign in to comment.