digidem / comapeo-mobile

The next version of Mapeo mobile
GNU General Public License v3.0
5 stars 0 forks source link

Import role IDs from `@mapeo/core` instead of hard-coding #445

Open EvanHahn opened 1 week ago

EvanHahn commented 1 week ago

We copy role IDs, such as COORDINATOR_ROLE_ID, from @mapeo/core:

https://github.com/digidem/comapeo-mobile/blob/bbc59d67372f6fa3932a2e4b501350d7b893f0bc/src/frontend/sharedTypes/index.ts#L31-L37

@mapeo/core@9.0.0-alpha.12 exposes these, and we should use them instead of hard-coding. The frontend cannot directly import @mapeo/core (except for types), so this is a little more difficult than simply importing them.

See also: https://github.com/digidem/mapeo-core-next/pull/704