1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

chore: Cleanup for PR

- Cleanup gitignore
- Fix transaction naming bug
This commit is contained in:
Cameron Roudebush 2025-05-17 14:08:34 -04:00
parent 29f46e53e9
commit 9e9e2fa1e8
2 changed files with 5 additions and 4 deletions

2
.gitignore vendored
View file

@ -71,5 +71,3 @@ node_modules
compose.yml compose.yml
plaid_test_accounts/ plaid_test_accounts/
dump.rdb
dev.docs.md

View file

@ -174,8 +174,11 @@ class SimpleFinAccount < ApplicationRecord
amount_from_sf = transaction_data["amount"].to_d * -1 amount_from_sf = transaction_data["amount"].to_d * -1
# account_type = self.account.accountable_type # account_type = self.account.accountable_type
# Try to determine name from best option
name = transaction_data["description"].presence || "Transaction"
entry.assign_attributes( entry.assign_attributes(
name: transaction_data["description"], name: name,
amount: amount_from_sf, amount: amount_from_sf,
currency: self.account.currency, currency: self.account.currency,
date: Time.at(transaction_data["posted"].to_i).to_date, date: Time.at(transaction_data["posted"].to_i).to_date,