ripple-lib is not returning transactions with the getTransactions method My code is

const api = new RippleAPI({
  server: 'wss://s1.ripple.com'
});

api.connect();

    let isConnected = false;
    api.on('connected', () =&gt; {
      isConnected = true;
    });
      return api.getTransactions(address)
        .then((transactions) =&gt; {
          console.log(transactions);
        })
        .catch((err) =&gt; {
          console.log(err);
        })


But it doesn't actually return anything. It has an empty array [] for transactions.

If you look at the address I'm looking at: https://xrpcharts.ripple.com/#/graph/rqnfXCcsZRadjoj8tDQWYsP1pVyv3Ro7X

You'll see there are some transactions. So why doesn't the API return anything?
You can use chain of promises like this:

const RippleAPI = require('ripple-lib').RippleAPI;
var test_server = 'wss://s2.ripple.com';
const api = new RippleAPI({
    server: test_server // Public rippled server
});
api.connect().then(() =&gt; {
    /* begin custom code ------------------------------------ */
    const myAddress = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn';
    console.log('getting account info for', myAddress);
    return api.getTransactions(myAddress);
}).then(info =&gt; {
    console.log(info);
    /* end custom code -------------------------------------- */
}).then(() =&gt; {
    return api.disconnect();
}).then(() =&gt; {
    console.log('done and disconnected.');
}).catch(console.error);

Good luck)