ethyca / fides

The Privacy Engineering & Compliance Framework

Home Page:https://ethyca.com/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update `vendorIsGvl` logic after vendor id updates

allisonking opened this issue · comments

Is your feature request related to a specific problem?

The backend is updating its vendor id scheme to be prefixed by its data source, i.e. gvl.2 or ac.4. This will break some of our existing tc string generation logic, as gvl.2 is not a GVL id, we need to decode it to 2. however, this should also mean we can modify our vendorIsGvl function to not search the whole gvl to see if it's there, since we will be able to tell straight from the id.

Describe the solution you'd like

Add a function i.e. decodeVendorId which returns its data source and its id (should be a very short function). Use this function during tc string generation.

Also update the vendorIsGvl function to not iterate through the whole GVL to see if there's a matching ID, and to instead probably just use the decodeVendorId to figure it out.

Describe alternatives you've considered, if any

A description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Closed by #4247

moving to done