Kollishion opened a new pull request, #205:
URL: https://github.com/apache/fineract-consumer-facing/pull/205
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## What and why
Moves `I18nService` and the device fingerprint onto the `I18N` and `STORAGE`
adapters, so neither file uses ngx-translate or Web Storage directly.
`deviceFingerprint()` becomes an injectable `DeviceFingerprint` service
(`get()`), and its callers (the BFF API adapters, `AuditService`,
`authInterceptor`) and `settings.store.spec.ts` are updated. The
`device-fingerprint.ts` and `i18n.service.ts` entries are removed from
`eslint-suppressions.json`.
The stored keys are unchanged: `storage-keys.ts` maps `deviceId` to
`bff.device-id` and `language` to `app.lang`, and `web-storage.adapter.spec.ts`
asserts both. Existing sessions and saved languages survive.
Closes #173
Part of #172
## Verification
- `npm run lint` passes with no output
- `npm test` passes (24 files, 144 tests)
- Unit tests only. I did not run the Docker stack (Cucumber / Playwright).
## Screenshots
Not applicable
## AI assistance (optional)
- Tool / model: Claude (Anthropic)
- Harness / workflow: claude.ai chat, used for debugging and reviewing the
change; I applied and tested the edits myself
## Checklist
- [x] I did not hand-edit generated files under
`frontend/src/openapi-client/`.
- [x] Backend code follows the feature and CQRS layout in
[AGENTS.md](AGENTS.md#backend-conventions-consumer) (command and query sides,
module boundaries); frontend code goes through the adapters in
`frontend/src/app/core/adapters/`.
- [x] I did not add entries to a lint or architecture baseline
(suppressions, frozen violations) to get the build passing.
- [x] User-facing strings use translation keys. (Not applicable: no
user-facing strings changed.)
- [x] I added or updated tests appropriate to this change, or explained why
tests were not needed. (`settings.store.spec.ts` updated; the adapter specs
already cover the key mapping.)
- [x] UI workflow changes include suitable e2e coverage, including
real-backend testing where relevant. (Not applicable: refactor with no UI
change.)
- [x] Commits are signed — see [Signing your
commits](CONTRIBUTING.md#signing-your-commits) in CONTRIBUTING.md.
- [x] I followed the [AI-assisted contributions
guidance](CONTRIBUTING.md#ai-assisted-contributions).
- [x] If this adds a feature or changes what a consumer can see or do, I
raised it on
[[email protected]](https://lists.apache.org/[email protected])
first,
or it is a bug fix, refactor or test change, where that does not
apply. (Refactor.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]