Skip to content

local_transaction controller is hard to follow #5662

Description

@KludgeKML

The code in the local_transaction controller is built so as to work off side-effects (ie you check for whether there's a location error, and the side-effect of this is that it checks whether the location-api response meets any of the error criteria, and the side-effect of this is that it looks for a stored location-api response and the side-effect of this is that it calls the location api with the postcode).

This makes the code more difficult to reason about and follow through than the way find-local-council does it (which is to explicitly call the postcode lookup first, then work through the checks in an orderly fashion).

Activity

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

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