hivewallet/hiveapp-bitstamptrader — pull request #9 by javgh (2014-04-28 13:34:32+00:00)
Title: Fix some bugs and add workaround for Hive Android API limits

Please review, merge and tag as 1.2.3 . This contains commits for:

1. Workaround for the current limit, that the Hive Android API is only available on the first page.

2. Correctly display USD balance - a commit a while back introduced a bug, where the balance would typically end up being shown as zero all the time.

3. Moves some code that depends on the result of getUserInfo() into the callback, so that it is guaranteed, that the data will be available.

Regarding 3):

The app was doing something like this:

```
var user_address;
bitcoin.getUserInfo(function(info){
user_address = info.address;
});
alert(user_address);
```

It seems, that on Hive OSX the getUserInfo() call completes quickly enough, that this will work anyway. On Hive Android the asynchronous callback will usually be executed later though. So the alert() needs to be moved into the callback, to ensure proper ordering. If other apps also rely on this behavior, they will need to be fixed as well. But I haven't checked specifically yet.