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).
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).