moov-io / wire

FedWire funds service file parser and writer. The HTTP server is available in a Docker image and the Go package is available.
https://moov-io.github.io/wire/
Apache License 2.0
83 stars 39 forks source link

Fix: add equality sign to converters when size is equal to maxLen #252

Closed bhedge closed 2 years ago

bhedge commented 2 years ago

This fix addresses a minor bug when the field lengths are equal to the maxLen.

Specifically, when running a validation against the {6000} element of a wire, there was an error being generated when the Originator to Beneficiary Information had a field length of 35 characters. The FedWire Spec allows for up to 4 lines of 35 characters each. This change will allow for the fields to be equal to the max allowed length of 35 and prevent the generation of the error message: error reading file: line:n record:OriginatorToBeneficiary wire.TagWrongLenthErr contains invalid information in a segment

image

atonks2 commented 2 years ago

Thanks for the PR @bhedge and @martinz-provisions! I just approved the github workflow so our tests will run against your changes.

codecov-commenter commented 2 years ago

Codecov Report

Merging #252 (5719457) into master (348b169) will increase coverage by 0.03%. The diff coverage is 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #252 +/- ## ========================================== + Coverage 74.78% 74.81% +0.03% ========================================== Files 73 73 Lines 8597 8597 ========================================== + Hits 6429 6432 +3 + Misses 1594 1593 -1 + Partials 574 572 -2 ```
bhedge commented 2 years ago

Thanks for the PR @bhedge and @martinz-provisions! I just approved the github workflow so our tests will run against your changes.

We are glad to help Daniel (@atonks2) and appreciate all you and the team do with this library!