Skip to content

NetworkFeatureFlags interface does not include camel case keys #153

@wachunei

Description

@wachunei

Current interface NetworkFeatureFlags does not include the camel case versions of the properties being returned by the api.

https://github.com/MetaMask/swaps-controller/blob/main/src/swapsInterfaces.ts#L26-L33

export interface NetworkFeatureFlags {
  // eslint-disable-next-line camelcase
  mobile_active: boolean;
  // eslint-disable-next-line camelcase
  extension_active: boolean;
  // eslint-disable-next-line camelcase
  fallback_to_v1?: boolean;
}

API Example (https://swap.metaswap.codefi.network/featureFlags)

"ethereum": {
  "mobile_active": true,
  "extension_active": true,
  "fallback_to_v1": false,
  "fallbackToV1": false,
  "mobileActive": true,
  "extensionActive": true,
  "mobileActiveIOS": true,
  "mobileActiveAndroid": true
},

At the same time we changed the integration in the mobile app to use the camel case versions but this is now giving us a typescript error:

Screenshot 2023-01-20 at 11 09 53

Question: should we use camel case and update the interface or we should use the snake case according to the interface?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions