1
web3.eth.getCoinbase(function(err, account) {
      if (err === null) {
        return account;
      }  
    });

How do you return a callback for an asynchronous function such as the one in the code above? How do I access the the value account outside of that function? My goal is to access the value "account". The synchronous version of this function would be something simple such as

App.account = web3.eth.coinbase;

0 Answers0