read and check ofx 2.x file header

This commit is contained in:
MaysWind
2024-11-01 00:11:26 +08:00
parent d174e99c80
commit ac29f0bf98
4 changed files with 651 additions and 465 deletions
@@ -24,7 +24,7 @@ var (
// ParseImportedData returns the imported data by parsing the open financial exchange (ofx) file transaction data
func (c *ofxTransactionDataImporter) ParseImportedData(ctx core.Context, user *models.User, data []byte, defaultTimezoneOffset int16, accountMap map[string]*models.Account, expenseCategoryMap map[string]*models.TransactionCategory, incomeCategoryMap map[string]*models.TransactionCategory, transferCategoryMap map[string]*models.TransactionCategory, tagMap map[string]*models.TransactionTag) (models.ImportedTransactionSlice, []*models.Account, []*models.TransactionCategory, []*models.TransactionCategory, []*models.TransactionCategory, []*models.TransactionTag, error) {
ofxDataReader, err := createNewOFXFileReader(data)
ofxDataReader, err := createNewOFXFileReader(ctx, data)
if err != nil {
return nil, nil, nil, nil, nil, nil, err