<commit_before><div class="center-align">
  <div id="mainContainer">
    <input type="button" id="start" value="Add Bank">
  </div>
</div>

<div id="iavContainer"></div>

<script type="text/javascript">
$('#start').click(function() {
  var iavToken = "<%= @token %>";
  dwolla.configure('sandbox');
  dwolla.iav.start(iavToken, {
          container: 'iavContainer',
          stylesheets: [
            'http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext',
            'http://localhost:8080/iav/customStylesheet.css'
          ]
        }, function(err, res) {
    console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res));
    var ajaxFunc = $.ajax({
      url: "<%= user_path(@user) %>",
      method: 'PUT',
      dataType: 'json',
      data: {user: {dwolla_url: res}}
    });

    ajaxFunc.done(function(response) {
      console.log(response);
      location.replace("<%= user_path(@user) %>")
    });
    ajaxFunc.fail(function(response) {
      console.log("shits broke fam");
    });

  });
});
</script>
<commit_msg>Add delay to redirect in user banking edit page<commit_after><div class="center-align">
  <div id="mainContainer">
    <input type="button" id="start" value="Add Bank">
  </div>
</div>

<div id="iavContainer"></div>

<script type="text/javascript">
$('#start').click(function() {
  $(this).hide();
  var iavToken = "<%= @token %>";
  dwolla.configure('sandbox');
  dwolla.iav.start(iavToken, {
          container: 'iavContainer',
          stylesheets: [
            'http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext',
            'http://localhost:8080/iav/customStylesheet.css'
          ]
        }, function(err, res) {
    console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res));
    var ajaxFunc = $.ajax({
      url: "<%= user_path(@user) %>",
      method: 'PUT',
      dataType: 'json',
      data: {user: {dwolla_url: res}}
    });

    ajaxFunc.done(function(response) {
      console.log(response);
      setTimeout(
        function() {
          location.replace("<%= user_path(@user) %>");
        }, 3000);
    });
    ajaxFunc.fail(function(response) {
      console.log("shits broke fam");
    });

  });
});
</script>

{'fraction_non_alphanumeric': 0.20017714791851196, 'fraction_numerical': 0.005314437555358724, 'mean_word_length': 2.9355400696864113, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6411690', 'n_tokens_mistral': 775, 'n_tokens_neox': 740, 'n_words': 120}