Skip to content

Commit

Permalink
revert logic
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Sep 21, 2023
1 parent f1be866 commit 59ec789
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/DistanceRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ function DistanceRequest({iou, iouType, report, transaction, mapboxAccessToken,
const hasRouteError = !!lodashGet(transaction, 'errorFields.route');
const hasRoute = TransactionUtils.hasRoute(transaction);
const validatedWaypoints = TransactionUtils.getValidWaypoints(waypoints);
const hasInvalidWaypoint = _.size(validatedWaypoints) < numberOfWaypoints;
const previousValidatedWaypoints = usePrevious(validatedWaypoints);
const haveValidatedWaypointsChanged = !_.isEqual(previousValidatedWaypoints, validatedWaypoints);
const isRouteAbsentWithoutErrors = !hasRoute && !hasRouteError;
Expand Down Expand Up @@ -298,7 +297,7 @@ function DistanceRequest({iou, iouType, report, transaction, mapboxAccessToken,
success
style={[styles.w100, styles.mb4, styles.ph4, styles.flexShrink0]}
onPress={navigateToNextPage}
isDisabled={_.size(validatedWaypoints) < 2 || hasRouteError || isOffline || hasInvalidWaypoint}
isDisabled={_.size(validatedWaypoints) < 2 || hasRouteError || isOffline}
text={translate('common.next')}
/>
</ScrollView>
Expand Down

0 comments on commit 59ec789

Please sign in to comment.