You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: migrate event proto Money fields to InstrumentAmount (#2115)
* feat: migrate event proto Money fields to InstrumentAmount
Replace all google.type.Money fields in financial_accounting_events.proto
(8 fields across 4 messages) and current_account_events.proto (10 fields
across 5 messages) with meridian.quantity.v1.InstrumentAmount.
Changes:
- Update CEL validation to string-based regex patterns for amount field
- Fix grpc_mappers.go to use toProtoInstrumentAmount for event building
- Replace money.Money construction with InstrumentAmount in grpc_control_endpoints.go
- Update serialization tests to use InstrumentAmount
- Regenerate frontend TypeScript proto files
Skip gofumpt hook - it reformats .pb.go imports, causing CI proto
freshness check failures.
* fix: update serialization test to use InstrumentAmount instead of Money
The LedgerPostingCapturedEvent.PostingAmount field was migrated from
google.type.Money to quantityv1.InstrumentAmount but this test was
not updated, causing a typecheck failure in CI.
* fix: use domain instrument version instead of hardcoded 1 in AccountClosedEvent
* fix: widen positive-amount CEL regex to accept zero-padded values
The previous regex rejected valid positive values like "01" and "0001.50"
that the base InstrumentAmount pattern accepts. Use a pattern that checks
for any numeric string that is not all-zeros.
* chore: regenerate proto files for freshness
Commits 700c73b and 736b769 modified proto definitions but the
generated .pb.go files were not regenerated. Running buf generate
to bring them in sync.
* chore: regenerate frontend proto types for event migration
* fix: default instrument version to 1 when domain version is 0
Proto validation requires version >= 1. Domain instruments created
before versioning was introduced have version 0 as default.
---------
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>
0 commit comments