From ef75a6376ebbc5c55723ecf25efe716680566d87 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 20 May 2022 14:13:36 -0600 Subject: [PATCH] Only fill street address from ZIP lookup if delivery point verified --- www/assets/js/rates.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/assets/js/rates.js b/www/assets/js/rates.js index c532dda..34b3e72 100644 --- a/www/assets/js/rates.js +++ b/www/assets/js/rates.js @@ -181,7 +181,10 @@ function doZipCodeLookup(street, city, state) { app.dialog.close(); if (resp.status == "OK") { app.popup.close(); - $("#to_street1").val(resp.address.address); + if (resp.address.dpv_confirmed) { + // If an exact deliverable match was found, fill in the verified street address + $("#to_street1").val(resp.address.address); + } $("#to_zip").val(resp.address.zip); app.input.checkEmptyState('#to_street1'); app.input.checkEmptyState('#to_zip');