stoodkev / SteemPlus

SteemPlus is a lightweight browser extension adding new features to your Steemit/Busy experience: - Voting slider for minnows - Possibility to filter (by tag/resteem/reputation) and sort ( by date/payout/votes) - Switch between Busy Steemit and Steemd by keyboard shortcuts - Delegation of Steem Power directly from the wallet
GNU General Public License v3.0
27 stars 32 forks source link

[2.20.0.3] - Mixed content error in wallet_history.js #153

Closed tobias-g1 closed 5 years ago

tobias-g1 commented 6 years ago

Expected behavior

When visiting my wallet I should be able to filter and search my transaction history. It should look like this:

image.png

Actual Behaviour

When visiting my wallet, the filter options, search or min Steem/SBD/SP amounts are not shown. A mixed content error is provided.

Pre-Requisite

Steps to reproduce

From a fresh install download SteemPlus here

  1. Complete the on-boarding flow and sign in via SteemConnect
  2. You will be redirected to Steemit.com (if you're already on the site, refresh to ensure the SteemPlus extension is working as expected).
  3. Navigate to your wallet
  4. Note that wallet history doesn't load.

Environment

Error & Resolution

The following error is provided in the console:

Mixed Content: The page at 'https://steemit.com/@tobias-g/transfers' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://steemplus-api.herokuapp.com/api/get-last-block-id'. This request has been blocked; the content must be served over HTTPS.

The area affected is line 605 of wallet.js within getLastBlockID(), this can be seen below:

function  getLastBlockID()

{

return  new  Promise(function (resolve, reject) {

$.ajax({

type:  "GET",

beforeSend:  function(xhttp) {

xhttp.setRequestHeader("Content-type", "application/json");

xhttp.setRequestHeader("X-Parse-Application-Id", chrome.runtime.id);

},

url:  'http://steemplus-api.herokuapp.com/api/get-last-block-id',

success:  function(response) {

resolve(response[0]['block_num']);

},

error:  function(msg) {

resolve(msg);

}

});

});

}

This can be resolved by adjusting

url: 'http://steemplus-api.herokuapp.com/api/get-last-block-id',

to

url: 'https://steemplus-api.herokuapp.com/api/get-last-block-id',

Recording of issue

The following video shows this issue in more detail:

https://www.youtube.com/embed/hHyVcBGD4Sc