# fix\(usage\): derive empty-usage identity from validated account fields \(\#271\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/a3bee6354073b05342ec77472460939787755a57)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: a3bee6354073b05342ec77472460939787755a57

Requested commit: a3bee6354073b05342ec77472460939787755a57

Commit: a3bee6354073b05342ec77472460939787755a57

Tree: 79322b52533683370c2a98740aefecebf62e5de3

Author: Simone

Committer: GitHub

## Message

```
fix(usage): derive empty-usage identity from validated account fields (#271)

Malformed identity payloads made ProviderSnapshot.normalize treat a provider
without any valid account identity as if it had one: the raw-item length
checks counted arrays and other discarded values, so the popup showed the
limits-unavailable message instead of no-usage. The placeholder now follows
the already-validated account, organization, and loginMethod strings, which
also keeps legacy usage.accountEmail providers eligible.

Regression coverage in tst_provider_snapshot covers malformed fields and the
legacy nested-identity path.
```

## Parents

- [38d05a9943aa0a19ba61b6c03d801140ac833983](https://git.cafe/lucenx/codexbar-plasma/commit/38d05a9943aa0a19ba61b6c03d801140ac833983?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/a3bee6354073b05342ec77472460939787755a57?format=markdown)
