Skip to content

Extract analytics related code from ApproveView/Approve in to hook #5601

@jpuri

Description

@jpuri

Description

Extracting out analytics related code from ApproveView/Approve into a separate hook.

After this task is completed #5574 ApproveView/Approve will be converted into a functional component. With about 740 lines of code the component is currently huge. Analytics related code is not directly related to the functionality of approving can be extracted out a separate hook thus reducing complexity of this component.

This can include following functions being moved to the hook:

  1. trackApproveEvent
  2. getAnalyticsParams
  3. setAnalyticsParams
  4. getGasAnalyticsParams
  5. create new functions: trackApprovalCompleted, trackApprovalCancelled, ...

Acceptance Criteria

  • Approve functionality continue to work as before and analytics work as expected.

References

https://docs.google.com/document/d/19xKY4e07UThOa1jsDQA8pjsNLUBRn39EdUbaFpz3OR0/edit?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions