Skip to content

Commit

Permalink
fix: file streamer not returning E adn F records (#28)
Browse files Browse the repository at this point in the history
Co-authored-by: Manav <[email protected]>
  • Loading branch information
kimurav and Manav authored May 7, 2024
1 parent 81a4006 commit afed7d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions file_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,13 @@ func (fs *FileStreamer) ScanTxn() (Transaction, error) {
if err := cr.Parse(txnsSegment[startIdx:endIdx]); err != nil {
return nil, newStreamParseError(err, string(CreditReverseRecord), fs.currentTxn, fs.currentLine)
}
txn = &cr
case DebitReverseRecord:
dr := DebitReverse{}
if err := dr.Parse(txnsSegment[startIdx:endIdx]); err != nil {
return nil, newStreamParseError(err, string(DebitReverseRecord), fs.currentTxn, fs.currentLine)
}
txn = &dr
case HeaderRecord, NoticeOfChangeRecord, NoticeOfChangeHeader, NoticeOfChangeFooter, FooterRecord:
return nil, fmt.Errorf("invalid record type: %v", recordType)
}
Expand Down

0 comments on commit afed7d1

Please sign in to comment.