Skip to content

Commit ab26498

Browse files
authored
Fix for undefined Plaid account names (#28)
1 parent 51a9772 commit ab26498

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"main": "mintable.js",
55
"author": "Kevin Schaich",
66
"license": "MIT",
7-
"version": "1.2.0",
7+
"version": "1.2.1",
88
"scripts": {
99
"circleci:dry-run": "circleci local execute -e MINTABLE_CONFIG=$MINTABLE_CONFIG",
1010
"export": "node ./src/scripts/export.js",

src/lib/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const DEFAULT_CONFIG = {
1313
'date',
1414
'amount',
1515
'name',
16-
'account_details.official_name',
16+
'account',
1717
'category.0',
1818
'category.1',
1919
'pending'

src/lib/plaid.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ const fetchAllCleanTransactions = async (startDate, endDate, pageSize = 250, off
147147
official_name: account.official_name,
148148
name: account.name,
149149
nickname: transaction.accountNickname
150-
}
150+
},
151+
account: account.official_name || account.name || transaction.accountNickname
151152
}
152153
})
153154

0 commit comments

Comments
 (0)