From 84a37a671fdb2462c76a6d965137cb7bbbb09bf0 Mon Sep 17 00:00:00 2001
From: Ray Schamp
Date: Thu, 13 Jul 2017 09:56:25 -0400
Subject: [PATCH] Remove SmartyStreets API
We are so lax with this that it's not actually helping us, and we don't have a plan with them anymore.
---
.travis.yml | 2 --
src/components/registration/steps.jsx | 34 +------------------------
src/lib/smarty-streets.js | 22 ----------------
src/views/teacherregistration/l10n.json | 1 -
webpack.config.js | 1 -
5 files changed, 1 insertion(+), 59 deletions(-)
delete mode 100644 src/lib/smarty-streets.js
diff --git a/.travis.yml b/.travis.yml
index 9c4f88b67..e97bd7f5f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,8 +53,6 @@ env:
- SENTRY_DSN_VAR=SENTRY_DSN_$TRAVIS_BRANCH
- SENTRY_DSN=${!SENTRY_DSN_VAR}
- SENTRY_DSN=${SENTRY_DSN:-$SENTRY_DSN_STAGING}
- # SMARTY_STREETS_API_KEY
- - secure: "uQKNgJaJEju8ErGUxIbLE0Y6ee4j6OFFbBpqyuKrNMk6apvvvXLp3lTdGZJq6j/ZwQeQ384m5bbfmhFwr7piPFj7W/zBXVKcifbF6ShfP7skMl834Kkefs3uEWU0VZw3nURgzNInSOPqqGLsISFywpwBXUWKfL0Q87KHNU0/I0EkwvImm3SAlNpR38m3yKcMF3h0zK8Fh2mO7iyHEIhtssdWabaRjf3t6Mr5vikACeXYJg+k4oEQZtsnSNnlLYWumdEDsxwonMozGKUBqlXwhHCdYNOJ1DUGuntbXOnylLt1/LA9I9B4hWQOrRDwqjyIOI+2dpADoCN040+Zr1VSrJhk7Wb7ogeaQLzZ4W/3dX54rbsnFHa+MuKqOsAxQ0Tjfk5xWq/pbLRsAyW6Pl7Q1v4yWOQ2COnM/tfJ6UaH9bxppOyKsX8n33rFjlvZU6CtY1GGa7fpB2zOKI5B5OovLjHeokIe/Tx+4coEDZqt44qkTGWr/eWDxrvkQqpQ29F9My3wBgB3gdou+3lWExS0a9M2wwp4EIduXEKNZXLGDuVefH5f3eFy09wH+nhctmMF8uhMbPefFubEi7fqXTkxntmDTy+/pD2A2w1jJhBwLhwlik335k+Wrbl3dclt7cjJ6fRVX9b+AuBCbGr633vM4xbk90whwXizSECIt5InGSw="
- SKIP_CLEANUP=true
- NODE_ENV=production
- WWW_VERSION=${TRAVIS_COMMIT:0:5}
diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx
index 13992a508..7e7ce68e4 100644
--- a/src/components/registration/steps.jsx
+++ b/src/components/registration/steps.jsx
@@ -3,8 +3,6 @@ var React = require('react');
var api = require('../../lib/api');
var countryData = require('../../lib/country-data');
var intl = require('../../lib/intl.jsx');
-var log = require('../../lib/log');
-var smartyStreets = require('../../lib/smarty-streets');
var Avatar = require('../../components/avatar/avatar.jsx');
var Button = require('../../components/forms/button.jsx');
@@ -667,36 +665,6 @@ module.exports = {
onChangeCountry: function (field, choice) {
this.setState({countryChoice: choice});
},
- onValidSubmit: function (formData, reset, invalidate) {
- if (formData.address.country !== 'us') {
- return this.props.onNextStep(formData);
- }
- this.setState({waiting: true});
- var address = {
- street: formData.address.line1,
- secondary: formData.address.line2 || '',
- city: formData.address.city,
- state: formData.address.state,
- zipcode: formData.address.zip
- };
- smartyStreets(address, function (err, res) {
- this.setState({waiting: false});
- if (err) {
- // We don't want to prevent registration because
- // address validation isn't working. Log it and
- // move on.
- log.error(err);
- return this.props.onNextStep(formData);
- }
- if (res && res.length > 0) {
- return this.props.onNextStep(formData);
- } else {
- return invalidate({
- 'all': this.props.intl.formatMessage({id: 'teacherRegistration.addressValidationError'})
- });
- }
- }.bind(this));
- },
render: function () {
var formatMessage = this.props.intl.formatMessage;
var stateOptions = countryData.subdivisionOptions[this.state.countryChoice];
@@ -712,7 +680,7 @@ module.exports = {
tipContent={formatMessage({id: 'registration.nameStepTooltip'})} />
-