<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
    <script type="text/javascript">
      var logAddressesP = function() {
        Daedalus.ClientApi.getAddressesP()
            .then(function(result) {console.log(result)}
          ,     function(reason) {console.log(reason)})
      };
    </script>
		<title></title>
	</head>
	<body>
    <h1>Let's talk Daedalus!</h1>
    <p>Check console to get some feedback.</p>
    <ul>
      <li><button onclick="Daedalus.ClientApi.hello('Daedalus')()">Say hello</button></li>
      <li><button onclick="Daedalus.ClientApi.helloCallback(function(msg) { console.log(msg + ' Daedalus') });">Hello callback</button></li>
      <li><button onclick="Daedalus.Debug.logAddresses(function(){})();">getAddresses</button></li>
      <li><button onclick="logAddressesP();"/>getAddresses w/Promise</li>
      <li><button onclick="Daedalus.Debug.logBalances(function(){})();">getBalances</button></li>
      <li><button onclick="Daedalus.Debug.logNewAddress(function(){})();">newAddress</button></li>
    </ul>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
    <script type="text/javascript">
      var logAddressesP = function() {
        Daedalus.ClientApi.getAddressesP()
            .then(function(result) {console.log(result)})
            .catch(function(reason) {console.log(reason)})
      };
    </script>
		<title></title>
	</head>
	<body>
    <h1>Let's talk Daedalus!</h1>
    <p>Check console to get some feedback.</p>
    <ul>
      <li><button onclick="Daedalus.ClientApi.hello('Daedalus')()">Say hello</button></li>
      <li><button onclick="Daedalus.ClientApi.helloCallback(function(msg) { console.log(msg + ' Daedalus') });">Hello callback</button></li>
      <li><button onclick="Daedalus.Debug.logAddresses(function(){})();">getAddresses</button></li>
      <li><button onclick="logAddressesP();"/>getAddresses w/Promise</li>
      <li><button onclick="Daedalus.Debug.logBalances(function(){})();">getBalances</button></li>
      <li><button onclick="Daedalus.Debug.logNewAddress(function(){})();">newAddress</button></li>
    </ul>
	</body>
</html>

Use default Promise error syntax
Use default Promise error syntax
