Skip to content

Conversation

@dievazqu
Copy link
Contributor

@dievazqu dievazqu commented Nov 2, 2023

Description

For the tokens list, we were only adding new fields to firebase. This was to avoid overriding some fields that are updated from the price service (historicalUsdPrices, usdPrice and priceFetchedAt).
This didn't allow us to remove fields (which is needed to disable swaps for example).

This PR changes the logic, so now we only keep some specific fields, and we remove all other unexpected fields.

} else {
let updateRequest = data
if (overrideType.deleteMissingKeys) {
const deleteMissingKeys = deleteMissingKeysUpdateRequest(
Copy link
Contributor Author

@dievazqu dievazqu Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this might a bit misleading, but this was only removing missing keys in the root level, so basically it was removing the whole token data if not present.


export class OverrideType {
static readonly OverrideAll = new OverrideType(true, true)
static readonly OnlyUpdates = new OverrideType(false, false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants